From 668ece971a92c908a97bc522283c9fb3f5a23345 Mon Sep 17 00:00:00 2001 From: HAMburglar Date: Thu, 13 Aug 2020 11:53:08 +0900 Subject: [PATCH] =?UTF-8?q?s/=F0=9F=8D=A0/=F0=9F=90=B7/g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProtocolLevers.md | 70 +- README.md | 83 +- build/contracts/Address.json | 5169 -- build/contracts/Babylonian.json | 1504 - build/contracts/Context.json | 39745 ------------- build/contracts/FixedPoint.json | 6512 --- build/contracts/GovernorAlpha.json | 35122 ----------- build/contracts/IERC20.json | 1906 - .../IRewardDistributionRecipient.json | 39855 ------------- build/contracts/LPTokenWrapper.json | 39820 ------------- build/contracts/Math.json | 39739 ------------- build/contracts/Migrations.json | 905 - build/contracts/Ownable.json | 39835 ------------- build/contracts/Rebaser.json | 46752 --------------- build/contracts/SafeERC20.json | 5930 -- build/contracts/SafeMath.json | 4893 -- build/contracts/Timelock.json | 13304 ----- build/contracts/TimelockInterface.json | 34418 ----------- build/contracts/UniswapPair.json | 6412 --- build/contracts/UniswapV2OracleLibrary.json | 3234 -- build/contracts/YAM.json | 21671 ------- build/contracts/YAMAMPLPool.json | 35681 ------------ build/contracts/YAMCOMPPool.json | 35681 ------------ build/contracts/YAMDelegate.json | 3820 -- build/contracts/YAMDelegateInterface.json | 2342 - build/contracts/YAMDelegationStorage.json | 2304 - build/contracts/YAMDelegator.json | 12778 ---- build/contracts/YAMDelegatorInterface.json | 2360 - build/contracts/YAMETHPool.json | 35681 ------------ build/contracts/YAMGovernanceStorage.json | 1072 - build/contracts/YAMGovernanceToken.json | 16251 ------ build/contracts/YAMIncentives.json | 37161 ------------ build/contracts/YAMIncentivizer.json | 40364 ------------- build/contracts/YAMInterface.json | 34291 ----------- build/contracts/YAMLENDPool.json | 35681 ------------ build/contracts/YAMLINKPool.json | 35681 ------------ build/contracts/YAMMKRPool.json | 35681 ------------ build/contracts/YAMRebaser.json | 48035 ---------------- build/contracts/YAMReserve.json | 6089 -- build/contracts/YAMReserves.json | 6157 -- build/contracts/YAMSNXPool.json | 35681 ------------ build/contracts/YAMToken.json | 21626 ------- build/contracts/YAMTokenInterface.json | 6552 --- build/contracts/YAMTokenStorage.json | 1479 - build/contracts/YAMYFIPool.json | 35681 ------------ clean_build/contracts/Address.json | 1 - clean_build/contracts/Babylonian.json | 1 - clean_build/contracts/Context.json | 1 - clean_build/contracts/FixedPoint.json | 1 - clean_build/contracts/GovernorAlpha.json | 1 - clean_build/contracts/IERC20.json | 1 - .../IRewardDistributionRecipient.json | 1 - clean_build/contracts/LPTokenWrapper.json | 1 - clean_build/contracts/Math.json | 1 - clean_build/contracts/Migrations.json | 1 - clean_build/contracts/Ownable.json | 1 - clean_build/contracts/Rebaser.json | 1 - clean_build/contracts/SafeERC20.json | 1 - clean_build/contracts/SafeMath.json | 1 - clean_build/contracts/Timelock.json | 1 - clean_build/contracts/TimelockInterface.json | 1 - clean_build/contracts/UniswapPair.json | 1 - .../contracts/UniswapV2OracleLibrary.json | 1 - clean_build/contracts/YAM.json | 1 - clean_build/contracts/YAMAMPLPool.json | 1 - clean_build/contracts/YAMCOMPPool.json | 1 - clean_build/contracts/YAMDelegate.json | 1 - .../contracts/YAMDelegateInterface.json | 1 - .../contracts/YAMDelegationStorage.json | 1 - clean_build/contracts/YAMDelegator.json | 1 - .../contracts/YAMDelegatorInterface.json | 1 - clean_build/contracts/YAMETHPool.json | 1 - .../contracts/YAMGovernanceStorage.json | 1 - clean_build/contracts/YAMGovernanceToken.json | 1 - clean_build/contracts/YAMIncentives.json | 1 - clean_build/contracts/YAMIncentivizer.json | 1 - clean_build/contracts/YAMInterface.json | 1 - clean_build/contracts/YAMLENDPool.json | 1 - clean_build/contracts/YAMLINKPool.json | 1 - clean_build/contracts/YAMMKRPool.json | 1 - clean_build/contracts/YAMRebaser.json | 1 - clean_build/contracts/YAMReserve.json | 1 - clean_build/contracts/YAMReserves.json | 1 - clean_build/contracts/YAMSNXPool.json | 1 - clean_build/contracts/YAMToken.json | 1 - clean_build/contracts/YAMTokenInterface.json | 1 - clean_build/contracts/YAMTokenStorage.json | 1 - clean_build/contracts/YAMYFIPool.json | 1 - .../{YAMAMPLPool.sol => HAMAMPLPool.sol} | 14 +- .../{YAMCOMPPool.sol => HAMCOMPPool.sol} | 14 +- .../{YAMETHPool.sol => HAMETHPool.sol} | 14 +- .../{YAMLENDPool.sol => HAMLENDPool.sol} | 14 +- .../{YAMLINKPool.sol => HAMLINKPool.sol} | 14 +- .../{YAMMKRPool.sol => HAMMKRPool.sol} | 14 +- .../{YAMSNXPool.sol => HAMSNXPool.sol} | 14 +- .../{YAMYFIPool.sol => HAMYFIPool.sol} | 14 +- ...GovernorAlpha.sol => HAMGovernorAlpha.sol} | 30 +- contracts/governance/TimeLock.sol | 2 +- contracts/incentivizers/YAMIncentives.sol | 24 +- .../{YAMRebaser.sol => HAMRebaser.sol} | 76 +- .../{YAMReserves.sol => HAMReserves.sol} | 16 +- contracts/token/{YAM.sol => HAM.sol} | 70 +- .../{YAMDelegate.sol => HAMDelegate.sol} | 10 +- .../{YAMDelegator.sol => HAMDelegator.sol} | 12 +- .../{YAMGovernance.sol => HAMGovernance.sol} | 18 +- ...ceStorage.sol => HAMGovernanceStorage.sol} | 2 +- ...kenInterface.sol => HAMTokenInterface.sol} | 8 +- ...AMTokenStorage.sol => HAMTokenStorage.sol} | 12 +- {yam-www => ham-www}/.gitignore | 0 {yam-www => ham-www}/README.md | 0 {yam-www => ham-www}/package.json | 2 +- {yam-www => ham-www}/public/_redirects | 0 {yam-www => ham-www}/public/favicon.ico | Bin {yam-www => ham-www}/public/hero.png | Bin {yam-www => ham-www}/public/index.html | 8 +- {yam-www => ham-www}/public/logo192.png | Bin {yam-www => ham-www}/public/logo512.png | Bin {yam-www => ham-www}/public/manifest.json | 0 {yam-www => ham-www}/public/robots.txt | 0 {yam-www => ham-www}/src/App.tsx | 6 +- .../src/assets/img/farmer.png | Bin .../src/components/Button/Button.tsx | 0 .../src/components/Button/index.ts | 0 .../src/components/Card/Card.tsx | 0 .../src/components/Card/index.ts | 0 .../components/CardContent/CardContent.tsx | 0 .../src/components/CardContent/index.ts | 0 .../src/components/CardIcon/CardIcon.tsx | 0 .../src/components/CardIcon/index.ts | 0 .../src/components/Container/Container.tsx | 0 .../src/components/Container/index.ts | 0 .../src/components/Dial/Dial.tsx | 0 .../src/components/Dial/index.ts | 0 .../src/components/Footer/Footer.tsx | 0 .../src/components/Footer/components/Nav.tsx | 4 +- .../src/components/Footer/index.ts | 0 .../src/components/Icon/Icon.tsx | 0 .../src/components/Icon/index.ts | 0 .../src/components/IconButton/IconButton.tsx | 0 .../src/components/IconButton/index.ts | 0 .../src/components/Input/Input.tsx | 0 .../src/components/Input/index.ts | 0 .../src/components/Label/Label.tsx | 0 .../src/components/Label/index.ts | 0 .../src/components/Loader/Loader.tsx | 4 +- .../src/components/Loader/index.ts | 0 .../src/components/Logo/Logo.tsx | 2 +- .../src/components/Logo/index.ts | 0 .../src/components/Modal/Modal.tsx | 0 .../src/components/Modal/index.ts | 0 .../components/ModalActions/ModalActions.tsx | 0 .../src/components/ModalActions/index.ts | 0 .../src/components/ModalTitle/ModalTitle.tsx | 0 .../src/components/ModalTitle/index.ts | 0 .../src/components/Page/Page.tsx | 0 .../src/components/Page/index.ts | 0 .../src/components/PageHeader/PageHeader.tsx | 0 .../src/components/PageHeader/index.ts | 0 .../src/components/Spacer/Spacer.tsx | 0 .../src/components/Spacer/index.ts | 0 .../src/components/TokenInput/TokenInput.tsx | 0 .../src/components/TokenInput/index.ts | 0 .../src/components/TopBar/TopBar.tsx | 0 .../TopBar/components/AccountButton.tsx | 0 .../TopBar/components/AccountModal.tsx | 10 +- .../src/components/TopBar/components/Nav.tsx | 0 .../components/TopBar/components/TxButton.tsx | 0 .../src/components/TopBar/index.ts | 0 .../src/components/Value/Value.tsx | 0 .../src/components/Value/index.ts | 0 .../src/components/icons/AddIcon.tsx | 0 .../src/components/icons/RemoveIcon.tsx | 0 .../src/components/icons/index.ts | 0 .../src/constants/abi/ERC20.json | 0 ham-www/src/constants/tokenAddresses.ts | 1 + .../src/contexts/Farms/Farms.tsx | 20 +- .../src/contexts/Farms/context.ts | 0 .../src/contexts/Farms/index.ts | 0 .../src/contexts/Farms/types.ts | 0 .../src/contexts/Modals/Modals.tsx | 0 .../src/contexts/Modals/index.ts | 0 .../Transactions/TransactionsProvider.tsx | 0 .../src/contexts/Transactions/context.ts | 0 .../src/contexts/Transactions/index.ts | 0 .../src/contexts/Transactions/reducer.ts | 0 .../src/contexts/Transactions/types.ts | 0 .../src/contexts/YamProvider/YamProvider.tsx | 26 +- ham-www/src/contexts/YamProvider/index.ts | 1 + {yam-www/src/yam => ham-www/src/ham}/Yam.js | 2 +- {yam-www/src/yam => ham-www/src/ham}/index.js | 2 +- .../src/ham}/lib/BytesHelper.js | 0 .../src/yam => ham-www/src/ham}/lib/Expect.js | 0 .../yam => ham-www/src/ham}/lib/Helpers.js | 0 .../yam => ham-www/src/ham}/lib/accounts.js | 4 +- .../yam => ham-www/src/ham}/lib/constants.js | 0 .../yam => ham-www/src/ham}/lib/contracts.js | 52 +- .../src/yam => ham-www/src/ham}/lib/evm.js | 0 .../src/yam => ham-www/src/ham}/lib/snx.json | 0 .../src/yam => ham-www/src/ham}/lib/types.js | 0 .../src/yam => ham-www/src/ham}/lib/uni.json | 0 .../src/yam => ham-www/src/ham}/lib/uni2.json | 0 .../src/yam => ham-www/src/ham}/lib/uniR.json | 0 .../yam => ham-www/src/ham}/lib/unifact2.json | 0 .../src/yam => ham-www/src/ham}/lib/weth.json | 0 .../src/yam => ham-www/src/ham}/lib/ycrv.json | 0 .../yam => ham-www/src/ham}/tests/EIP712.js | 0 ham-www/src/ham/tests/deployment.test.js | 157 + ham-www/src/ham/tests/distribution.test.js | 1371 + .../src/ham}/tests/governance.test.js | 182 +- .../src/ham}/tests/governorAlpha.test.js | 122 +- ham-www/src/ham/tests/rebase.test.js | 1233 + .../src/ham}/tests/token.test.js | 58 +- .../src/hamUtils}/index.js | 66 +- .../src/hooks/useAllowance.ts | 0 {yam-www => ham-www}/src/hooks/useApprove.ts | 2 +- {yam-www => ham-www}/src/hooks/useEarnings.ts | 14 +- {yam-www => ham-www}/src/hooks/useFarm.ts | 0 {yam-www => ham-www}/src/hooks/useFarms.ts | 0 {yam-www => ham-www}/src/hooks/useModal.ts | 0 .../src/hooks/usePendingTransactions.ts | 0 {yam-www => ham-www}/src/hooks/useRedeem.ts | 2 +- {yam-www => ham-www}/src/hooks/useReward.ts | 2 +- {yam-www => ham-www}/src/hooks/useStake.ts | 2 +- .../src/hooks/useStakedBalance.ts | 14 +- .../src/hooks/useTokenBalance.ts | 0 .../src/hooks/useTransactionAdder.ts | 0 {yam-www => ham-www}/src/hooks/useUnstake.ts | 2 +- ham-www/src/hooks/useYam.ts | 9 + {yam-www => ham-www}/src/index.css | 0 {yam-www => ham-www}/src/index.tsx | 0 {yam-www => ham-www}/src/logo.svg | 0 {yam-www => ham-www}/src/react-app-env.d.ts | 0 {yam-www => ham-www}/src/serviceWorker.js | 0 {yam-www => ham-www}/src/setupTests.js | 0 {yam-www => ham-www}/src/theme/colors.ts | 0 {yam-www => ham-www}/src/theme/index.ts | 0 {yam-www => ham-www}/src/utils/erc20.ts | 0 .../src/utils/formatAddress.ts | 0 .../src/utils/formatBalance.ts | 0 {yam-www => ham-www}/src/utils/index.ts | 0 .../src/views/About/About.tsx | 2 +- {yam-www => ham-www}/src/views/About/index.ts | 0 {yam-www => ham-www}/src/views/Farm/Farm.tsx | 0 .../views/Farm/components/DepositModal.tsx | 0 .../src/views/Farm/components/Harvest.tsx | 2 +- .../src/views/Farm/components/Stake.tsx | 0 .../views/Farm/components/WithdrawModal.tsx | 0 {yam-www => ham-www}/src/views/Farm/index.ts | 0 .../src/views/Farms/Farms.tsx | 2 +- .../src/views/Farms/components/FarmCards.tsx | 0 {yam-www => ham-www}/src/views/Farms/index.ts | 0 {yam-www => ham-www}/src/views/Home/Home.tsx | 14 +- .../src/views/Home/components/Rebase.tsx | 0 .../src/views/Home/components/Stats.tsx | 0 {yam-www => ham-www}/src/views/Home/index.ts | 0 {yam-www => ham-www}/src/views/Home/types.ts | 0 ham-www/src/views/Home/utils.ts | 50 + {yam-www => ham-www}/tsconfig.json | 0 {yam-www => ham-www}/workers-site/.cargo-ok | 0 {yam-www => ham-www}/workers-site/.gitignore | 0 {yam-www => ham-www}/workers-site/index.js | 0 .../workers-site/package-lock.json | 0 .../workers-site/package.json | 0 {yam-www => ham-www}/yarn.lock | 26 +- jsLib/babel.config.js | 17 - jsLib/jest.config.js | 188 - jsLib/package-lock.json | 11464 ---- jsLib/package.json | 30 - migrations/2_token.js | 22 +- migrations/3_rs.js | 26 +- migrations/4_governance.js | 10 +- migrations/5_distribution.js | 96 +- migrations/6_rewarddistribution.js | 76 +- package-lock.json | 2 +- package.json | 4 +- scripts/clean.py | 35 - startBlockchain.sh | 1 - startBlockchainMining.sh | 1 - yam-www/src/constants/tokenAddresses.ts | 1 - yam-www/src/contexts/YamProvider/index.ts | 1 - yam-www/src/hooks/useYam.ts | 9 - yam-www/src/views/Home/utils.ts | 50 - .../yam/clean_build/contracts/Address.json | 1 - .../yam/clean_build/contracts/Babylonian.json | 1 - .../yam/clean_build/contracts/Context.json | 1 - .../yam/clean_build/contracts/FixedPoint.json | 1 - .../clean_build/contracts/GovernorAlpha.json | 1 - .../src/yam/clean_build/contracts/IERC20.json | 1 - .../IRewardDistributionRecipient.json | 1 - .../clean_build/contracts/LPTokenWrapper.json | 1 - .../src/yam/clean_build/contracts/Math.json | 1 - .../yam/clean_build/contracts/Migrations.json | 1 - .../yam/clean_build/contracts/Ownable.json | 1 - .../yam/clean_build/contracts/Rebaser.json | 1 - .../yam/clean_build/contracts/SafeERC20.json | 1 - .../yam/clean_build/contracts/SafeMath.json | 1 - .../yam/clean_build/contracts/Timelock.json | 1 - .../contracts/TimelockInterface.json | 1 - .../clean_build/contracts/UniswapPair.json | 1 - .../contracts/UniswapV2OracleLibrary.json | 1 - .../src/yam/clean_build/contracts/YAM.json | 1 - .../clean_build/contracts/YAMAMPLPool.json | 1 - .../clean_build/contracts/YAMCOMPPool.json | 1 - .../clean_build/contracts/YAMDelegate.json | 1 - .../contracts/YAMDelegateInterface.json | 1 - .../contracts/YAMDelegationStorage.json | 1 - .../clean_build/contracts/YAMDelegator.json | 1 - .../contracts/YAMDelegatorInterface.json | 1 - .../yam/clean_build/contracts/YAMETHPool.json | 1 - .../contracts/YAMGovernanceStorage.json | 1 - .../contracts/YAMGovernanceToken.json | 1 - .../clean_build/contracts/YAMIncentives.json | 1 - .../contracts/YAMIncentivizer.json | 1 - .../clean_build/contracts/YAMInterface.json | 1 - .../clean_build/contracts/YAMLENDPool.json | 1 - .../clean_build/contracts/YAMLINKPool.json | 1 - .../yam/clean_build/contracts/YAMMKRPool.json | 1 - .../yam/clean_build/contracts/YAMRebaser.json | 1 - .../yam/clean_build/contracts/YAMReserve.json | 1 - .../clean_build/contracts/YAMReserves.json | 1 - .../yam/clean_build/contracts/YAMSNXPool.json | 1 - .../yam/clean_build/contracts/YAMToken.json | 1 - .../contracts/YAMTokenInterface.json | 1 - .../contracts/YAMTokenStorage.json | 1 - .../yam/clean_build/contracts/YAMYFIPool.json | 1 - yam-www/src/yam/tests/deployment.test.js | 157 - yam-www/src/yam/tests/distribution.test.js | 1371 - yam-www/src/yam/tests/rebase.test.js | 1233 - yarn.lock | 7563 --- 329 files changed, 3541 insertions(+), 937778 deletions(-) delete mode 100644 build/contracts/Address.json delete mode 100644 build/contracts/Babylonian.json delete mode 100644 build/contracts/Context.json delete mode 100644 build/contracts/FixedPoint.json delete mode 100644 build/contracts/GovernorAlpha.json delete mode 100644 build/contracts/IERC20.json delete mode 100644 build/contracts/IRewardDistributionRecipient.json delete mode 100644 build/contracts/LPTokenWrapper.json delete mode 100644 build/contracts/Math.json delete mode 100644 build/contracts/Migrations.json delete mode 100644 build/contracts/Ownable.json delete mode 100644 build/contracts/Rebaser.json delete mode 100644 build/contracts/SafeERC20.json delete mode 100644 build/contracts/SafeMath.json delete mode 100644 build/contracts/Timelock.json delete mode 100644 build/contracts/TimelockInterface.json delete mode 100644 build/contracts/UniswapPair.json delete mode 100644 build/contracts/UniswapV2OracleLibrary.json delete mode 100644 build/contracts/YAM.json delete mode 100644 build/contracts/YAMAMPLPool.json delete mode 100644 build/contracts/YAMCOMPPool.json delete mode 100644 build/contracts/YAMDelegate.json delete mode 100644 build/contracts/YAMDelegateInterface.json delete mode 100644 build/contracts/YAMDelegationStorage.json delete mode 100644 build/contracts/YAMDelegator.json delete mode 100644 build/contracts/YAMDelegatorInterface.json delete mode 100644 build/contracts/YAMETHPool.json delete mode 100644 build/contracts/YAMGovernanceStorage.json delete mode 100644 build/contracts/YAMGovernanceToken.json delete mode 100644 build/contracts/YAMIncentives.json delete mode 100644 build/contracts/YAMIncentivizer.json delete mode 100644 build/contracts/YAMInterface.json delete mode 100644 build/contracts/YAMLENDPool.json delete mode 100644 build/contracts/YAMLINKPool.json delete mode 100644 build/contracts/YAMMKRPool.json delete mode 100644 build/contracts/YAMRebaser.json delete mode 100644 build/contracts/YAMReserve.json delete mode 100644 build/contracts/YAMReserves.json delete mode 100644 build/contracts/YAMSNXPool.json delete mode 100644 build/contracts/YAMToken.json delete mode 100644 build/contracts/YAMTokenInterface.json delete mode 100644 build/contracts/YAMTokenStorage.json delete mode 100644 build/contracts/YAMYFIPool.json delete mode 100644 clean_build/contracts/Address.json delete mode 100644 clean_build/contracts/Babylonian.json delete mode 100644 clean_build/contracts/Context.json delete mode 100644 clean_build/contracts/FixedPoint.json delete mode 100644 clean_build/contracts/GovernorAlpha.json delete mode 100644 clean_build/contracts/IERC20.json delete mode 100644 clean_build/contracts/IRewardDistributionRecipient.json delete mode 100644 clean_build/contracts/LPTokenWrapper.json delete mode 100644 clean_build/contracts/Math.json delete mode 100644 clean_build/contracts/Migrations.json delete mode 100644 clean_build/contracts/Ownable.json delete mode 100644 clean_build/contracts/Rebaser.json delete mode 100644 clean_build/contracts/SafeERC20.json delete mode 100644 clean_build/contracts/SafeMath.json delete mode 100644 clean_build/contracts/Timelock.json delete mode 100644 clean_build/contracts/TimelockInterface.json delete mode 100644 clean_build/contracts/UniswapPair.json delete mode 100644 clean_build/contracts/UniswapV2OracleLibrary.json delete mode 100644 clean_build/contracts/YAM.json delete mode 100644 clean_build/contracts/YAMAMPLPool.json delete mode 100644 clean_build/contracts/YAMCOMPPool.json delete mode 100644 clean_build/contracts/YAMDelegate.json delete mode 100644 clean_build/contracts/YAMDelegateInterface.json delete mode 100644 clean_build/contracts/YAMDelegationStorage.json delete mode 100644 clean_build/contracts/YAMDelegator.json delete mode 100644 clean_build/contracts/YAMDelegatorInterface.json delete mode 100644 clean_build/contracts/YAMETHPool.json delete mode 100644 clean_build/contracts/YAMGovernanceStorage.json delete mode 100644 clean_build/contracts/YAMGovernanceToken.json delete mode 100644 clean_build/contracts/YAMIncentives.json delete mode 100644 clean_build/contracts/YAMIncentivizer.json delete mode 100644 clean_build/contracts/YAMInterface.json delete mode 100644 clean_build/contracts/YAMLENDPool.json delete mode 100644 clean_build/contracts/YAMLINKPool.json delete mode 100644 clean_build/contracts/YAMMKRPool.json delete mode 100644 clean_build/contracts/YAMRebaser.json delete mode 100644 clean_build/contracts/YAMReserve.json delete mode 100644 clean_build/contracts/YAMReserves.json delete mode 100644 clean_build/contracts/YAMSNXPool.json delete mode 100644 clean_build/contracts/YAMToken.json delete mode 100644 clean_build/contracts/YAMTokenInterface.json delete mode 100644 clean_build/contracts/YAMTokenStorage.json delete mode 100644 clean_build/contracts/YAMYFIPool.json rename contracts/distribution/{YAMAMPLPool.sol => HAMAMPLPool.sol} (98%) rename contracts/distribution/{YAMCOMPPool.sol => HAMCOMPPool.sol} (98%) rename contracts/distribution/{YAMETHPool.sol => HAMETHPool.sol} (98%) rename contracts/distribution/{YAMLENDPool.sol => HAMLENDPool.sol} (98%) rename contracts/distribution/{YAMLINKPool.sol => HAMLINKPool.sol} (98%) rename contracts/distribution/{YAMMKRPool.sol => HAMMKRPool.sol} (98%) rename contracts/distribution/{YAMSNXPool.sol => HAMSNXPool.sol} (98%) rename contracts/distribution/{YAMYFIPool.sol => HAMYFIPool.sol} (98%) rename contracts/governance/{YAMGovernorAlpha.sol => HAMGovernorAlpha.sol} (95%) rename contracts/rebaser/{YAMRebaser.sol => HAMRebaser.sol} (93%) rename contracts/reserves/{YAMReserves.sol => HAMReserves.sol} (87%) rename contracts/token/{YAM.sol => HAM.sol} (83%) rename contracts/token/{YAMDelegate.sol => HAMDelegate.sol} (91%) rename contracts/token/{YAMDelegator.sol => HAMDelegator.sol} (97%) rename contracts/token/{YAMGovernance.sol => HAMGovernance.sol} (92%) rename contracts/token/{YAMGovernanceStorage.sol => HAMGovernanceStorage.sol} (97%) rename contracts/token/{YAMTokenInterface.sol => HAMTokenInterface.sol} (93%) rename contracts/token/{YAMTokenStorage.sol => HAMTokenStorage.sol} (84%) rename {yam-www => ham-www}/.gitignore (100%) rename {yam-www => ham-www}/README.md (100%) rename {yam-www => ham-www}/package.json (98%) rename {yam-www => ham-www}/public/_redirects (100%) rename {yam-www => ham-www}/public/favicon.ico (100%) rename {yam-www => ham-www}/public/hero.png (100%) rename {yam-www => ham-www}/public/index.html (90%) rename {yam-www => ham-www}/public/logo192.png (100%) rename {yam-www => ham-www}/public/logo512.png (100%) rename {yam-www => ham-www}/public/manifest.json (100%) rename {yam-www => ham-www}/public/robots.txt (100%) rename {yam-www => ham-www}/src/App.tsx (92%) rename {yam-www => ham-www}/src/assets/img/farmer.png (100%) rename {yam-www => ham-www}/src/components/Button/Button.tsx (100%) rename {yam-www => ham-www}/src/components/Button/index.ts (100%) rename {yam-www => ham-www}/src/components/Card/Card.tsx (100%) rename {yam-www => ham-www}/src/components/Card/index.ts (100%) rename {yam-www => ham-www}/src/components/CardContent/CardContent.tsx (100%) rename {yam-www => ham-www}/src/components/CardContent/index.ts (100%) rename {yam-www => ham-www}/src/components/CardIcon/CardIcon.tsx (100%) rename {yam-www => ham-www}/src/components/CardIcon/index.ts (100%) rename {yam-www => ham-www}/src/components/Container/Container.tsx (100%) rename {yam-www => ham-www}/src/components/Container/index.ts (100%) rename {yam-www => ham-www}/src/components/Dial/Dial.tsx (100%) rename {yam-www => ham-www}/src/components/Dial/index.ts (100%) rename {yam-www => ham-www}/src/components/Footer/Footer.tsx (100%) rename {yam-www => ham-www}/src/components/Footer/components/Nav.tsx (81%) rename {yam-www => ham-www}/src/components/Footer/index.ts (100%) rename {yam-www => ham-www}/src/components/Icon/Icon.tsx (100%) rename {yam-www => ham-www}/src/components/Icon/index.ts (100%) rename {yam-www => ham-www}/src/components/IconButton/IconButton.tsx (100%) rename {yam-www => ham-www}/src/components/IconButton/index.ts (100%) rename {yam-www => ham-www}/src/components/Input/Input.tsx (100%) rename {yam-www => ham-www}/src/components/Input/index.ts (100%) rename {yam-www => ham-www}/src/components/Label/Label.tsx (100%) rename {yam-www => ham-www}/src/components/Label/index.ts (100%) rename {yam-www => ham-www}/src/components/Loader/Loader.tsx (92%) rename {yam-www => ham-www}/src/components/Loader/index.ts (100%) rename {yam-www => ham-www}/src/components/Logo/Logo.tsx (92%) rename {yam-www => ham-www}/src/components/Logo/index.ts (100%) rename {yam-www => ham-www}/src/components/Modal/Modal.tsx (100%) rename {yam-www => ham-www}/src/components/Modal/index.ts (100%) rename {yam-www => ham-www}/src/components/ModalActions/ModalActions.tsx (100%) rename {yam-www => ham-www}/src/components/ModalActions/index.ts (100%) rename {yam-www => ham-www}/src/components/ModalTitle/ModalTitle.tsx (100%) rename {yam-www => ham-www}/src/components/ModalTitle/index.ts (100%) rename {yam-www => ham-www}/src/components/Page/Page.tsx (100%) rename {yam-www => ham-www}/src/components/Page/index.ts (100%) rename {yam-www => ham-www}/src/components/PageHeader/PageHeader.tsx (100%) rename {yam-www => ham-www}/src/components/PageHeader/index.ts (100%) rename {yam-www => ham-www}/src/components/Spacer/Spacer.tsx (100%) rename {yam-www => ham-www}/src/components/Spacer/index.ts (100%) rename {yam-www => ham-www}/src/components/TokenInput/TokenInput.tsx (100%) rename {yam-www => ham-www}/src/components/TokenInput/index.ts (100%) rename {yam-www => ham-www}/src/components/TopBar/TopBar.tsx (100%) rename {yam-www => ham-www}/src/components/TopBar/components/AccountButton.tsx (100%) rename {yam-www => ham-www}/src/components/TopBar/components/AccountModal.tsx (91%) rename {yam-www => ham-www}/src/components/TopBar/components/Nav.tsx (100%) rename {yam-www => ham-www}/src/components/TopBar/components/TxButton.tsx (100%) rename {yam-www => ham-www}/src/components/TopBar/index.ts (100%) rename {yam-www => ham-www}/src/components/Value/Value.tsx (100%) rename {yam-www => ham-www}/src/components/Value/index.ts (100%) rename {yam-www => ham-www}/src/components/icons/AddIcon.tsx (100%) rename {yam-www => ham-www}/src/components/icons/RemoveIcon.tsx (100%) rename {yam-www => ham-www}/src/components/icons/index.ts (100%) rename {yam-www => ham-www}/src/constants/abi/ERC20.json (100%) create mode 100644 ham-www/src/constants/tokenAddresses.ts rename {yam-www => ham-www}/src/contexts/Farms/Farms.tsx (86%) rename {yam-www => ham-www}/src/contexts/Farms/context.ts (100%) rename {yam-www => ham-www}/src/contexts/Farms/index.ts (100%) rename {yam-www => ham-www}/src/contexts/Farms/types.ts (100%) rename {yam-www => ham-www}/src/contexts/Modals/Modals.tsx (100%) rename {yam-www => ham-www}/src/contexts/Modals/index.ts (100%) rename {yam-www => ham-www}/src/contexts/Transactions/TransactionsProvider.tsx (100%) rename {yam-www => ham-www}/src/contexts/Transactions/context.ts (100%) rename {yam-www => ham-www}/src/contexts/Transactions/index.ts (100%) rename {yam-www => ham-www}/src/contexts/Transactions/reducer.ts (100%) rename {yam-www => ham-www}/src/contexts/Transactions/types.ts (100%) rename {yam-www => ham-www}/src/contexts/YamProvider/YamProvider.tsx (61%) create mode 100644 ham-www/src/contexts/YamProvider/index.ts rename {yam-www/src/yam => ham-www/src/ham}/Yam.js (99%) rename {yam-www/src/yam => ham-www/src/ham}/index.js (84%) rename {yam-www/src/yam => ham-www/src/ham}/lib/BytesHelper.js (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/Expect.js (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/Helpers.js (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/accounts.js (92%) rename {yam-www/src/yam => ham-www/src/ham}/lib/constants.js (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/contracts.js (86%) rename {yam-www/src/yam => ham-www/src/ham}/lib/evm.js (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/snx.json (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/types.js (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/uni.json (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/uni2.json (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/uniR.json (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/unifact2.json (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/weth.json (100%) rename {yam-www/src/yam => ham-www/src/ham}/lib/ycrv.json (100%) rename {yam-www/src/yam => ham-www/src/ham}/tests/EIP712.js (100%) create mode 100644 ham-www/src/ham/tests/deployment.test.js create mode 100644 ham-www/src/ham/tests/distribution.test.js rename {yam-www/src/yam => ham-www/src/ham}/tests/governance.test.js (62%) rename {yam-www/src/yam => ham-www/src/ham}/tests/governorAlpha.test.js (63%) create mode 100644 ham-www/src/ham/tests/rebase.test.js rename {yam-www/src/yam => ham-www/src/ham}/tests/token.test.js (55%) rename {yam-www/src/yamUtils => ham-www/src/hamUtils}/index.js (63%) rename {yam-www => ham-www}/src/hooks/useAllowance.ts (100%) rename {yam-www => ham-www}/src/hooks/useApprove.ts (94%) rename {yam-www => ham-www}/src/hooks/useEarnings.ts (67%) rename {yam-www => ham-www}/src/hooks/useFarm.ts (100%) rename {yam-www => ham-www}/src/hooks/useFarms.ts (100%) rename {yam-www => ham-www}/src/hooks/useModal.ts (100%) rename {yam-www => ham-www}/src/hooks/usePendingTransactions.ts (100%) rename {yam-www => ham-www}/src/hooks/useRedeem.ts (92%) rename {yam-www => ham-www}/src/hooks/useReward.ts (92%) rename {yam-www => ham-www}/src/hooks/useStake.ts (92%) rename {yam-www => ham-www}/src/hooks/useStakedBalance.ts (68%) rename {yam-www => ham-www}/src/hooks/useTokenBalance.ts (100%) rename {yam-www => ham-www}/src/hooks/useTransactionAdder.ts (100%) rename {yam-www => ham-www}/src/hooks/useUnstake.ts (92%) create mode 100644 ham-www/src/hooks/useYam.ts rename {yam-www => ham-www}/src/index.css (100%) rename {yam-www => ham-www}/src/index.tsx (100%) rename {yam-www => ham-www}/src/logo.svg (100%) rename {yam-www => ham-www}/src/react-app-env.d.ts (100%) rename {yam-www => ham-www}/src/serviceWorker.js (100%) rename {yam-www => ham-www}/src/setupTests.js (100%) rename {yam-www => ham-www}/src/theme/colors.ts (100%) rename {yam-www => ham-www}/src/theme/index.ts (100%) rename {yam-www => ham-www}/src/utils/erc20.ts (100%) rename {yam-www => ham-www}/src/utils/formatAddress.ts (100%) rename {yam-www => ham-www}/src/utils/formatBalance.ts (100%) rename {yam-www => ham-www}/src/utils/index.ts (100%) rename {yam-www => ham-www}/src/views/About/About.tsx (99%) rename {yam-www => ham-www}/src/views/About/index.ts (100%) rename {yam-www => ham-www}/src/views/Farm/Farm.tsx (100%) rename {yam-www => ham-www}/src/views/Farm/components/DepositModal.tsx (100%) rename {yam-www => ham-www}/src/views/Farm/components/Harvest.tsx (97%) rename {yam-www => ham-www}/src/views/Farm/components/Stake.tsx (100%) rename {yam-www => ham-www}/src/views/Farm/components/WithdrawModal.tsx (100%) rename {yam-www => ham-www}/src/views/Farm/index.ts (100%) rename {yam-www => ham-www}/src/views/Farms/Farms.tsx (95%) rename {yam-www => ham-www}/src/views/Farms/components/FarmCards.tsx (100%) rename {yam-www => ham-www}/src/views/Farms/index.ts (100%) rename {yam-www => ham-www}/src/views/Home/Home.tsx (87%) rename {yam-www => ham-www}/src/views/Home/components/Rebase.tsx (100%) rename {yam-www => ham-www}/src/views/Home/components/Stats.tsx (100%) rename {yam-www => ham-www}/src/views/Home/index.ts (100%) rename {yam-www => ham-www}/src/views/Home/types.ts (100%) create mode 100644 ham-www/src/views/Home/utils.ts rename {yam-www => ham-www}/tsconfig.json (100%) rename {yam-www => ham-www}/workers-site/.cargo-ok (100%) rename {yam-www => ham-www}/workers-site/.gitignore (100%) rename {yam-www => ham-www}/workers-site/index.js (100%) rename {yam-www => ham-www}/workers-site/package-lock.json (100%) rename {yam-www => ham-www}/workers-site/package.json (100%) rename {yam-www => ham-www}/yarn.lock (99%) delete mode 100644 jsLib/babel.config.js delete mode 100644 jsLib/jest.config.js delete mode 100644 jsLib/package-lock.json delete mode 100644 jsLib/package.json delete mode 100644 scripts/clean.py delete mode 100644 startBlockchain.sh delete mode 100644 startBlockchainMining.sh delete mode 100644 yam-www/src/constants/tokenAddresses.ts delete mode 100644 yam-www/src/contexts/YamProvider/index.ts delete mode 100644 yam-www/src/hooks/useYam.ts delete mode 100644 yam-www/src/views/Home/utils.ts delete mode 100644 yam-www/src/yam/clean_build/contracts/Address.json delete mode 100644 yam-www/src/yam/clean_build/contracts/Babylonian.json delete mode 100644 yam-www/src/yam/clean_build/contracts/Context.json delete mode 100644 yam-www/src/yam/clean_build/contracts/FixedPoint.json delete mode 100644 yam-www/src/yam/clean_build/contracts/GovernorAlpha.json delete mode 100644 yam-www/src/yam/clean_build/contracts/IERC20.json delete mode 100644 yam-www/src/yam/clean_build/contracts/IRewardDistributionRecipient.json delete mode 100644 yam-www/src/yam/clean_build/contracts/LPTokenWrapper.json delete mode 100644 yam-www/src/yam/clean_build/contracts/Math.json delete mode 100644 yam-www/src/yam/clean_build/contracts/Migrations.json delete mode 100644 yam-www/src/yam/clean_build/contracts/Ownable.json delete mode 100644 yam-www/src/yam/clean_build/contracts/Rebaser.json delete mode 100644 yam-www/src/yam/clean_build/contracts/SafeERC20.json delete mode 100644 yam-www/src/yam/clean_build/contracts/SafeMath.json delete mode 100644 yam-www/src/yam/clean_build/contracts/Timelock.json delete mode 100644 yam-www/src/yam/clean_build/contracts/TimelockInterface.json delete mode 100644 yam-www/src/yam/clean_build/contracts/UniswapPair.json delete mode 100644 yam-www/src/yam/clean_build/contracts/UniswapV2OracleLibrary.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAM.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMAMPLPool.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMCOMPPool.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMDelegate.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMDelegateInterface.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMDelegationStorage.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMDelegator.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMDelegatorInterface.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMETHPool.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMGovernanceStorage.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMGovernanceToken.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMIncentives.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMIncentivizer.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMInterface.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMLENDPool.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMLINKPool.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMMKRPool.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMRebaser.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMReserve.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMReserves.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMSNXPool.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMToken.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMTokenInterface.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMTokenStorage.json delete mode 100644 yam-www/src/yam/clean_build/contracts/YAMYFIPool.json delete mode 100644 yam-www/src/yam/tests/deployment.test.js delete mode 100644 yam-www/src/yam/tests/distribution.test.js delete mode 100644 yam-www/src/yam/tests/rebase.test.js delete mode 100644 yarn.lock diff --git a/ProtocolLevers.md b/ProtocolLevers.md index ccf600f..d921318 100644 --- a/ProtocolLevers.md +++ b/ProtocolLevers.md @@ -1,17 +1,19 @@ # Levers -The expectation is that after the pools receive their YAMs, there is no longer a founding team or any team to speak of. This is a protocol that is being put out there in a decentralized way, then walk away. The writer of these contracts or those connected with its inception, are under no obligation and likely won't continue development once it is deployed. +The expectation is that after the pools receive their HAMs, the forking degenerates are nowhere to be found. This is a protocol that will be launched, and left to the growing community of meat eaters. -That said, it would be helpful for governance to have a well documented set of levers inside the protocol so if the community wishes to govern, they can. +If you do need help or technical support, you can always harass [whoever runs the Yam Finance Twitter](https://twitter.com/YamFinance) or maybe just [Dan Elitzer](https://twitter.com/delitzer) since he seems pretty smart. You might have to pretend you like sweet potatoes though. -## YAM Levers +To help ensure governance by a robust group of degenerate meat eaters, here's a TL;DR + +## HAM Levers #### `gov`/`pendingGov` -##### File: `YAMTokenStorage.sol` +##### File: `HAMTokenStorage.sol` ##### Description address that controls every permissioned function, or is primed to. ##### Setting -###### File: `YAM.sol` +###### File: `HAM.sol` `_setPendingGov(address)`: sets `pendingGov` to new address. To complete the change of governance, the new governance contract has to call `_acceptGov()`.
@@ -19,11 +21,11 @@ address that controls every permissioned function, or is primed to.
#### `rebaser` -##### File: `YAMTokenStorage.sol` +##### File: `HAMTokenStorage.sol` ##### Description -address that controls the rebasing functionality. This contract is one of two contracts that can `mint`. It also tells how much to change `yamsScalingFactor`. +address that controls the rebasing functionality. This contract is one of two contracts that can `mint`. It also tells how much to change `hamsScalingFactor`. ##### Setting -###### File: `YAM.sol` +###### File: `HAM.sol` `_setRebaser(address)`: sets `rebaser` to new address.
@@ -31,11 +33,11 @@ address that controls the rebasing functionality. This contract is one of two co
#### `incentivizer` -##### File: `YAMTokenStorage.sol` +##### File: `HAMTokenStorage.sol` ##### Description address that controls the incentivizer pool. This contract is one of two contracts that can `mint`. It is there to promote liquidity for the rebasing functionality to work correctly. ##### Setting -###### File: `YAM.sol` +###### File: `HAM.sol` `_setIncentivizer(address)`: sets `incentivzer` to new address.
@@ -45,12 +47,12 @@ address that controls the incentivizer pool. This contract is one of two contrac ## Rebaser Levers #### `transactions` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description Transactions that the rebaser sends after a rebase. Useful for calling `sync()` like functions. ##### init_value: `[]` (empty) ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` addTransaction(address destination, bytes calldata data) ``` @@ -73,11 +75,11 @@ enables or disables a tx in the `transactions` list.
#### `gov`/`pendingGov` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description address that controls every permissioned function, or is primed to. ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` `_setPendingGov(address)`: sets `pendingGov` to new address. To complete the change of governance, the new governance contract has to call `_acceptGov()`.
@@ -86,12 +88,12 @@ address that controls every permissioned function, or is primed to. #### `rebaseLag` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description rebaseLag spreads out the time it takes to reach the peg. i.e. if the supply is suppose to increase 10% in a particular rebase, that 10% is divided by this rebaseLag to slow it down a bit. Since rebases happen twice daily, a value of 10, slows it down to 5 days (if no further price change). ##### init_value: `10` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setRebaseLag(uint256 rebaseLag_) ``` @@ -101,12 +103,12 @@ setRebaseLag(uint256 rebaseLag_)
#### `targetRate` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description -The peg the protocol should aim for relative to the reserveToken. i.e. `1e18` means 1:1 between the reserveToken and YAM. +The peg the protocol should aim for relative to the reserveToken. i.e. `1e18` means 1:1 between the reserveToken and HAM. ##### init_value: `1e18` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setTargetRate(uint256 targetRate_) ``` @@ -116,12 +118,12 @@ setTargetRate(uint256 targetRate_)
#### `rebaseMintPerc` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description -The amount of YAM that the rebaser mints that is sold to build the protocol's treasury. Decimals: 18. i.e. 1e17 == .1, or 10% of the rebase. +The amount of HAM that the rebaser mints that is sold to build the protocol's treasury. Decimals: 18. i.e. 1e17 == .1, or 10% of the rebase. ##### init_value: `1e17` or `10%` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setRebaseMintPerc(uint256 rebaseMintPerc_) ``` @@ -132,12 +134,12 @@ setRebaseMintPerc(uint256 rebaseMintPerc_)
#### `deviationThreshold` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description The percentage difference between price and peg needed to allow for a change of supply via rebase. ##### init_value: `5*1e16` or `5%` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setDeviationThreshold(uint256 deviationThreshold_) ``` @@ -148,12 +150,12 @@ setDeviationThreshold(uint256 deviationThreshold_)
#### `minRebaseTimeIntervalSec` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description Amount of time between rebases. ##### init_value: `12 hours` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setRebaseTimingParameters( uint256 minRebaseTimeIntervalSec_, @@ -167,12 +169,12 @@ setRebaseTimingParameters(
#### `rebaseWindowOffsetSec` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description The number of seconds from the beginning of the rebase interval, where the rebase window begins. ##### init_value: `36000` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setRebaseTimingParameters( uint256 minRebaseTimeIntervalSec_, @@ -187,12 +189,12 @@ setRebaseTimingParameters(
#### `rebaseWindowLengthSec` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description The length of the time window where a rebase operation is allowed to execute, in seconds. ##### init_value: `900` or `15 minutes` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setRebaseTimingParameters( uint256 minRebaseTimeIntervalSec_, @@ -207,12 +209,12 @@ setRebaseTimingParameters(
#### `reservesContract` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description Address of the protocol owned reserves (treasury) contract. ##### init_value: `known at deployment` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setReserveContract(address reservesContract_) ``` @@ -222,12 +224,12 @@ setReserveContract(address reservesContract_)
#### `maxSlippageFactor` -##### File: `YAMRebaser.sol` +##### File: `HAMRebaser.sol` ##### Description Max slippage factor when buying reserve token. Magic number based on the fact that uniswap is a constant product. Therefore, targeting a % max slippage can be achieved by using a single precomputed number. i.e. 2.5% slippage is always equal to some f(maxSlippageFactor, reserves) ##### init_value: `5409258 * 10**10`, targeting max slippage of `10%` ##### Setting -###### File: `YAMRebaser.sol` +###### File: `HAMRebaser.sol` ``` setMaxSlippageFactor(uint256 maxSlippageFactor_) ``` diff --git a/README.md b/README.md index 01fd132..31757b2 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,69 @@ -# 🍠 YAM Protocol 🍠 -## The Protocol -Yam is an experimental protocol building upon the most exciting innovations in programmable money and governance. Built by a team of DeFi natives, it seeks to create: +# 🐷 HAM Protocol 🐷 -• an elastic supply to seek eventual price stability
-• a governable treasury to further support stability
-• fully on-chain governance to enable decentralized control and evolution from Day 1
-• a fair distribution mechanism that incentivizes key community members to actively take the reins of governance +## The Protocol -At its core, YAM is an elastic supply cryptocurrency, which expands and contracts its supply in response to market conditions, initially targeting 1 USD per YAM. This stability mechanism includes one key addition to existing elastic supply models such as Ampleforth: a portion of each supply expansion is used to buy yCurve (a high-yield USD-denominated stablecoin) and add it to the Yam treasury, which is controlled via Yam community governance. +Ham is an experimental protocol building upon the most exciting innovations in programmable money and governance. Built by a couple degenerates who prefer meat to [sweet potatoes](https://github.com/yam-finance/yam-protocol), it seeks to answer -We have built Yam to be a minimally viable monetary experiment, and at launch there will be zero value in the YAM token. After deployment, it is entirely dependent upon YAM holders to determine its value and future development. We have employed a fork of the Compound governance module, which will ensure all updates to the Yam protocol happen entirely on-chain through community voting. +* how strong is a meme? +* how quickly can a community bootstrap itself? +* wen moon? -## Audits +Built by a team of DeFi natives, it seeks to create: -None. Contributors have given their best efforts to ensure the security of these contracts, but make no guarantees. It has been spot checked by just a few pairs of eyes. It is a probability - not just a possibility - that there are bugs. That said, minimal changes were made to the staking/distribution contracts that have seen hundreds of millions flow through them via SNX, YFI, and YFI derivatives. The reserve contract is excessively simple as well. We prioritized staked assets' security first and foremost. +At its core, HAM is an elastic supply cryptocurrency, which expands and contracts its supply in response to market conditions, initially targeting 4.20 USD per HAM. This stability mechanism includes one key addition to existing elastic supply models such as Ampleforth: a portion of each supply expansion is used to buy assets and add them to the Ham treasury, which is controlled via Ham community governance. -The original devs encourage governance to fund a bug bounty/security audit +We have built Ham to be a minimally viable monetary experiment, and at launch there will be zero value in the HAM token. After deployment, it is entirely dependent upon HAM holders to determine its value and future development. We have employed a fork of the Compound governance module, which will ensure all updates to the Ham protocol happen entirely on-chain through community voting. -The token itself is largely based on COMP and Ampleforth which have undergone audits - but we made non-trivial changes. +## Audits -The rebaser may also have bugs - but has been tested in multiple scenarios. It is restricted to Externally Owned Accounts (EOAs) calling the rebase function for added security. SafeMath is used everywhere. +None. Seriously, look at the commit history, it's just find and replace. You probably shouldn't use this, but not everyone likes sweet potatoes and ham is delicious. -If you feel uncomfortable with these disclousures, don't stake or hold YAM. If the community votes to fund an audit, or the community is gifted an audit, there is no assumption that the original devs will be around to implement fixes, and is entirely at their discretion. +The [original devs](github.com/yam-finance/yam-protocol) and the forking degenerates all encourage governance to fund a bug bounty/security audit. If there's no audit or bounty program, remember, any funds you deposit are basically a bug bounty. ## The Token -The core YAM token uses yCRV as the reserve currency, which is roughly a $1 peg. Each supply expansion (referred to as an inflating rebase), a portion of tokens is minted and used to build up the treasury. This treasury is then in complete ownership of YAM holders via governance. +The core HAM token maintains a reservey. During each supply expansion (referred to as an inflating rebase), a portion of tokens is minted and used to build up the treasury. This treasury is then in complete ownership of HAM holders via governance. ## Distribution -Rather than allocating a portion of the supply to the founding team, YAM is being distributed in the spirit of YFI: no premine, no founder shares, no VC interests — simply equal-opportunity staking distribution to attract a broad and vision-aligned community to steward the future of the protocol and token. -The initial distribution of YAM will be evenly distributed across eight staking pools: WETH, YFI, MKR, LEND, LINK, SNX, COMP, and ETH/APML Uniswap v2 LP tokens. These pools were chosen intentionally to reach a broad swath of the overall DeFi community, as well as specific communities with a proven commitment to active governance and an understanding of complex tokenomics. +Rather than allocating a portion of the supply to the founding team, HAM is being distributed in the spirit of Satoshi, and applied by YFI: no premine, no founder shares, no VC interests — simply equal-opportunity staking distribution to attract a broad and vision-aligned community of meat eaters. -Following the launch of the initial distribution pools, a second distribution wave will be incentivized through a YAM/yCRV Uniswap pool. This pool will allow Uniswap's TWAP-based oracle to provide necessary input as the basis for rebase calculations, as well as provide liquidity for the rebase to purchase yCurve for the treasury. +The initial distribution of HAM will be oddly distributed across as many as 18 different staking pools. These pools have been chosen intentionally to reach a broad swath of the overall degenerate community, many of which [don't like sweet potatoes](https://github.com/gam-finance/yam-protocol). +These pools will be deployed over a 4 to 6 week period. + +Following the launch of the initial distribution pools, a second distribution wave will be incentivized through a HAM Uniswap pool. This pool will allow Uniswap's TWAP-based oracle to provide necessary input as the basis for rebase calculations, as well as provide liquidity for the rebase to purchase assets for the treasury. ## Rebases -Rebases are controlled by an external contract called the Rebaser. This is comparable to Ampleforth's `monetaryPolicy` contract. It dictates how large the rebase is and what happens on the rebase. The YAM token just changes the supply based on what this contract provides it. +Rebases are controlled by an external contract called the Rebaser. This is comparable to Ampleforth's `monetaryPolicy` contract. It dictates how large the rebase is and what happens on the rebase. The HAM token just changes the supply based on what this contract provides it. + +There are a few requirements before rebases are active: -There are a requirements before rebases are active: -
-• Liquid YAM/yCRV market
-• `init_twap()`
-• `activate_rebasing()`
+1. Liquid HAM market +2. `init_twap()` +3. `activate_rebasing()` -Following the launch of the second pool, rebasing can begin its activation phase. This begins with `init_twap()` on the rebaser contract. Anyone can call this at anytime once there is a YAM/yCRV Uniswap V2 market. The oracle is designed to be 12 hours between checkpoints. Given that, 12 hours after `init_twap()` is called, anyone can call `activate_rebasing()`. This turns rebasing on, permanently. Now anyone can call `rebase()` when `inRebaseWindow() == true;`. +Following the launch of the second pool, rebasing can begin its activation phase. This begins with `init_twap()` on the rebaser contract. Anyone can call this at anytime once there is a HAM Uniswap V2 market. The oracle is designed to be 12 hours between checkpoints. Given that, 12 hours after `init_twap()` is called, anyone can call `activate_rebasing()`. This turns rebasing on, permanently. Now anyone can call `rebase()` when `inRebaseWindow() == true;`. In a rebase, the order of operations are: -
-• ensure in rebase window
-• calculate how far off price is from the peg
-• dampen the rebase by the rebaseLag
-• if positive calculate protocol mint amount
-• change scaling factor, (in/de)flating the supply
-• sync uniswap, mint, sell to uniswap, transfer excess YAM and bought yCRV to reserves
-• call any extra functions governance adds in the future (i.e. Balancer gulps)
+1. ensure in rebase window +2. calculate how far off price is from the peg +3. dampen the rebase by the rebaseLag +4. if positive calculate protocol mint amount +5. change scaling factor, (in/de)flating the supply +6. sync uniswap, mint, sell to uniswap, transfer excess HAM and bought yCRV to reserves +7. call any extra functions governance adds in the future (i.e. Balancer gulps) ## Governance -Governance is entirely dictated by YAM holders from the start. Upon deployment, ownership of all YAM protocol contracts was reliquished to the timelocked Governance contract or removed entirely. At the very least, this can be seen as a reference implementation for a truly decentralized protocol. + +Governance is entirely dictated by HAM holders from the start. Upon deployment, ownership of all HAM protocol contracts was reliquished to the timelocked Governance contract or removed entirely. At the very least, this can be seen as a reference implementation for a truly decentralized meat-farming protocol. # Development + ### Building + This repo uses truffle. Ensure that you have truffle installed. Given the composability aspect of this Then, to build the contracts run: @@ -70,8 +71,6 @@ Then, to build the contracts run: $ truffle compile ``` - - To run tests, run against a single test package, i.e.: ``` $ sh startBlockchain.sh @@ -98,14 +97,16 @@ $ cd jsLib $ jest governance ``` - #### Attributions + Much of this code base is modified from existing works, including: -[Compound](https://compound.finance) - Jumping off point for token code and governance +[YAM](https://yam.finance) - Basically s/YAM/HAM/g + +[Compound](https://compound.finance) - Jumping off point for YAM token code and governance -[Ampleforth](https://ampleforth.org) - Initial rebasing mechanism, modified to better suit the YAM protocol +[Ampleforth](https://ampleforth.org) - Initial YAM rebasing mechanism, modified to better suit the YAM protocol [Synthetix](https://synthetix.io) - Rewards staking contract -[YEarn](https://yearn.finance)/[YFI](https://ygov.finance) - Initial fair distribution implementation +[YEarn](https://yearn.finance)/[YFI](https://ygov.finance) - Initial YAM fair distribution implementation diff --git a/build/contracts/Address.json b/build/contracts/Address.json deleted file mode 100644 index 069a74f..0000000 --- a/build/contracts/Address.json +++ /dev/null @@ -1,5169 +0,0 @@ -{ - "contractName": "Address", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Collection of functions related to the address type\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/Address.sol\":\"Address\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Address.sol\":{\"keccak256\":\"0xfcf985fe775d3891eb6f1df2b0926b13392f7411550fbddbb2a51e2dfb4c328f\",\"urls\":[\"bzz-raw://557db9c06dce45db040c1a8a87cc2100cbaa86b3fd7cbdf49acf983e110673df\",\"dweb:/ipfs/QmVRxJhBro2YT42FkofepMfseF4rxbDFNXySA2doFSf2Lq\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158200b2e5e365525f7e084a4e9a87238d0fd0e3008622896f57535825b2efaf005e064736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158200b2e5e365525f7e084a4e9a87238d0fd0e3008622896f57535825b2efaf005e064736f6c63430005110032", - "sourceMap": "127:5748:12:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "127:5748:12:-;;;;;;;;", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.5.17;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return _functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n return _functionCallWithValue(target, data, value, errorMessage);\n }\n\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call.value(weiValue)(data);\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/Address.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Address.sol", - "exportedSymbols": { - "Address": [ - 14003 - ] - }, - "id": 14004, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 13817, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:12" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 14003, - "linearizedBaseContracts": [ - 14003 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 13832, - "nodeType": "Block", - "src": "785:347:12", - "statements": [ - { - "assignments": [ - 13825 - ], - "declarations": [ - { - "constant": false, - "id": 13825, - "name": "size", - "nodeType": "VariableDeclaration", - "scope": 13832, - "src": "982:12:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13824, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "982:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13826, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "982:12:12" - }, - { - "externalReferences": [ - { - "size": { - "declaration": 13825, - "isOffset": false, - "isSlot": false, - "src": "1071:4:12", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 13819, - "isOffset": false, - "isSlot": false, - "src": "1091:7:12", - "valueSize": 1 - } - } - ], - "id": 13827, - "nodeType": "InlineAssembly", - "operations": "{ size := extcodesize(account) }", - "src": "1060:41:12" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13828, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13825, - "src": "1117:4:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1124:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1117:8:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 13823, - "id": 13831, - "nodeType": "Return", - "src": "1110:15:12" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * [IMPORTANT]\n====\nIt is unsafe to assume that an address for which this function returns\nfalse is an externally-owned account (EOA) and not a contract.\n * Among others, `isContract` will return false for the following\ntypes of addresses:\n * - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n====", - "id": 13833, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13819, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13833, - "src": "739:15:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13818, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "739:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "738:17:12" - }, - "returnParameters": { - "id": 13823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13822, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13833, - "src": "779:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13821, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "779:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "778:6:12" - }, - "scope": 14003, - "src": "719:413:12", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13865, - "nodeType": "Block", - "src": "2120:317:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13846, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13842, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19312, - "src": "2146:4:12", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - ], - "id": 13841, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2138:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2138:13:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2138:21:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13845, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13837, - "src": "2163:6:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2138:31:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 13847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2171:31:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 13840, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2130:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2130:73:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13849, - "nodeType": "ExpressionStatement", - "src": "2130:73:12" - }, - { - "assignments": [ - 13851, - null - ], - "declarations": [ - { - "constant": false, - "id": 13851, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13865, - "src": "2292:12:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13850, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2292:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 13859, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 13857, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2339:2:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 13855, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13837, - "src": "2331:6:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13852, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13835, - "src": "2310:9:12", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 13853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2310:14:12", - "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": 13854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2310:20:12", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 13856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2310:28:12", - "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": 13858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2310:32:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2291:51:12" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13861, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13851, - "src": "2360:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 13862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2369:60:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 13860, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2352:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2352:78:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13864, - "nodeType": "ExpressionStatement", - "src": "2352:78:12" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].", - "id": 13866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13838, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13835, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 13866, - "src": "2068:25:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 13834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2068:15:12", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13837, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13866, - "src": "2095:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13836, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2095:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2067:43:12" - }, - "returnParameters": { - "id": 13839, - "nodeType": "ParameterList", - "parameters": [], - "src": "2120:0:12" - }, - "scope": 14003, - "src": "2049:388:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13881, - "nodeType": "Block", - "src": "3267:82:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13876, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13868, - "src": "3295:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13877, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13870, - "src": "3303:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3309:32:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - }, - "value": "Address: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "id": 13875, - "name": "functionCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13882, - 13901 - ], - "referencedDeclaration": 13901, - "src": "3282:12:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 13879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3282:60:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13874, - "id": 13880, - "nodeType": "Return", - "src": "3275:67:12" - } - ] - }, - "documentation": "@dev Performs a Solidity function call using a low level `call`. A\nplain`call` is an unsafe replacement for a function call: use this\nfunction instead.\n * If `target` reverts with a revert reason, it is bubbled up by this\nfunction (like regular Solidity function calls).\n * Returns the raw returned data. To convert to the expected return value,\nuse https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n * Requirements:\n * - `target` must be a contract.\n- calling `target` with `data` must not revert.\n * _Available since v3.1._", - "id": 13882, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13868, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13882, - "src": "3200:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13867, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3200:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13870, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13882, - "src": "3216:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13869, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3216:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3199:35:12" - }, - "returnParameters": { - "id": 13874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13873, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13882, - "src": "3253:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3253:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3252:14:12" - }, - "scope": 14003, - "src": "3178:171:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13900, - "nodeType": "Block", - "src": "3688:77:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13894, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13884, - "src": "3728:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13895, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13886, - "src": "3736:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 13896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3742:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 13897, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13888, - "src": "3745:12:12", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 13893, - "name": "_functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14002, - "src": "3705:22:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 13898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3705:53:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13892, - "id": 13899, - "nodeType": "Return", - "src": "3698:60:12" - } - ] - }, - "documentation": "@dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n`errorMessage` as a fallback revert reason when `target` reverts.\n * _Available since v3.1._", - "id": 13901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13889, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13884, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3593:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13883, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3593:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13886, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3609:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13885, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3609:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13888, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3628:26:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13887, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3628:6:12", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3592:63:12" - }, - "returnParameters": { - "id": 13892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13891, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3674:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13890, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3674:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3673:14:12" - }, - "scope": 14003, - "src": "3571:194:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13919, - "nodeType": "Block", - "src": "4240:111:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13913, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13903, - "src": "4279:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13914, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13905, - "src": "4287:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 13915, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13907, - "src": "4293:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "id": 13916, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4300:43:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - }, - "value": "Address: low-level call with value failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "id": 13912, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13920, - 13951 - ], - "referencedDeclaration": 13951, - "src": "4257:21:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 13917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4257:87:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13911, - "id": 13918, - "nodeType": "Return", - "src": "4250:94:12" - } - ] - }, - "documentation": "@dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\nbut also transferring `value` wei to `target`.\n * Requirements:\n * - the calling contract must have an ETH balance of at least `value`.\n- the called Solidity function must be `payable`.\n * _Available since v3.1._", - "id": 13920, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13908, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13903, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4158:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4158:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13905, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4174:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13904, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4174:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13907, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4193:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13906, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4157:50:12" - }, - "returnParameters": { - "id": 13911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13910, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4226:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13909, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4226:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4225:14:12" - }, - "scope": 14003, - "src": "4127:224:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13950, - "nodeType": "Block", - "src": "4740:172:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13935, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19312, - "src": "4766:4:12", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - ], - "id": 13934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4758:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4758:13:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4758:21:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13926, - "src": "4783:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4758:30:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "id": 13940, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4790:40:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - }, - "value": "Address: insufficient balance for call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "id": 13933, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4750:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4750:81:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13942, - "nodeType": "ExpressionStatement", - "src": "4750:81:12" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13944, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13922, - "src": "4871:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13945, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13924, - "src": "4879:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 13946, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13926, - "src": "4885:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13947, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13928, - "src": "4892:12:12", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 13943, - "name": "_functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14002, - "src": "4848:22:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 13948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4848:57:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13932, - "id": 13949, - "nodeType": "Return", - "src": "4841:64:12" - } - ] - }, - "documentation": "@dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\nwith `errorMessage` as a fallback revert reason when `target` reverts.\n * _Available since v3.1._", - "id": 13951, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13929, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13922, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4630:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13921, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4630:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13924, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4646:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13923, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4646:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13926, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4665:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13925, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13928, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4680:26:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13927, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4680:6:12", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4629:78:12" - }, - "returnParameters": { - "id": 13932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13931, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4726:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13930, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4726:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4725:14:12" - }, - "scope": 14003, - "src": "4599:313:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14001, - "nodeType": "Block", - "src": "5062:811:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13966, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13953, - "src": "5091:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13965, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13833, - "src": "5080:10:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5080:18:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13968, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5100:31:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - }, - "value": "Address: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "id": 13964, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "5072:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5072:60:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13970, - "nodeType": "ExpressionStatement", - "src": "5072:60:12" - }, - { - "assignments": [ - 13972, - 13974 - ], - "declarations": [ - { - "constant": false, - "id": 13972, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 14001, - "src": "5203:12:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13971, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5203:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13974, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 14001, - "src": "5217:23:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13973, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5217:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13982, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13980, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13955, - "src": "5272:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 13978, - "name": "weiValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13957, - "src": "5262:8:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13975, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13953, - "src": "5244:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5244:11:12", - "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": 13977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5244:17:12", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 13979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5244:27:12", - "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": 13981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5244:33:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5202:75:12" - }, - { - "condition": { - "argumentTypes": null, - "id": 13983, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13972, - "src": "5291:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13999, - "nodeType": "Block", - "src": "5348:519:12", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13987, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13974, - "src": "5432:10:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5432:17:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5452:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5432:21:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13997, - "nodeType": "Block", - "src": "5804:53:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13994, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13959, - "src": "5829:12:12", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 13993, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19271, - 19272 - ], - "referencedDeclaration": 19272, - "src": "5822:6:12", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 13995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5822:20:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13996, - "nodeType": "ExpressionStatement", - "src": "5822:20:12" - } - ] - }, - "id": 13998, - "nodeType": "IfStatement", - "src": "5428:429:12", - "trueBody": { - "id": 13992, - "nodeType": "Block", - "src": "5455:343:12", - "statements": [ - { - "externalReferences": [ - { - "returndata": { - "declaration": 13974, - "isOffset": false, - "isSlot": false, - "src": "5690:10:12", - "valueSize": 1 - } - }, - { - "returndata": { - "declaration": 13974, - "isOffset": false, - "isSlot": false, - "src": "5737:10:12", - "valueSize": 1 - } - } - ], - "id": 13991, - "nodeType": "InlineAssembly", - "operations": "{\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n}", - "src": "5630:154:12" - } - ] - } - } - ] - }, - "id": 14000, - "nodeType": "IfStatement", - "src": "5287:580:12", - "trueBody": { - "id": 13986, - "nodeType": "Block", - "src": "5300:42:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13984, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13974, - "src": "5321:10:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13963, - "id": 13985, - "nodeType": "Return", - "src": "5314:17:12" - } - ] - } - } - ] - }, - "documentation": null, - "id": 14002, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13953, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "4950:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13952, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4950:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13955, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "4966:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13954, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4966:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13957, - "name": "weiValue", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "4985:16:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13956, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4985:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13959, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "5003:26:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13958, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5003:6:12", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4949:81:12" - }, - "returnParameters": { - "id": 13963, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13962, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "5048:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13961, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5048:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5047:14:12" - }, - "scope": 14003, - "src": "4918:955:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 14004, - "src": "127:5748:12" - } - ], - "src": "33:5843:12" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Address.sol", - "exportedSymbols": { - "Address": [ - 14003 - ] - }, - "id": 14004, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 13817, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:12" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 14003, - "linearizedBaseContracts": [ - 14003 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 13832, - "nodeType": "Block", - "src": "785:347:12", - "statements": [ - { - "assignments": [ - 13825 - ], - "declarations": [ - { - "constant": false, - "id": 13825, - "name": "size", - "nodeType": "VariableDeclaration", - "scope": 13832, - "src": "982:12:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13824, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "982:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13826, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "982:12:12" - }, - { - "externalReferences": [ - { - "size": { - "declaration": 13825, - "isOffset": false, - "isSlot": false, - "src": "1071:4:12", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 13819, - "isOffset": false, - "isSlot": false, - "src": "1091:7:12", - "valueSize": 1 - } - } - ], - "id": 13827, - "nodeType": "InlineAssembly", - "operations": "{ size := extcodesize(account) }", - "src": "1060:41:12" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13828, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13825, - "src": "1117:4:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1124:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1117:8:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 13823, - "id": 13831, - "nodeType": "Return", - "src": "1110:15:12" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * [IMPORTANT]\n====\nIt is unsafe to assume that an address for which this function returns\nfalse is an externally-owned account (EOA) and not a contract.\n * Among others, `isContract` will return false for the following\ntypes of addresses:\n * - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n====", - "id": 13833, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13819, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13833, - "src": "739:15:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13818, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "739:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "738:17:12" - }, - "returnParameters": { - "id": 13823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13822, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13833, - "src": "779:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13821, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "779:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "778:6:12" - }, - "scope": 14003, - "src": "719:413:12", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13865, - "nodeType": "Block", - "src": "2120:317:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13846, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13842, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19312, - "src": "2146:4:12", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - ], - "id": 13841, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2138:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2138:13:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2138:21:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13845, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13837, - "src": "2163:6:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2138:31:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 13847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2171:31:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 13840, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2130:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2130:73:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13849, - "nodeType": "ExpressionStatement", - "src": "2130:73:12" - }, - { - "assignments": [ - 13851, - null - ], - "declarations": [ - { - "constant": false, - "id": 13851, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13865, - "src": "2292:12:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13850, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2292:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 13859, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 13857, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2339:2:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 13855, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13837, - "src": "2331:6:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13852, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13835, - "src": "2310:9:12", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 13853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2310:14:12", - "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": 13854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2310:20:12", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 13856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2310:28:12", - "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": 13858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2310:32:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2291:51:12" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13861, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13851, - "src": "2360:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 13862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2369:60:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 13860, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2352:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2352:78:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13864, - "nodeType": "ExpressionStatement", - "src": "2352:78:12" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].", - "id": 13866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13838, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13835, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 13866, - "src": "2068:25:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 13834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2068:15:12", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13837, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13866, - "src": "2095:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13836, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2095:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2067:43:12" - }, - "returnParameters": { - "id": 13839, - "nodeType": "ParameterList", - "parameters": [], - "src": "2120:0:12" - }, - "scope": 14003, - "src": "2049:388:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13881, - "nodeType": "Block", - "src": "3267:82:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13876, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13868, - "src": "3295:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13877, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13870, - "src": "3303:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3309:32:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - }, - "value": "Address: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "id": 13875, - "name": "functionCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13882, - 13901 - ], - "referencedDeclaration": 13901, - "src": "3282:12:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 13879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3282:60:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13874, - "id": 13880, - "nodeType": "Return", - "src": "3275:67:12" - } - ] - }, - "documentation": "@dev Performs a Solidity function call using a low level `call`. A\nplain`call` is an unsafe replacement for a function call: use this\nfunction instead.\n * If `target` reverts with a revert reason, it is bubbled up by this\nfunction (like regular Solidity function calls).\n * Returns the raw returned data. To convert to the expected return value,\nuse https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n * Requirements:\n * - `target` must be a contract.\n- calling `target` with `data` must not revert.\n * _Available since v3.1._", - "id": 13882, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13868, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13882, - "src": "3200:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13867, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3200:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13870, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13882, - "src": "3216:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13869, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3216:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3199:35:12" - }, - "returnParameters": { - "id": 13874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13873, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13882, - "src": "3253:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3253:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3252:14:12" - }, - "scope": 14003, - "src": "3178:171:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13900, - "nodeType": "Block", - "src": "3688:77:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13894, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13884, - "src": "3728:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13895, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13886, - "src": "3736:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 13896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3742:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 13897, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13888, - "src": "3745:12:12", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 13893, - "name": "_functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14002, - "src": "3705:22:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 13898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3705:53:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13892, - "id": 13899, - "nodeType": "Return", - "src": "3698:60:12" - } - ] - }, - "documentation": "@dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n`errorMessage` as a fallback revert reason when `target` reverts.\n * _Available since v3.1._", - "id": 13901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13889, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13884, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3593:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13883, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3593:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13886, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3609:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13885, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3609:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13888, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3628:26:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13887, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3628:6:12", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3592:63:12" - }, - "returnParameters": { - "id": 13892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13891, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13901, - "src": "3674:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13890, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3674:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3673:14:12" - }, - "scope": 14003, - "src": "3571:194:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13919, - "nodeType": "Block", - "src": "4240:111:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13913, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13903, - "src": "4279:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13914, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13905, - "src": "4287:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 13915, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13907, - "src": "4293:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "id": 13916, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4300:43:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - }, - "value": "Address: low-level call with value failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "id": 13912, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13920, - 13951 - ], - "referencedDeclaration": 13951, - "src": "4257:21:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 13917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4257:87:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13911, - "id": 13918, - "nodeType": "Return", - "src": "4250:94:12" - } - ] - }, - "documentation": "@dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\nbut also transferring `value` wei to `target`.\n * Requirements:\n * - the calling contract must have an ETH balance of at least `value`.\n- the called Solidity function must be `payable`.\n * _Available since v3.1._", - "id": 13920, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13908, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13903, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4158:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4158:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13905, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4174:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13904, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4174:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13907, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4193:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13906, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4157:50:12" - }, - "returnParameters": { - "id": 13911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13910, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13920, - "src": "4226:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13909, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4226:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4225:14:12" - }, - "scope": 14003, - "src": "4127:224:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13950, - "nodeType": "Block", - "src": "4740:172:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13935, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19312, - "src": "4766:4:12", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - ], - "id": 13934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4758:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4758:13:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4758:21:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13926, - "src": "4783:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4758:30:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "id": 13940, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4790:40:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - }, - "value": "Address: insufficient balance for call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "id": 13933, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4750:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4750:81:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13942, - "nodeType": "ExpressionStatement", - "src": "4750:81:12" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13944, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13922, - "src": "4871:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13945, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13924, - "src": "4879:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 13946, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13926, - "src": "4885:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13947, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13928, - "src": "4892:12:12", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 13943, - "name": "_functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14002, - "src": "4848:22:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 13948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4848:57:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13932, - "id": 13949, - "nodeType": "Return", - "src": "4841:64:12" - } - ] - }, - "documentation": "@dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\nwith `errorMessage` as a fallback revert reason when `target` reverts.\n * _Available since v3.1._", - "id": 13951, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13929, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13922, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4630:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13921, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4630:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13924, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4646:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13923, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4646:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13926, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4665:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13925, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13928, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4680:26:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13927, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4680:6:12", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4629:78:12" - }, - "returnParameters": { - "id": 13932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13931, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13951, - "src": "4726:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13930, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4726:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4725:14:12" - }, - "scope": 14003, - "src": "4599:313:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14001, - "nodeType": "Block", - "src": "5062:811:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13966, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13953, - "src": "5091:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13965, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13833, - "src": "5080:10:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5080:18:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13968, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5100:31:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - }, - "value": "Address: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "id": 13964, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "5072:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5072:60:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13970, - "nodeType": "ExpressionStatement", - "src": "5072:60:12" - }, - { - "assignments": [ - 13972, - 13974 - ], - "declarations": [ - { - "constant": false, - "id": 13972, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 14001, - "src": "5203:12:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13971, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5203:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13974, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 14001, - "src": "5217:23:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13973, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5217:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13982, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13980, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13955, - "src": "5272:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 13978, - "name": "weiValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13957, - "src": "5262:8:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13975, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13953, - "src": "5244:6:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5244:11:12", - "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": 13977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5244:17:12", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 13979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5244:27:12", - "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": 13981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5244:33:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5202:75:12" - }, - { - "condition": { - "argumentTypes": null, - "id": 13983, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13972, - "src": "5291:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13999, - "nodeType": "Block", - "src": "5348:519:12", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13987, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13974, - "src": "5432:10:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5432:17:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5452:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5432:21:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13997, - "nodeType": "Block", - "src": "5804:53:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13994, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13959, - "src": "5829:12:12", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 13993, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19271, - 19272 - ], - "referencedDeclaration": 19272, - "src": "5822:6:12", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 13995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5822:20:12", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13996, - "nodeType": "ExpressionStatement", - "src": "5822:20:12" - } - ] - }, - "id": 13998, - "nodeType": "IfStatement", - "src": "5428:429:12", - "trueBody": { - "id": 13992, - "nodeType": "Block", - "src": "5455:343:12", - "statements": [ - { - "externalReferences": [ - { - "returndata": { - "declaration": 13974, - "isOffset": false, - "isSlot": false, - "src": "5690:10:12", - "valueSize": 1 - } - }, - { - "returndata": { - "declaration": 13974, - "isOffset": false, - "isSlot": false, - "src": "5737:10:12", - "valueSize": 1 - } - } - ], - "id": 13991, - "nodeType": "InlineAssembly", - "operations": "{\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n}", - "src": "5630:154:12" - } - ] - } - } - ] - }, - "id": 14000, - "nodeType": "IfStatement", - "src": "5287:580:12", - "trueBody": { - "id": 13986, - "nodeType": "Block", - "src": "5300:42:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13984, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13974, - "src": "5321:10:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 13963, - "id": 13985, - "nodeType": "Return", - "src": "5314:17:12" - } - ] - } - } - ] - }, - "documentation": null, - "id": 14002, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13953, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "4950:14:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13952, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4950:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13955, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "4966:17:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13954, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4966:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13957, - "name": "weiValue", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "4985:16:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13956, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4985:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13959, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "5003:26:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13958, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5003:6:12", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4949:81:12" - }, - "returnParameters": { - "id": 13963, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13962, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14002, - "src": "5048:12:12", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13961, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5048:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5047:14:12" - }, - "scope": 14003, - "src": "4918:955:12", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 14004, - "src": "127:5748:12" - } - ], - "src": "33:5843:12" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.085Z", - "devdoc": { - "details": "Collection of functions related to the address type", - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Babylonian.json b/build/contracts/Babylonian.json deleted file mode 100644 index 826cc79..0000000 --- a/build/contracts/Babylonian.json +++ /dev/null @@ -1,1504 +0,0 @@ -{ - "contractName": "Babylonian", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/Babylonian.sol\":\"Babylonian\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Babylonian.sol\":{\"keccak256\":\"0xad37a774ad6a438432acb1a475b71b2991a41ba98f1cd814c6d78f9109370a38\",\"urls\":[\"bzz-raw://0f1fbfda71c124ef0436d4e0fe1d0ee9440e2d169ba5ecb890d3d5089ccdd185\",\"dweb:/ipfs/QmXvHC7AfnhNoXEi2tCDRVgHcWuADfHToyCUYZ2tG5Pgen\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820aac0398f3452b94917eb74de523f59323b5d6f6b912c0640ab86ee0846e3b71564736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820aac0398f3452b94917eb74de523f59323b5d6f6b912c0640ab86ee0846e3b71564736f6c63430005110032", - "sourceMap": "210:341:13:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "210:341:13:-;;;;;;;;", - "source": "// SPDX-License-Identifier: GPL-3.0-or-later\n\npragma solidity >=0.4.0;\n\n// computes square roots using the babylonian method\n// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method\nlibrary Babylonian {\n function sqrt(uint y) internal pure returns (uint z) {\n if (y > 3) {\n z = y;\n uint x = y / 2 + 1;\n while (x < z) {\n z = x;\n x = (y / x + x) / 2;\n }\n } else if (y != 0) {\n z = 1;\n }\n // else z = 0\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/Babylonian.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Babylonian.sol", - "exportedSymbols": { - "Babylonian": [ - 14041 - ] - }, - "id": 14042, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 13986, - "literals": [ - "solidity", - ">=", - "0.4", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "46:24:13" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 14041, - "linearizedBaseContracts": [ - 14041 - ], - "name": "Babylonian", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 14039, - "nodeType": "Block", - "src": "288:261:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13993, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "302:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 13994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "306:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "302:5:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14029, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "483:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "488:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "483:6:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 14037, - "nodeType": "IfStatement", - "src": "479:42:13", - "trueBody": { - "id": 14036, - "nodeType": "Block", - "src": "491:30:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 14034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14032, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "505:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 14033, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "509:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "505:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14035, - "nodeType": "ExpressionStatement", - "src": "505:5:13" - } - ] - } - }, - "id": 14038, - "nodeType": "IfStatement", - "src": "298:223:13", - "trueBody": { - "id": 14028, - "nodeType": "Block", - "src": "309:164:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13996, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "323:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13997, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "327:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "323:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13999, - "nodeType": "ExpressionStatement", - "src": "323:5:13" - }, - { - "assignments": [ - 14001 - ], - "declarations": [ - { - "constant": false, - "id": 14001, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14028, - "src": "342:6:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14000, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "342:4:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14007, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14002, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "351:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 14003, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "355:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "351:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 14005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "359:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "351:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "342:18:13" - }, - { - "body": { - "id": 14026, - "nodeType": "Block", - "src": "388:75:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 14013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14011, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "406:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 14012, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "410:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "406:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14014, - "nodeType": "ExpressionStatement", - "src": "406:5:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 14024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14015, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "429:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14016, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "434:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14017, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "438:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "434:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 14019, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "442:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "434:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 14021, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "433:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 14022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "447:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "433:15:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "429:19:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14025, - "nodeType": "ExpressionStatement", - "src": "429:19:13" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14008, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "381:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 14009, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "385:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "381:5:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 14027, - "nodeType": "WhileStatement", - "src": "374:89:13" - } - ] - } - } - ] - }, - "documentation": null, - "id": 14040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sqrt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13988, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 14040, - "src": "249:6:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13987, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "249:4:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "248:8:13" - }, - "returnParameters": { - "id": 13992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13991, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 14040, - "src": "280:6:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13990, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "280:4:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "279:8:13" - }, - "scope": 14041, - "src": "235:314:13", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 14042, - "src": "210:341:13" - } - ], - "src": "46:506:13" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Babylonian.sol", - "exportedSymbols": { - "Babylonian": [ - 14041 - ] - }, - "id": 14042, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 13986, - "literals": [ - "solidity", - ">=", - "0.4", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "46:24:13" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 14041, - "linearizedBaseContracts": [ - 14041 - ], - "name": "Babylonian", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 14039, - "nodeType": "Block", - "src": "288:261:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13993, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "302:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 13994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "306:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "302:5:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14029, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "483:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "488:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "483:6:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 14037, - "nodeType": "IfStatement", - "src": "479:42:13", - "trueBody": { - "id": 14036, - "nodeType": "Block", - "src": "491:30:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 14034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14032, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "505:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 14033, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "509:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "505:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14035, - "nodeType": "ExpressionStatement", - "src": "505:5:13" - } - ] - } - }, - "id": 14038, - "nodeType": "IfStatement", - "src": "298:223:13", - "trueBody": { - "id": 14028, - "nodeType": "Block", - "src": "309:164:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13996, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "323:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13997, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "327:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "323:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13999, - "nodeType": "ExpressionStatement", - "src": "323:5:13" - }, - { - "assignments": [ - 14001 - ], - "declarations": [ - { - "constant": false, - "id": 14001, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14028, - "src": "342:6:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14000, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "342:4:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14007, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14002, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "351:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 14003, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "355:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "351:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 14005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "359:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "351:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "342:18:13" - }, - { - "body": { - "id": 14026, - "nodeType": "Block", - "src": "388:75:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 14013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14011, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "406:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 14012, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "410:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "406:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14014, - "nodeType": "ExpressionStatement", - "src": "406:5:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 14024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14015, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "429:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14016, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13988, - "src": "434:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14017, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "438:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "434:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 14019, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "442:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "434:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 14021, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "433:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 14022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "447:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "433:15:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "429:19:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14025, - "nodeType": "ExpressionStatement", - "src": "429:19:13" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14008, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14001, - "src": "381:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 14009, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13991, - "src": "385:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "381:5:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 14027, - "nodeType": "WhileStatement", - "src": "374:89:13" - } - ] - } - } - ] - }, - "documentation": null, - "id": 14040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sqrt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13988, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 14040, - "src": "249:6:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13987, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "249:4:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "248:8:13" - }, - "returnParameters": { - "id": 13992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13991, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 14040, - "src": "280:6:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13990, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "280:4:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "279:8:13" - }, - "scope": 14041, - "src": "235:314:13", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 14042, - "src": "210:341:13" - } - ], - "src": "46:506:13" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-09T23:21:18.180Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Context.json b/build/contracts/Context.json deleted file mode 100644 index 2724a0d..0000000 --- a/build/contracts/Context.json +++ /dev/null @@ -1,39745 +0,0 @@ -{ - "contractName": "Context", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":\"Context\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":{\"keccak256\":\"0xa8918e83ad8afd1ce8589d00dce386d2ee6a380f1bdafdd583db6f5b990e24c5\",\"urls\":[\"bzz-raw://cb926895e76ea186de7c790e05578cef920c77f6f9258d41df8a844cec163c37\",\"dweb:/ipfs/QmVomvauEub1TiDCPgBS9CSuAhnafgFVWJCstYyCGH9SQK\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-27\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-26\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMIncentives.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n function mint(address account, uint amount) external;\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni_lp = IERC20(0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd);\n\n uint256 private _totalSupply;\n\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n function mint(address to, uint256 amount) external;\n}\n\ncontract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000;\n\n uint256 public initreward = 15 * 10**5 * 10**18; // 1.5m\n uint256 public starttime = 1597931200 + 24 hours; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkhalve checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n modifier checkhalve() {\n if (block.timestamp >= periodFinish) {\n initreward = initreward.mul(50).div(100);\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 newRewards = initreward.mul(scalingFactor).div(10**18);\n yam.mint(address(this), newRewards);\n\n rewardRate = initreward.div(DURATION);\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(initreward);\n }\n _;\n }\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n require(yam.balanceOf(address(this)) == 0, \"already initialized\");\n yam.mint(address(this), initreward);\n rewardRate = initreward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n\n\n // This function allows governance to take unsupported tokens out of the\n // contract, since this one exists longer than the other pools.\n // This is in an effort to make someone whole, should they seriously\n // mess up. There is no guarantee governance will vote to return these.\n // It also allows for removal of airdropped tokens.\n function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to)\n external\n {\n // only gov\n require(msg.sender == owner(), \"!governance\");\n // cant take staked asset\n require(_token != uni_lp, \"uni_lp\");\n // cant take reward asset\n require(_token != yam, \"yam\");\n\n // transfer to\n _token.safeTransfer(to, amount);\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.102Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/FixedPoint.json b/build/contracts/FixedPoint.json deleted file mode 100644 index 9c9286e..0000000 --- a/build/contracts/FixedPoint.json +++ /dev/null @@ -1,6512 +0,0 @@ -{ - "contractName": "FixedPoint", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol\":\"FixedPoint\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Babylonian.sol\":{\"keccak256\":\"0xad37a774ad6a438432acb1a475b71b2991a41ba98f1cd814c6d78f9109370a38\",\"urls\":[\"bzz-raw://0f1fbfda71c124ef0436d4e0fe1d0ee9440e2d169ba5ecb890d3d5089ccdd185\",\"dweb:/ipfs/QmXvHC7AfnhNoXEi2tCDRVgHcWuADfHToyCUYZ2tG5Pgen\"]},\"/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol\":{\"keccak256\":\"0x589aacdc69a24cc0500bc13581b34d4431ee972333fa288a9b42a4d14707e003\",\"urls\":[\"bzz-raw://965edb53f5f0d9e23f7878ae95809239b26604420b0111f7b9cb199d21b84afe\",\"dweb:/ipfs/QmYkGQ6xPsNFfdkJr76vGoCehffXspqKyoGZ5utGJoWNuc\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582016fdd25eeb2c74e549a899f380e0149bd5fb9e2122b7fc4c7d52689752e2e5e864736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582016fdd25eeb2c74e549a899f380e0149bd5fb9e2122b7fc4c7d52689752e2e5e864736f6c63430005110032", - "sourceMap": "203:2614:14:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "203:2614:14:-;;;;;;;;", - "source": "// SPDX-License-Identifier: GPL-3.0-or-later\n\npragma solidity >=0.4.0;\n\nimport './Babylonian.sol';\n\n// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))\nlibrary FixedPoint {\n // range: [0, 2**112 - 1]\n // resolution: 1 / 2**112\n struct uq112x112 {\n uint224 _x;\n }\n\n // range: [0, 2**144 - 1]\n // resolution: 1 / 2**112\n struct uq144x112 {\n uint _x;\n }\n\n uint8 private constant RESOLUTION = 112;\n uint private constant Q112 = uint(1) << RESOLUTION;\n uint private constant Q224 = Q112 << RESOLUTION;\n\n // encode a uint112 as a UQ112x112\n function encode(uint112 x) internal pure returns (uq112x112 memory) {\n return uq112x112(uint224(x) << RESOLUTION);\n }\n\n // encodes a uint144 as a UQ144x112\n function encode144(uint144 x) internal pure returns (uq144x112 memory) {\n return uq144x112(uint256(x) << RESOLUTION);\n }\n\n // divide a UQ112x112 by a uint112, returning a UQ112x112\n function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) {\n require(x != 0, 'FixedPoint: DIV_BY_ZERO');\n return uq112x112(self._x / uint224(x));\n }\n\n // multiply a UQ112x112 by a uint, returning a UQ144x112\n // reverts on overflow\n function mul(uq112x112 memory self, uint y) internal pure returns (uq144x112 memory) {\n uint z;\n require(y == 0 || (z = uint(self._x) * y) / y == uint(self._x), \"FixedPoint: MULTIPLICATION_OVERFLOW\");\n return uq144x112(z);\n }\n\n // returns a UQ112x112 which represents the ratio of the numerator to the denominator\n // equivalent to encode(numerator).div(denominator)\n function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) {\n require(denominator > 0, \"FixedPoint: DIV_BY_ZERO\");\n return uq112x112((uint224(numerator) << RESOLUTION) / denominator);\n }\n\n // decode a UQ112x112 into a uint112 by truncating after the radix point\n function decode(uq112x112 memory self) internal pure returns (uint112) {\n return uint112(self._x >> RESOLUTION);\n }\n\n // decode a UQ144x112 into a uint144 by truncating after the radix point\n function decode144(uq144x112 memory self) internal pure returns (uint144) {\n return uint144(self._x >> RESOLUTION);\n }\n\n // take the reciprocal of a UQ112x112\n function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n require(self._x != 0, 'FixedPoint: ZERO_RECIPROCAL');\n return uq112x112(uint224(Q224 / self._x));\n }\n\n // square root of a UQ112x112\n function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x)) << 56));\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol", - "exportedSymbols": { - "FixedPoint": [ - 14270 - ] - }, - "id": 14271, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14043, - "literals": [ - "solidity", - ">=", - "0.4", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "46:24:14" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Babylonian.sol", - "file": "./Babylonian.sol", - "id": 14044, - "nodeType": "ImportDirective", - "scope": 14271, - "sourceUnit": 14042, - "src": "72:26:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 14270, - "linearizedBaseContracts": [ - 14270 - ], - "name": "FixedPoint", - "nodeType": "ContractDefinition", - "nodes": [ - { - "canonicalName": "FixedPoint.uq112x112", - "id": 14047, - "members": [ - { - "constant": false, - "id": 14046, - "name": "_x", - "nodeType": "VariableDeclaration", - "scope": 14047, - "src": "315:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "typeName": { - "id": 14045, - "name": "uint224", - "nodeType": "ElementaryTypeName", - "src": "315:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "uq112x112", - "nodeType": "StructDefinition", - "scope": 14270, - "src": "288:44:14", - "visibility": "public" - }, - { - "canonicalName": "FixedPoint.uq144x112", - "id": 14050, - "members": [ - { - "constant": false, - "id": 14049, - "name": "_x", - "nodeType": "VariableDeclaration", - "scope": 14050, - "src": "425:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14048, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "425:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "uq144x112", - "nodeType": "StructDefinition", - "scope": 14270, - "src": "398:41:14", - "visibility": "public" - }, - { - "constant": true, - "id": 14053, - "name": "RESOLUTION", - "nodeType": "VariableDeclaration", - "scope": 14270, - "src": "445:39:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 14051, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "445:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "313132", - "id": 14052, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "481:3:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_112_by_1", - "typeString": "int_const 112" - }, - "value": "112" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 14060, - "name": "Q112", - "nodeType": "VariableDeclaration", - "scope": 14270, - "src": "490:50:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14054, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "490:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 14056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "524:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 14055, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "519:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 14057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "519:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14058, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "530:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "519:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "private" - }, - { - "constant": true, - "id": 14065, - "name": "Q224", - "nodeType": "VariableDeclaration", - "scope": 14270, - "src": "546:47:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14061, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "546:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14064, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14062, - "name": "Q112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14060, - "src": "575:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14063, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "583:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "575:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 14080, - "nodeType": "Block", - "src": "707:59:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14074, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14067, - "src": "742:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "id": 14073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "734:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "734:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14076, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "748:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "734:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14072, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "724:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "724:35:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14071, - "id": 14079, - "nodeType": "Return", - "src": "717:42:14" - } - ] - }, - "documentation": null, - "id": 14081, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "encode", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14068, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14067, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14081, - "src": "655:9:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14066, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "655:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "654:11:14" - }, - "returnParameters": { - "id": 14071, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14070, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14081, - "src": "689:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14069, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "689:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "688:18:14" - }, - "scope": 14270, - "src": "639:127:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14096, - "nodeType": "Block", - "src": "883:59:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14090, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14083, - "src": "918:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - ], - "id": 14089, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "910:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 14091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "910:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14092, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "924:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "910:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14088, - "name": "uq144x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14050, - "src": "900:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq144x112_$14050_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq144x112 storage pointer)" - } - }, - "id": 14094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "900:35:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory", - "typeString": "struct FixedPoint.uq144x112 memory" - } - }, - "functionReturnParameters": 14087, - "id": 14095, - "nodeType": "Return", - "src": "893:42:14" - } - ] - }, - "documentation": null, - "id": 14097, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "encode144", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14084, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14083, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14097, - "src": "831:9:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - }, - "typeName": { - "id": 14082, - "name": "uint144", - "nodeType": "ElementaryTypeName", - "src": "831:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "830:11:14" - }, - "returnParameters": { - "id": 14087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14086, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14097, - "src": "865:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112" - }, - "typeName": { - "contractScope": null, - "id": 14085, - "name": "uq144x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14050, - "src": "865:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_storage_ptr", - "typeString": "struct FixedPoint.uq144x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "864:18:14" - }, - "scope": 14270, - "src": "812:130:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14122, - "nodeType": "Block", - "src": "1098:107:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "id": 14109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14107, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14101, - "src": "1116:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1121:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1116:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a204449565f42595f5a45524f", - "id": 14110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1124:25:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - }, - "value": "FixedPoint: DIV_BY_ZERO" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - } - ], - "id": 14106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "1108:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1108:42:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14112, - "nodeType": "ExpressionStatement", - "src": "1108:42:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14114, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14099, - "src": "1177:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14115, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1177:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14117, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14101, - "src": "1195:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "id": 14116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1187:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1187:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "src": "1177:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14113, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "1167:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1167:31:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14105, - "id": 14121, - "nodeType": "Return", - "src": "1160:38:14" - } - ] - }, - "documentation": null, - "id": 14123, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14102, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14099, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14123, - "src": "1023:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14098, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1023:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14101, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14123, - "src": "1046:9:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14100, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1046:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1022:34:14" - }, - "returnParameters": { - "id": 14105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14104, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14123, - "src": "1080:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14103, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1080:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1079:18:14" - }, - "scope": 14270, - "src": "1010:195:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14163, - "nodeType": "Block", - "src": "1384:164:14", - "statements": [ - { - "assignments": [ - 14133 - ], - "declarations": [ - { - "constant": false, - "id": 14133, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 14163, - "src": "1394:6:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14132, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1394:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14134, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "1394:6:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 14155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14136, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14127, - "src": "1418:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1423:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1418:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 14146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14139, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14133, - "src": "1429:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14141, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14125, - "src": "1438:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14142, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1438:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1433:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 14143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1433:13:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 14144, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14127, - "src": "1449:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1433:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1429:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 14147, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1428:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14148, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14127, - "src": "1454:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1428:27:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14151, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14125, - "src": "1464:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14152, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1464:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1459:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 14153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1459:13:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1428:44:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1418:54:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57", - "id": 14156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1474:37:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c49d28a1a0a9590848dc8e15e2ce94a0e18d974f72b2d7169c2f9169e1ee31e8", - "typeString": "literal_string \"FixedPoint: MULTIPLICATION_OVERFLOW\"" - }, - "value": "FixedPoint: MULTIPLICATION_OVERFLOW" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c49d28a1a0a9590848dc8e15e2ce94a0e18d974f72b2d7169c2f9169e1ee31e8", - "typeString": "literal_string \"FixedPoint: MULTIPLICATION_OVERFLOW\"" - } - ], - "id": 14135, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "1410:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1410:102:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14158, - "nodeType": "ExpressionStatement", - "src": "1410:102:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14160, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14133, - "src": "1539:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14159, - "name": "uq144x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14050, - "src": "1529:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq144x112_$14050_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq144x112 storage pointer)" - } - }, - "id": 14161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1529:12:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory", - "typeString": "struct FixedPoint.uq144x112 memory" - } - }, - "functionReturnParameters": 14131, - "id": 14162, - "nodeType": "Return", - "src": "1522:19:14" - } - ] - }, - "documentation": null, - "id": 14164, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14128, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14125, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14164, - "src": "1312:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14124, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1312:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14127, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 14164, - "src": "1335:6:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14126, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1335:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1311:31:14" - }, - "returnParameters": { - "id": 14131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14130, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14164, - "src": "1366:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112" - }, - "typeName": { - "contractScope": null, - "id": 14129, - "name": "uq144x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14050, - "src": "1366:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_storage_ptr", - "typeString": "struct FixedPoint.uq144x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1365:18:14" - }, - "scope": 14270, - "src": "1299:249:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14191, - "nodeType": "Block", - "src": "1799:144:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "id": 14176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14174, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14168, - "src": "1817:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14175, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1831:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1817:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a204449565f42595f5a45524f", - "id": 14177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1834:25:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - }, - "value": "FixedPoint: DIV_BY_ZERO" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - } - ], - "id": 14173, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "1809:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1809:51:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14179, - "nodeType": "ExpressionStatement", - "src": "1809:51:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14182, - "name": "numerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14166, - "src": "1896:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "id": 14181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1888:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1888:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14184, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "1910:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "1888:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "id": 14186, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1887:34:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14187, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14168, - "src": "1924:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "src": "1887:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14180, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "1877:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1877:59:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14172, - "id": 14190, - "nodeType": "Return", - "src": "1870:66:14" - } - ] - }, - "documentation": null, - "id": 14192, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fraction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14169, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14166, - "name": "numerator", - "nodeType": "VariableDeclaration", - "scope": 14192, - "src": "1718:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14165, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1718:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14168, - "name": "denominator", - "nodeType": "VariableDeclaration", - "scope": 14192, - "src": "1737:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14167, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1737:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1717:40:14" - }, - "returnParameters": { - "id": 14172, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14171, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14192, - "src": "1781:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14170, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1781:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:18:14" - }, - "scope": 14270, - "src": "1700:243:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14206, - "nodeType": "Block", - "src": "2097:54:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14200, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14194, - "src": "2122:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14201, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2122:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "id": 14202, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "2133:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "2122:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2114:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint112_$", - "typeString": "type(uint112)" - }, - "typeName": "uint112" - }, - "id": 14204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2114:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "functionReturnParameters": 14198, - "id": 14205, - "nodeType": "Return", - "src": "2107:37:14" - } - ] - }, - "documentation": null, - "id": 14207, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decode", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14194, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14207, - "src": "2042:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14193, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2042:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2041:23:14" - }, - "returnParameters": { - "id": 14198, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14197, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14207, - "src": "2088:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14196, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "2088:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2087:9:14" - }, - "scope": 14270, - "src": "2026:125:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14221, - "nodeType": "Block", - "src": "2308:54:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14215, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14209, - "src": "2333:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112 memory" - } - }, - "id": 14216, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14049, - "src": "2333:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "id": 14217, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "2344:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "2333:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2325:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint144_$", - "typeString": "type(uint144)" - }, - "typeName": "uint144" - }, - "id": 14219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2325:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "functionReturnParameters": 14213, - "id": 14220, - "nodeType": "Return", - "src": "2318:37:14" - } - ] - }, - "documentation": null, - "id": 14222, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decode144", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14210, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14209, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14222, - "src": "2253:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112" - }, - "typeName": { - "contractScope": null, - "id": 14208, - "name": "uq144x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14050, - "src": "2253:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_storage_ptr", - "typeString": "struct FixedPoint.uq144x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2252:23:14" - }, - "returnParameters": { - "id": 14213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14212, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14222, - "src": "2299:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - }, - "typeName": { - "id": 14211, - "name": "uint144", - "nodeType": "ElementaryTypeName", - "src": "2299:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2298:9:14" - }, - "scope": 14270, - "src": "2234:128:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14246, - "nodeType": "Block", - "src": "2494:120:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14230, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14224, - "src": "2512:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14231, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2512:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2523:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2512:12:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a205a45524f5f5245434950524f43414c", - "id": 14234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2526:29:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_43c6fe054a2c2008a0c5b0d1940d576de140447d22d0753abd129ca5f43acb8b", - "typeString": "literal_string \"FixedPoint: ZERO_RECIPROCAL\"" - }, - "value": "FixedPoint: ZERO_RECIPROCAL" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_43c6fe054a2c2008a0c5b0d1940d576de140447d22d0753abd129ca5f43acb8b", - "typeString": "literal_string \"FixedPoint: ZERO_RECIPROCAL\"" - } - ], - "id": 14229, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "2504:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2504:52:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14236, - "nodeType": "ExpressionStatement", - "src": "2504:52:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14239, - "name": "Q224", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14065, - "src": "2591:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14240, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14224, - "src": "2598:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14241, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2598:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "src": "2591:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2583:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2583:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14237, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "2573:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2573:34:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14228, - "id": 14245, - "nodeType": "Return", - "src": "2566:41:14" - } - ] - }, - "documentation": null, - "id": 14247, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "reciprocal", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14224, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14247, - "src": "2430:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14223, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2430:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2429:23:14" - }, - "returnParameters": { - "id": 14228, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14227, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14247, - "src": "2476:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14226, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2476:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2475:18:14" - }, - "scope": 14270, - "src": "2410:204:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14268, - "nodeType": "Block", - "src": "2732:83:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14259, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14249, - "src": "2791:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14260, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2791:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2783:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 14261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2783:16:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14256, - "name": "Babylonian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14041, - "src": "2767:10:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Babylonian_$14041_$", - "typeString": "type(library Babylonian)" - } - }, - "id": 14257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sqrt", - "nodeType": "MemberAccess", - "referencedDeclaration": 14040, - "src": "2767:15:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) pure returns (uint256)" - } - }, - "id": 14262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2767:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3536", - "id": 14263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2804:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_56_by_1", - "typeString": "int_const 56" - }, - "value": "56" - }, - "src": "2767:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2759:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2759:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14254, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "2749:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2749:59:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14253, - "id": 14267, - "nodeType": "Return", - "src": "2742:66:14" - } - ] - }, - "documentation": null, - "id": 14269, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sqrt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14250, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14249, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14269, - "src": "2668:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14248, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2668:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2667:23:14" - }, - "returnParameters": { - "id": 14253, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14252, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14269, - "src": "2714:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14251, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2714:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2713:18:14" - }, - "scope": 14270, - "src": "2654:161:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 14271, - "src": "203:2614:14" - } - ], - "src": "46:2772:14" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol", - "exportedSymbols": { - "FixedPoint": [ - 14270 - ] - }, - "id": 14271, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14043, - "literals": [ - "solidity", - ">=", - "0.4", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "46:24:14" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Babylonian.sol", - "file": "./Babylonian.sol", - "id": 14044, - "nodeType": "ImportDirective", - "scope": 14271, - "sourceUnit": 14042, - "src": "72:26:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 14270, - "linearizedBaseContracts": [ - 14270 - ], - "name": "FixedPoint", - "nodeType": "ContractDefinition", - "nodes": [ - { - "canonicalName": "FixedPoint.uq112x112", - "id": 14047, - "members": [ - { - "constant": false, - "id": 14046, - "name": "_x", - "nodeType": "VariableDeclaration", - "scope": 14047, - "src": "315:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "typeName": { - "id": 14045, - "name": "uint224", - "nodeType": "ElementaryTypeName", - "src": "315:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "uq112x112", - "nodeType": "StructDefinition", - "scope": 14270, - "src": "288:44:14", - "visibility": "public" - }, - { - "canonicalName": "FixedPoint.uq144x112", - "id": 14050, - "members": [ - { - "constant": false, - "id": 14049, - "name": "_x", - "nodeType": "VariableDeclaration", - "scope": 14050, - "src": "425:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14048, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "425:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "uq144x112", - "nodeType": "StructDefinition", - "scope": 14270, - "src": "398:41:14", - "visibility": "public" - }, - { - "constant": true, - "id": 14053, - "name": "RESOLUTION", - "nodeType": "VariableDeclaration", - "scope": 14270, - "src": "445:39:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 14051, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "445:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "313132", - "id": 14052, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "481:3:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_112_by_1", - "typeString": "int_const 112" - }, - "value": "112" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 14060, - "name": "Q112", - "nodeType": "VariableDeclaration", - "scope": 14270, - "src": "490:50:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14054, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "490:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 14056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "524:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 14055, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "519:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 14057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "519:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14058, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "530:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "519:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "private" - }, - { - "constant": true, - "id": 14065, - "name": "Q224", - "nodeType": "VariableDeclaration", - "scope": 14270, - "src": "546:47:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14061, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "546:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14064, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14062, - "name": "Q112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14060, - "src": "575:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14063, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "583:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "575:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 14080, - "nodeType": "Block", - "src": "707:59:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14074, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14067, - "src": "742:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "id": 14073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "734:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "734:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14076, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "748:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "734:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14072, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "724:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "724:35:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14071, - "id": 14079, - "nodeType": "Return", - "src": "717:42:14" - } - ] - }, - "documentation": null, - "id": 14081, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "encode", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14068, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14067, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14081, - "src": "655:9:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14066, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "655:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "654:11:14" - }, - "returnParameters": { - "id": 14071, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14070, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14081, - "src": "689:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14069, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "689:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "688:18:14" - }, - "scope": 14270, - "src": "639:127:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14096, - "nodeType": "Block", - "src": "883:59:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14090, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14083, - "src": "918:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - ], - "id": 14089, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "910:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 14091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "910:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14092, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "924:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "910:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14088, - "name": "uq144x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14050, - "src": "900:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq144x112_$14050_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq144x112 storage pointer)" - } - }, - "id": 14094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "900:35:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory", - "typeString": "struct FixedPoint.uq144x112 memory" - } - }, - "functionReturnParameters": 14087, - "id": 14095, - "nodeType": "Return", - "src": "893:42:14" - } - ] - }, - "documentation": null, - "id": 14097, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "encode144", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14084, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14083, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14097, - "src": "831:9:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - }, - "typeName": { - "id": 14082, - "name": "uint144", - "nodeType": "ElementaryTypeName", - "src": "831:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "830:11:14" - }, - "returnParameters": { - "id": 14087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14086, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14097, - "src": "865:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112" - }, - "typeName": { - "contractScope": null, - "id": 14085, - "name": "uq144x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14050, - "src": "865:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_storage_ptr", - "typeString": "struct FixedPoint.uq144x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "864:18:14" - }, - "scope": 14270, - "src": "812:130:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14122, - "nodeType": "Block", - "src": "1098:107:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "id": 14109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14107, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14101, - "src": "1116:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1121:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1116:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a204449565f42595f5a45524f", - "id": 14110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1124:25:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - }, - "value": "FixedPoint: DIV_BY_ZERO" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - } - ], - "id": 14106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "1108:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1108:42:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14112, - "nodeType": "ExpressionStatement", - "src": "1108:42:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14114, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14099, - "src": "1177:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14115, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1177:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14117, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14101, - "src": "1195:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "id": 14116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1187:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1187:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "src": "1177:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14113, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "1167:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1167:31:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14105, - "id": 14121, - "nodeType": "Return", - "src": "1160:38:14" - } - ] - }, - "documentation": null, - "id": 14123, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14102, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14099, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14123, - "src": "1023:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14098, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1023:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14101, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 14123, - "src": "1046:9:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14100, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1046:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1022:34:14" - }, - "returnParameters": { - "id": 14105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14104, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14123, - "src": "1080:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14103, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1080:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1079:18:14" - }, - "scope": 14270, - "src": "1010:195:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14163, - "nodeType": "Block", - "src": "1384:164:14", - "statements": [ - { - "assignments": [ - 14133 - ], - "declarations": [ - { - "constant": false, - "id": 14133, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 14163, - "src": "1394:6:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14132, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1394:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14134, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "1394:6:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 14155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14136, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14127, - "src": "1418:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1423:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1418:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 14146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 14139, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14133, - "src": "1429:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14141, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14125, - "src": "1438:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14142, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1438:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1433:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 14143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1433:13:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 14144, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14127, - "src": "1449:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1433:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1429:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 14147, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1428:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14148, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14127, - "src": "1454:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1428:27:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14151, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14125, - "src": "1464:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14152, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1464:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1459:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 14153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1459:13:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1428:44:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1418:54:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57", - "id": 14156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1474:37:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c49d28a1a0a9590848dc8e15e2ce94a0e18d974f72b2d7169c2f9169e1ee31e8", - "typeString": "literal_string \"FixedPoint: MULTIPLICATION_OVERFLOW\"" - }, - "value": "FixedPoint: MULTIPLICATION_OVERFLOW" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c49d28a1a0a9590848dc8e15e2ce94a0e18d974f72b2d7169c2f9169e1ee31e8", - "typeString": "literal_string \"FixedPoint: MULTIPLICATION_OVERFLOW\"" - } - ], - "id": 14135, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "1410:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1410:102:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14158, - "nodeType": "ExpressionStatement", - "src": "1410:102:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14160, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14133, - "src": "1539:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14159, - "name": "uq144x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14050, - "src": "1529:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq144x112_$14050_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq144x112 storage pointer)" - } - }, - "id": 14161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1529:12:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory", - "typeString": "struct FixedPoint.uq144x112 memory" - } - }, - "functionReturnParameters": 14131, - "id": 14162, - "nodeType": "Return", - "src": "1522:19:14" - } - ] - }, - "documentation": null, - "id": 14164, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14128, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14125, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14164, - "src": "1312:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14124, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1312:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14127, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 14164, - "src": "1335:6:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14126, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1335:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1311:31:14" - }, - "returnParameters": { - "id": 14131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14130, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14164, - "src": "1366:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112" - }, - "typeName": { - "contractScope": null, - "id": 14129, - "name": "uq144x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14050, - "src": "1366:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_storage_ptr", - "typeString": "struct FixedPoint.uq144x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1365:18:14" - }, - "scope": 14270, - "src": "1299:249:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14191, - "nodeType": "Block", - "src": "1799:144:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "id": 14176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14174, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14168, - "src": "1817:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14175, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1831:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1817:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a204449565f42595f5a45524f", - "id": 14177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1834:25:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - }, - "value": "FixedPoint: DIV_BY_ZERO" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb797fc20bb06d860bbe348d99030bb226d980421b724f94accde8487e338e12", - "typeString": "literal_string \"FixedPoint: DIV_BY_ZERO\"" - } - ], - "id": 14173, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "1809:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1809:51:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14179, - "nodeType": "ExpressionStatement", - "src": "1809:51:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14182, - "name": "numerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14166, - "src": "1896:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "id": 14181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1888:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1888:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 14184, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "1910:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "1888:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "id": 14186, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1887:34:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14187, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14168, - "src": "1924:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "src": "1887:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14180, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "1877:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1877:59:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14172, - "id": 14190, - "nodeType": "Return", - "src": "1870:66:14" - } - ] - }, - "documentation": null, - "id": 14192, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fraction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14169, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14166, - "name": "numerator", - "nodeType": "VariableDeclaration", - "scope": 14192, - "src": "1718:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14165, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1718:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14168, - "name": "denominator", - "nodeType": "VariableDeclaration", - "scope": 14192, - "src": "1737:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14167, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1737:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1717:40:14" - }, - "returnParameters": { - "id": 14172, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14171, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14192, - "src": "1781:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14170, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "1781:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:18:14" - }, - "scope": 14270, - "src": "1700:243:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14206, - "nodeType": "Block", - "src": "2097:54:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14200, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14194, - "src": "2122:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14201, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2122:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "id": 14202, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "2133:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "2122:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2114:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint112_$", - "typeString": "type(uint112)" - }, - "typeName": "uint112" - }, - "id": 14204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2114:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "functionReturnParameters": 14198, - "id": 14205, - "nodeType": "Return", - "src": "2107:37:14" - } - ] - }, - "documentation": null, - "id": 14207, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decode", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14194, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14207, - "src": "2042:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14193, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2042:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2041:23:14" - }, - "returnParameters": { - "id": 14198, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14197, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14207, - "src": "2088:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14196, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "2088:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2087:9:14" - }, - "scope": 14270, - "src": "2026:125:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14221, - "nodeType": "Block", - "src": "2308:54:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14215, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14209, - "src": "2333:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112 memory" - } - }, - "id": 14216, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14049, - "src": "2333:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "id": 14217, - "name": "RESOLUTION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14053, - "src": "2344:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "2333:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2325:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint144_$", - "typeString": "type(uint144)" - }, - "typeName": "uint144" - }, - "id": 14219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2325:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "functionReturnParameters": 14213, - "id": 14220, - "nodeType": "Return", - "src": "2318:37:14" - } - ] - }, - "documentation": null, - "id": 14222, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decode144", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14210, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14209, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14222, - "src": "2253:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_memory_ptr", - "typeString": "struct FixedPoint.uq144x112" - }, - "typeName": { - "contractScope": null, - "id": 14208, - "name": "uq144x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14050, - "src": "2253:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14050_storage_ptr", - "typeString": "struct FixedPoint.uq144x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2252:23:14" - }, - "returnParameters": { - "id": 14213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14212, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14222, - "src": "2299:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - }, - "typeName": { - "id": 14211, - "name": "uint144", - "nodeType": "ElementaryTypeName", - "src": "2299:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2298:9:14" - }, - "scope": 14270, - "src": "2234:128:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14246, - "nodeType": "Block", - "src": "2494:120:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - }, - "id": 14233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14230, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14224, - "src": "2512:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14231, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2512:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2523:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2512:12:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4669786564506f696e743a205a45524f5f5245434950524f43414c", - "id": 14234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2526:29:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_43c6fe054a2c2008a0c5b0d1940d576de140447d22d0753abd129ca5f43acb8b", - "typeString": "literal_string \"FixedPoint: ZERO_RECIPROCAL\"" - }, - "value": "FixedPoint: ZERO_RECIPROCAL" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_43c6fe054a2c2008a0c5b0d1940d576de140447d22d0753abd129ca5f43acb8b", - "typeString": "literal_string \"FixedPoint: ZERO_RECIPROCAL\"" - } - ], - "id": 14229, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "2504:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2504:52:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14236, - "nodeType": "ExpressionStatement", - "src": "2504:52:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14239, - "name": "Q224", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14065, - "src": "2591:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14240, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14224, - "src": "2598:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14241, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2598:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - }, - "src": "2591:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2583:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2583:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14237, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "2573:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2573:34:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14228, - "id": 14245, - "nodeType": "Return", - "src": "2566:41:14" - } - ] - }, - "documentation": null, - "id": 14247, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "reciprocal", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14224, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14247, - "src": "2430:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14223, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2430:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2429:23:14" - }, - "returnParameters": { - "id": 14228, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14227, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14247, - "src": "2476:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14226, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2476:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2475:18:14" - }, - "scope": 14270, - "src": "2410:204:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14268, - "nodeType": "Block", - "src": "2732:83:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14259, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14249, - "src": "2791:4:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 14260, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "2791:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2783:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 14261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2783:16:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14256, - "name": "Babylonian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14041, - "src": "2767:10:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Babylonian_$14041_$", - "typeString": "type(library Babylonian)" - } - }, - "id": 14257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sqrt", - "nodeType": "MemberAccess", - "referencedDeclaration": 14040, - "src": "2767:15:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) pure returns (uint256)" - } - }, - "id": 14262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2767:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3536", - "id": 14263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2804:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_56_by_1", - "typeString": "int_const 56" - }, - "value": "56" - }, - "src": "2767:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2759:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 14265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2759:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 14254, - "name": "uq112x112", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14047, - "src": "2749:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14047_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 14266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2749:59:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "functionReturnParameters": 14253, - "id": 14267, - "nodeType": "Return", - "src": "2742:66:14" - } - ] - }, - "documentation": null, - "id": 14269, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sqrt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14250, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14249, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 14269, - "src": "2668:21:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14248, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2668:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2667:23:14" - }, - "returnParameters": { - "id": 14253, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14252, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14269, - "src": "2714:16:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 14251, - "name": "uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14047, - "src": "2714:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2713:18:14" - }, - "scope": 14270, - "src": "2654:161:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 14271, - "src": "203:2614:14" - } - ], - "src": "46:2772:14" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-09T23:21:18.183Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/GovernorAlpha.json b/build/contracts/GovernorAlpha.json deleted file mode 100644 index d7b081d..0000000 --- a/build/contracts/GovernorAlpha.json +++ /dev/null @@ -1,35122 +0,0 @@ -{ - "contractName": "GovernorAlpha", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "timelock_", - "type": "address" - }, - { - "internalType": "address", - "name": "yam_", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ProposalQueued", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "latestProposalIds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "proposalCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "proposals", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "canceled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "timelock", - "outputs": [ - { - "internalType": "contract TimelockInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract YAMInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "quorumVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "proposalMaxOperations", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "queue", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "cancel", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getActions", - "outputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "getReceipt", - "outputs": [ - { - "components": [ - { - "internalType": "bool", - "name": "hasVoted", - "type": "bool" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "internalType": "struct GovernorAlpha.Receipt", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum GovernorAlpha.ProposalState", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - } - ], - "name": "castVote", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "__acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "__abdicate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "__queueSetTimelockPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "__executeSetTimelockPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"timelock_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"yam_\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProposalCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"signatures\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ProposalQueued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"support\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"BALLOT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"__abdicate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"__acceptAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"__executeSetTimelockPendingAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"__queueSetTimelockPendingAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"cancel\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"support\",\"type\":\"bool\"}],\"name\":\"castVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"support\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"castVoteBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"getActions\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"string[]\",\"name\":\"signatures\",\"type\":\"string[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"getReceipt\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"hasVoted\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"support\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"internalType\":\"struct GovernorAlpha.Receipt\",\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"latestProposalIds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposalCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposalMaxOperations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposalThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"againstVotes\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"canceled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"string[]\",\"name\":\"signatures\",\"type\":\"string[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"propose\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"queue\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"quorumVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"state\",\"outputs\":[{\"internalType\":\"enum GovernorAlpha.ProposalState\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"timelock\",\"outputs\":[{\"internalType\":\"contract TimelockInterface\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"votingDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract YAMInterface\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{\"proposalMaxOperations()\":{\"notice\":\"The maximum number of actions that can be included in a proposal\"},\"proposalThreshold()\":{\"notice\":\"The number of votes required in order for a voter to become a proposer\"},\"quorumVotes()\":{\"notice\":\"The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\"},\"votingDelay()\":{\"notice\":\"The delay before voting on a proposal may take place, once proposed\"},\"votingPeriod()\":{\"notice\":\"The duration of voting on a proposal, in blocks\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol\":\"GovernorAlpha\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol\":{\"keccak256\":\"0xe33570626516b9d9723cdbf39fb280fbcb93e2bab6ef12c50caff7b83b6e5cba\",\"urls\":[\"bzz-raw://28ce1776967b85b9a12e2aaaf272f956ed88f0ea720f9b91090ee0b2ffb8b7a4\",\"dweb:/ipfs/QmRbswdZGcxpfpy26K8KEdnoPDTVzBwDEDHULgdTbqopRF\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620042d5380380620042d5833981016040819052620000349162000089565b600080546001600160a01b039384166001600160a01b0319918216179091556001805492909316918116919091179091556002805490911633179055620000f4565b80516200008381620000da565b92915050565b600080604083850312156200009d57600080fd5b6000620000ab858562000076565b9250506020620000be8582860162000076565b9150509250929050565b60006001600160a01b03821662000083565b620000e581620000c8565b8114620000f157600080fd5b50565b6141d180620001046000396000f3fe6080604052600436106101ac5760003560e01c8063452a9320116100ec578063d33219b41161008a578063ddf0b00911610064578063ddf0b00914610473578063deaaa7cc14610493578063e23a9a52146104a8578063fe0d94c1146104d5576101ac565b8063d33219b414610429578063da35c6641461043e578063da95691a14610453576101ac565b80637bdbe4d0116100c65780637bdbe4d0146103ca57806391500671146103df578063b58131b0146103ff578063b9a6196114610414576101ac565b8063452a9320146103735780634634c61f14610395578063760fbc13146103b5576101ac565b806320606b7011610159578063328dd98211610133578063328dd982146102e15780633932abb1146103115780633e4f49e61461032657806340e58ee514610353576101ac565b806320606b701461029757806321f43e42146102ac57806324bc1a64146102cc576101ac565b8063071c03321161018a578063071c03321461023357806315373e3d1461025557806317977c6114610277576101ac565b8063013cf08b146101b157806302a251a3146101ef57806306fdde0314610211575b600080fd5b3480156101bd57600080fd5b506101d16101cc366004612c31565b6104e8565b6040516101e699989796959493929190613f53565b60405180910390f35b3480156101fb57600080fd5b5061020461054e565b6040516101e69190613c7d565b34801561021d57600080fd5b50610226610555565b6040516101e69190613d2c565b34801561023f57600080fd5b5061024861058e565b6040516101e69190613d10565b34801561026157600080fd5b50610275610270366004612c7f565b6105aa565b005b34801561028357600080fd5b50610204610292366004612a74565b6105b9565b3480156102a357600080fd5b506102046105cb565b3480156102b857600080fd5b506102756102c7366004612a9a565b6105e2565b3480156102d857600080fd5b5061020461071b565b3480156102ed57600080fd5b506103016102fc366004612c31565b6107d6565b6040516101e69493929190613c30565b34801561031d57600080fd5b50610204610aae565b34801561033257600080fd5b50610346610341366004612c31565b610ab3565b6040516101e69190613d1e565b34801561035f57600080fd5b5061027561036e366004612c31565b610c75565b34801561037f57600080fd5b50610388610f5b565b6040516101e69190613ada565b3480156103a157600080fd5b506102756103b0366004612caf565b610f77565b3480156103c157600080fd5b50610275611159565b3480156103d657600080fd5b506102046111d4565b3480156103eb57600080fd5b506102756103fa366004612a9a565b6111d9565b34801561040b57600080fd5b506102046112e2565b34801561042057600080fd5b50610275611387565b34801561043557600080fd5b50610248611459565b34801561044a57600080fd5b50610204611475565b34801561045f57600080fd5b5061020461046e366004612ad4565b61147b565b34801561047f57600080fd5b5061027561048e366004612c31565b61197e565b34801561049f57600080fd5b50610204611c71565b3480156104b457600080fd5b506104c86104c3366004612c4f565b611c7d565b6040516101e69190613e9d565b6102756104e3366004612c31565b611cee565b6004602052600090815260409020805460018201546002830154600784015460088501546009860154600a870154600b90970154959673ffffffffffffffffffffffffffffffffffffffff90951695939492939192909160ff8082169161010090041689565b6143805b90565b6040518060400160405280601281526020017f59414d20476f7665726e6f7220416c706861000000000000000000000000000081525081565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6105b5338383611f22565b5050565b60056020526000908152604090205481565b6040516105d790613ac4565b604051809103902081565b60025473ffffffffffffffffffffffffffffffffffffffff16331461063c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d6d565b60405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff90911691630825f38f91839190610673908790602001613ada565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016106a29493929190613b03565b600060405180830381600087803b1580156106bc57600080fd5b505af11580156106d0573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107169190810190612bfc565b505050565b60006107d16107ca600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397d63f936040518163ffffffff1660e01b815260040160206040518083038186803b15801561078b57600080fd5b505afa15801561079f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107c39190810190612bde565b6004612160565b60646121bb565b905090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561086557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161083a575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156108b757602002820191906000526020600020905b8154815260200190600101908083116108a3575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156109a85760008481526020908190208301805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001871615020190941693909304928301859004850281018501909152818152928301828280156109945780601f1061096957610100808354040283529160200191610994565b820191906000526020600020905b81548152906001019060200180831161097757829003601f168201915b5050505050815260200190600101906108df565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610a985760008481526020908190208301805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a845780601f10610a5957610100808354040283529160200191610a84565b820191906000526020600020905b815481529060010190602001808311610a6757829003601f168201915b5050505050815260200190600101906109cf565b5050505090509450945094509450509193509193565b600190565b60008160035410158015610ac75750600082115b610afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d7d565b6000828152600460205260409020600b81015460ff1615610b22576002915050610c70565b80600701544311610b37576000915050610c70565b80600801544311610b4c576001915050610c70565b80600a01548160090154111580610b6d5750610b6661071b565b8160090154105b15610b7c576003915050610c70565b6002810154610b8f576004915050610c70565b600b810154610100900460ff1615610bab576007915050610c70565b6002810154600054604080517fc1a287e20000000000000000000000000000000000000000000000000000000081529051610c5a939273ffffffffffffffffffffffffffffffffffffffff169163c1a287e2916004808301926020929190829003018186803b158015610c1d57600080fd5b505afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c559190810190612bde565b6121fd565b4210610c6a576006915050610c70565b60059150505b919050565b6000610c8082610ab3565b90506007816007811115610c9057fe5b1415610cc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e5d565b600082815260046020526040902060025473ffffffffffffffffffffffffffffffffffffffff16331480610da45750610cff6112e2565b600180548382015473ffffffffffffffffffffffffffffffffffffffff9182169263782d6fe19290911690610d3590439061223c565b6040518363ffffffff1660e01b8152600401610d52929190613b52565b60206040518083038186803b158015610d6a57600080fd5b505afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610da29190810190612bde565b105b610dda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dfd565b600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560005b6003820154811015610f1e5760005460038301805473ffffffffffffffffffffffffffffffffffffffff9092169163591fcdfe919084908110610e4957fe5b60009182526020909120015460048501805473ffffffffffffffffffffffffffffffffffffffff9092169185908110610e7e57fe5b9060005260206000200154856005018581548110610e9857fe5b90600052602060002001866006018681548110610eb157fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610ee0959493929190613bef565b600060405180830381600087803b158015610efa57600080fd5b505af1158015610f0e573d6000803e3d6000fd5b505060019092019150610e0a9050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610f4e9190613c7d565b60405180910390a1505050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b6000604051610f8590613ac4565b60408051918290038220828201909152601282527f59414d20476f7665726e6f7220416c70686100000000000000000000000000006020909201919091527f63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9610fec61227e565b306040516020016110009493929190613c8b565b604051602081830303815290604052805190602001209050600060405161102690613acf565b60405190819003812061103f9189908990602001613cc0565b6040516020818303038152906040528051906020012090506000828260405160200161106c929190613a93565b6040516020818303038152906040528051906020012090506000600182888888604051600081526020016040526040516110a99493929190613ce8565b6020604051602081039080840390855afa1580156110cb573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611143576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e3d565b61114e818a8a611f22565b505050505050505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146111aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e8d565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600a90565b60025473ffffffffffffffffffffffffffffffffffffffff16331461122a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dad565b6000805460405173ffffffffffffffffffffffffffffffffffffffff90911691633a66f90191839190611261908790602001613ada565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016112909493929190613b03565b602060405180830381600087803b1580156112aa57600080fd5b505af11580156112be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107169190810190612bde565b60006107d1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397d63f936040518163ffffffff1660e01b815260040160206040518083038186803b15801561134f57600080fd5b505afa158015611363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107ca9190810190612bde565b60025473ffffffffffffffffffffffffffffffffffffffff1633146113d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d3d565b60008054604080517f0e18b681000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692630e18b6819260048084019382900301818387803b15801561143f57600080fd5b505af1158015611453573d6000803e3d6000fd5b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60006114856112e2565b6001805473ffffffffffffffffffffffffffffffffffffffff169063782d6fe19033906114b390439061223c565b6040518363ffffffff1660e01b81526004016114d0929190613ae8565b60206040518083038186803b1580156114e857600080fd5b505afa1580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506115209190810190612bde565b11611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e2d565b84518651148015611569575083518651145b8015611576575082518651145b6115ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613ddd565b85516115e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e1d565b6115ec6111d4565b86511115611626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dbd565b3360009081526005602052604090205480156116d757600061164782610ab3565b9050600181600781111561165757fe5b141561168f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e4d565b600081600781111561169d57fe5b14156116d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d9d565b505b60006116e543610c55610aae565b905060006116f582610c5561054e565b600380546001019055905061170861247f565b604051806101a0016040528060035481526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060046000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003019080519060200190611812929190612501565b506080820151805161182e91600484019160209091019061258b565b5060a0820151805161184a9160058401916020909101906125d2565b5060c0820151805161186691600684019160209091019061262b565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff02191690831515021790555061018082015181600b0160016101000a81548160ff021916908315150217905550905050806000015160056000836020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e60405161196699989796959493929190613eab565b60405180910390a15193505050505b95945050505050565b600461198982610ab3565b600781111561199457fe5b146119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d4d565b6000818152600460208181526040808420845482517f6a42b8f80000000000000000000000000000000000000000000000000000000081529251919594611a4694429473ffffffffffffffffffffffffffffffffffffffff90931693636a42b8f8938084019390829003018186803b158015610c1d57600080fd5b905060005b6003830154811015611c3757611c2f836003018281548110611a6957fe5b60009182526020909120015460048501805473ffffffffffffffffffffffffffffffffffffffff9092169184908110611a9e57fe5b9060005260206000200154856005018481548110611ab857fe5b600091825260209182902001805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600187161502019094169390930492830185900485028101850190915281815292830182828015611b645780601f10611b3957610100808354040283529160200191611b64565b820191906000526020600020905b815481529060010190602001808311611b4757829003601f168201915b5050505050866006018581548110611b7857fe5b600091825260209182902001805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600187161502019094169390930492830185900485028101850190915281815292830182828015611c245780601f10611bf957610100808354040283529160200191611c24565b820191906000526020600020905b815481529060010190602001808311611c0757829003601f168201915b505050505086612282565b600101611a4b565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610f4e9085908490613fd9565b6040516105d790613acf565b611c85612684565b50600082815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452600c018252918290208251606081018452815460ff808216151583526101009091041615159281019290925260010154918101919091525b92915050565b6005611cf982610ab3565b6007811115611d0457fe5b14611d3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d5d565b6000818152600460205260408120600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055905b6003820154811015611ee65760005460048301805473ffffffffffffffffffffffffffffffffffffffff90921691630825f38f919084908110611db857fe5b9060005260206000200154846003018481548110611dd257fe5b60009182526020909120015460048601805473ffffffffffffffffffffffffffffffffffffffff9092169186908110611e0757fe5b9060005260206000200154866005018681548110611e2157fe5b90600052602060002001876006018781548110611e3a57fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611e69959493929190613bef565b6000604051808303818588803b158015611e8257600080fd5b505af1158015611e96573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611edd9190810190612bfc565b50600101611d79565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051611f169190613c7d565b60405180910390a15050565b6001611f2d83610ab3565b6007811115611f3857fe5b14611f6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e6d565b600082815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452600c8101909252909120805460ff1615611fdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d8d565b60015460078301546040517f782d6fe100000000000000000000000000000000000000000000000000000000815260009273ffffffffffffffffffffffffffffffffffffffff169163782d6fe19161203b918a91600401613b52565b60206040518083038186803b15801561205357600080fd5b505afa158015612067573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061208b9190810190612bde565b905083156120ab576120a18360090154826121fd565b60098401556120bf565b6120b983600a0154826121fd565b600a8401555b815460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090911681177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008615150217835582018190556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690612150908890889088908690613b60565b60405180910390a1505050505050565b60008261216f57506000611ce8565b8282028284828161217c57fe5b04146121b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613ded565b9392505050565b60006121b483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061242e565b6000828201838110156121b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dcd565b600082821115612278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e7d565b50900390565b4690565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091169063f2b06537906122bd9088908890889088908890602001613b95565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016122ef9190613c7d565b60206040518083038186803b15801561230757600080fd5b505afa15801561231b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061233f9190810190612bc0565b15612376576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e0d565b6000546040517f3a66f90100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633a66f901906123d49088908890889088908890600401613b95565b602060405180830381600087803b1580156123ee57600080fd5b505af1158015612402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506124269190810190612bde565b505050505050565b60008183612469576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106339190613d2c565b50600083858161247557fe5b0495945050505050565b604051806101a0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b82805482825590600052602060002090810192821561257b579160200282015b8281111561257b57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190612521565b506125879291506126a4565b5090565b8280548282559060005260206000209081019282156125c6579160200282015b828111156125c65782518255916020019190600101906125ab565b506125879291506126e0565b82805482825590600052602060002090810192821561261f579160200282015b8281111561261f578251805161260f9184916020909101906126fa565b50916020019190600101906125f2565b50612587929150612767565b828054828255906000526020600020908101928215612678579160200282015b8281111561267857825180516126689184916020909101906126fa565b509160200191906001019061264b565b5061258792915061278a565b604080516060810182526000808252602082018190529181019190915290565b61055291905b808211156125875780547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001016126aa565b61055291905b8082111561258757600081556001016126e6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061273b57805160ff19168380011785556125c6565b828001600101855582156125c657918201828111156125c65782518255916020019190600101906125ab565b61055291905b8082111561258757600061278182826127ad565b5060010161276d565b61055291905b808211156125875760006127a482826127ad565b50600101612790565b50805460018160011615610100020316600290046000825580601f106127d357506127f1565b601f0160209004906000526020600020908101906127f191906126e0565b50565b8035611ce88161415f565b600082601f83011261281057600080fd5b813561282361281e8261400e565b613fe7565b9150818183526020840193506020810190508385602084028201111561284857600080fd5b60005b83811015612874578161285e88826127f4565b845250602092830192919091019060010161284b565b5050505092915050565b600082601f83011261288f57600080fd5b813561289d61281e8261400e565b81815260209384019390925082018360005b8381101561287457813586016128c588826129d4565b84525060209283019291909101906001016128af565b600082601f8301126128ec57600080fd5b81356128fa61281e8261400e565b81815260209384019390925082018360005b83811015612874578135860161292288826129d4565b845250602092830192919091019060010161290c565b600082601f83011261294957600080fd5b813561295761281e8261400e565b9150818183526020840193506020810190508385602084028201111561297c57600080fd5b60005b83811015612874578161299288826129be565b845250602092830192919091019060010161297f565b8035611ce881614173565b8051611ce881614173565b8035611ce88161417c565b8051611ce88161417c565b600082601f8301126129e557600080fd5b81356129f361281e8261402f565b91508082526020830160208301858383011115612a0f57600080fd5b612a1a8382846140f5565b50505092915050565b600082601f830112612a3457600080fd5b8151612a4261281e8261402f565b91508082526020830160208301858383011115612a5e57600080fd5b612a1a838284614101565b8035611ce881614185565b600060208284031215612a8657600080fd5b6000612a9284846127f4565b949350505050565b60008060408385031215612aad57600080fd5b6000612ab985856127f4565b9250506020612aca858286016129be565b9150509250929050565b600080600080600060a08688031215612aec57600080fd5b853567ffffffffffffffff811115612b0357600080fd5b612b0f888289016127ff565b955050602086013567ffffffffffffffff811115612b2c57600080fd5b612b3888828901612938565b945050604086013567ffffffffffffffff811115612b5557600080fd5b612b61888289016128db565b935050606086013567ffffffffffffffff811115612b7e57600080fd5b612b8a8882890161287e565b925050608086013567ffffffffffffffff811115612ba757600080fd5b612bb3888289016129d4565b9150509295509295909350565b600060208284031215612bd257600080fd5b6000612a9284846129b3565b600060208284031215612bf057600080fd5b6000612a9284846129c9565b600060208284031215612c0e57600080fd5b815167ffffffffffffffff811115612c2557600080fd5b612a9284828501612a23565b600060208284031215612c4357600080fd5b6000612a9284846129be565b60008060408385031215612c6257600080fd5b6000612c6e85856129be565b9250506020612aca858286016127f4565b60008060408385031215612c9257600080fd5b6000612c9e85856129be565b9250506020612aca858286016129a8565b600080600080600060a08688031215612cc757600080fd5b6000612cd388886129be565b9550506020612ce4888289016129a8565b9450506040612cf588828901612a69565b9350506060612d06888289016129be565b9250506080612bb3888289016129be565b6000612d238383612d52565b505060200190565b60006121b48383612ef4565b6000612d238383612eda565b612d4c816140cd565b82525050565b612d4c81614094565b6000612d6682614087565b612d70818561408b565b9350612d7b83614075565b8060005b83811015612da9578151612d938882612d17565b9750612d9e83614075565b925050600101612d7f565b509495945050505050565b6000612dbf82614087565b612dc9818561408b565b935083602082028501612ddb85614075565b8060005b85811015612e155784840389528151612df88582612d2b565b9450612e0383614075565b60209a909a0199925050600101612ddf565b5091979650505050505050565b6000612e2d82614087565b612e37818561408b565b935083602082028501612e4985614075565b8060005b85811015612e155784840389528151612e668582612d2b565b9450612e7183614075565b60209a909a0199925050600101612e4d565b6000612e8e82614087565b612e98818561408b565b9350612ea383614075565b8060005b83811015612da9578151612ebb8882612d37565b9750612ec683614075565b925050600101612ea7565b612d4c8161409f565b612d4c81610552565b612d4c612eef82610552565b610552565b6000612eff82614087565b612f09818561408b565b9350612f19818560208601614101565b612f228161412d565b9093019392505050565b600081546001811660008114612f495760018114612f8d57612fcc565b607f6002830416612f5a818761408b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168152955050602085019250612fcc565b60028204612f9b818761408b565b9550612fa68561407b565b60005b82811015612fc557815488820152600190910190602001612fa9565b8701945050505b505092915050565b612d4c816140d4565b612d4c816140df565b612d4c816140ea565b6000612ffc60398361408b565b7f476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a20736581527f6e646572206d75737420626520676f7620677561726469616e00000000000000602082015260400192915050565b600061305b60448361408b565b7f476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c206381527f616e206f6e6c792062652071756575656420696620697420697320737563636560208201527f6564656400000000000000000000000000000000000000000000000000000000604082015260600192915050565b60006130e060458361408b565b7f476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c81527f2063616e206f6e6c79206265206578656375746564206966206974206973207160208201527f7565756564000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000613165600283610c70565b7f1901000000000000000000000000000000000000000000000000000000000000815260020192915050565b600061319e604c8361408b565b7f476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c81527f6f636b50656e64696e6741646d696e3a2073656e646572206d7573742062652060208201527f676f7620677561726469616e0000000000000000000000000000000000000000604082015260600192915050565b600061322360188361408b565b7f73657450656e64696e6741646d696e2861646472657373290000000000000000815260200192915050565b600061325c60298361408b565b7f476f7665726e6f72416c7068613a3a73746174653a20696e76616c696420707281527f6f706f73616c2069640000000000000000000000000000000000000000000000602082015260400192915050565b60006132bb602d8361408b565b7f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f7465722081527f616c726561647920766f74656400000000000000000000000000000000000000602082015260400192915050565b600061331a60598361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000604082015260600192915050565b600061339f604a8361408b565b7f476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f6381527f6b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f60208201527f7620677561726469616e00000000000000000000000000000000000000000000604082015260600192915050565b600061342460288361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7981527f20616374696f6e73000000000000000000000000000000000000000000000000602082015260400192915050565b600061348360118361408b565b7f6164646974696f6e206f766572666c6f77000000000000000000000000000000815260200192915050565b60006134bc604383610c70565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201527f6374290000000000000000000000000000000000000000000000000000000000604082015260430192915050565b6000613541602783610c70565b7f42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c207381527f7570706f72742900000000000000000000000000000000000000000000000000602082015260270192915050565b60006135a060448361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c81527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d60208201527f6174636800000000000000000000000000000000000000000000000000000000604082015260600192915050565b600061362560218361408b565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f81527f7700000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613684602f8361408b565b7f476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722081527f61626f7665207468726573686f6c640000000000000000000000000000000000602082015260400192915050565b60006136e360448361408b565b7f476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a207081527f726f706f73616c20616374696f6e20616c72656164792071756575656420617460208201527f2065746100000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000613768602c8361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f81527f7669646520616374696f6e730000000000000000000000000000000000000000602082015260400192915050565b60006137c7603f8361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657281527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400602082015260400192915050565b6000613826602f8361408b565b7f476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e81527f76616c6964207369676e61747572650000000000000000000000000000000000602082015260400192915050565b600061388560588361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c7265616479206163746976652070726f706f73616c0000000000000000604082015260600192915050565b600061390a60368361408b565b7f476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f7420636181527f6e63656c2065786563757465642070726f706f73616c00000000000000000000602082015260400192915050565b6000613969602a8361408b565b7f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6781527f20697320636c6f73656400000000000000000000000000000000000000000000602082015260400192915050565b60006139c860158361408b565b7f7375627472616374696f6e20756e646572666c6f770000000000000000000000815260200192915050565b6000613a0160368361408b565b7f476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646581527f72206d75737420626520676f7620677561726469616e00000000000000000000602082015260400192915050565b80516060830190613a648482612ed1565b506020820151613a776020850182612ed1565b5060408201516114536040850182612eda565b612d4c816140c7565b6000613a9e82613158565b9150613aaa8285612ee3565b602082019150613aba8284612ee3565b5060200192915050565b6000611ce8826134af565b6000611ce882613534565b60208101611ce88284612d52565b60408101613af68285612d43565b6121b46020830184612eda565b60a08101613b118287612d52565b613b1e6020830186612fe6565b8181036040830152613b2f81613216565b90508181036060830152613b438185612ef4565b90506119756080830184612eda565b60408101613af68285612d52565b60808101613b6e8287612d52565b613b7b6020830186612eda565b613b886040830185612ed1565b6119756060830184612eda565b60a08101613ba38288612d52565b613bb06020830187612eda565b8181036040830152613bc28186612ef4565b90508181036060830152613bd68185612ef4565b9050613be56080830184612eda565b9695505050505050565b60a08101613bfd8288612d52565b613c0a6020830187612eda565b8181036040830152613c1c8186612f2c565b90508181036060830152613bd68185612f2c565b60808082528101613c418187612d5b565b90508181036020830152613c558186612e83565b90508181036040830152613c698185612e22565b90508181036060830152613be58184612db4565b60208101611ce88284612eda565b60808101613c998287612eda565b613ca66020830186612eda565b613cb36040830185612eda565b6119756060830184612d52565b60608101613cce8286612eda565b613cdb6020830185612eda565b612a926040830184612ed1565b60808101613cf68287612eda565b613d036020830186613a8a565b613b886040830185612eda565b60208101611ce88284612fd4565b60208101611ce88284612fdd565b602080825281016121b48184612ef4565b60208082528101611ce881612fef565b60208082528101611ce88161304e565b60208082528101611ce8816130d3565b60208082528101611ce881613191565b60208082528101611ce88161324f565b60208082528101611ce8816132ae565b60208082528101611ce88161330d565b60208082528101611ce881613392565b60208082528101611ce881613417565b60208082528101611ce881613476565b60208082528101611ce881613593565b60208082528101611ce881613618565b60208082528101611ce881613677565b60208082528101611ce8816136d6565b60208082528101611ce88161375b565b60208082528101611ce8816137ba565b60208082528101611ce881613819565b60208082528101611ce881613878565b60208082528101611ce8816138fd565b60208082528101611ce88161395c565b60208082528101611ce8816139bb565b60208082528101611ce8816139f4565b60608101611ce88284613a53565b6101208101613eba828c612eda565b613ec7602083018b612d43565b8181036040830152613ed9818a612d5b565b90508181036060830152613eed8189612e83565b90508181036080830152613f018188612e22565b905081810360a0830152613f158187612db4565b9050613f2460c0830186612eda565b613f3160e0830185612eda565b818103610100830152613f448184612ef4565b9b9a5050505050505050505050565b6101208101613f62828c612eda565b613f6f602083018b612d52565b613f7c604083018a612eda565b613f896060830189612eda565b613f966080830188612eda565b613fa360a0830187612eda565b613fb060c0830186612eda565b613fbd60e0830185612ed1565b613fcb610100830184612ed1565b9a9950505050505050505050565b60408101613af68285612eda565b60405181810167ffffffffffffffff8111828210171561400657600080fd5b604052919050565b600067ffffffffffffffff82111561402557600080fd5b5060209081020190565b600067ffffffffffffffff82111561404657600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b60009081526020902090565b5190565b90815260200190565b6000611ce8826140ae565b151590565b80610c7081614155565b73ffffffffffffffffffffffffffffffffffffffff1690565b60ff1690565b6000611ce8825b6000611ce882614094565b6000611ce8826140a4565b6000611ce882610552565b82818337506000910152565b60005b8381101561411c578181015183820152602001614104565b838111156114535750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b600881106127f157fe5b61416881614094565b81146127f157600080fd5b6141688161409f565b61416881610552565b614168816140c756fea365627a7a72315820bec7f78e83810f16849c12c92a640815d100798f393ab7abfad7b2addbfbd1c76c6578706572696d656e74616cf564736f6c63430005110040", - "deployedBytecode": "0x6080604052600436106101ac5760003560e01c8063452a9320116100ec578063d33219b41161008a578063ddf0b00911610064578063ddf0b00914610473578063deaaa7cc14610493578063e23a9a52146104a8578063fe0d94c1146104d5576101ac565b8063d33219b414610429578063da35c6641461043e578063da95691a14610453576101ac565b80637bdbe4d0116100c65780637bdbe4d0146103ca57806391500671146103df578063b58131b0146103ff578063b9a6196114610414576101ac565b8063452a9320146103735780634634c61f14610395578063760fbc13146103b5576101ac565b806320606b7011610159578063328dd98211610133578063328dd982146102e15780633932abb1146103115780633e4f49e61461032657806340e58ee514610353576101ac565b806320606b701461029757806321f43e42146102ac57806324bc1a64146102cc576101ac565b8063071c03321161018a578063071c03321461023357806315373e3d1461025557806317977c6114610277576101ac565b8063013cf08b146101b157806302a251a3146101ef57806306fdde0314610211575b600080fd5b3480156101bd57600080fd5b506101d16101cc366004612c31565b6104e8565b6040516101e699989796959493929190613f53565b60405180910390f35b3480156101fb57600080fd5b5061020461054e565b6040516101e69190613c7d565b34801561021d57600080fd5b50610226610555565b6040516101e69190613d2c565b34801561023f57600080fd5b5061024861058e565b6040516101e69190613d10565b34801561026157600080fd5b50610275610270366004612c7f565b6105aa565b005b34801561028357600080fd5b50610204610292366004612a74565b6105b9565b3480156102a357600080fd5b506102046105cb565b3480156102b857600080fd5b506102756102c7366004612a9a565b6105e2565b3480156102d857600080fd5b5061020461071b565b3480156102ed57600080fd5b506103016102fc366004612c31565b6107d6565b6040516101e69493929190613c30565b34801561031d57600080fd5b50610204610aae565b34801561033257600080fd5b50610346610341366004612c31565b610ab3565b6040516101e69190613d1e565b34801561035f57600080fd5b5061027561036e366004612c31565b610c75565b34801561037f57600080fd5b50610388610f5b565b6040516101e69190613ada565b3480156103a157600080fd5b506102756103b0366004612caf565b610f77565b3480156103c157600080fd5b50610275611159565b3480156103d657600080fd5b506102046111d4565b3480156103eb57600080fd5b506102756103fa366004612a9a565b6111d9565b34801561040b57600080fd5b506102046112e2565b34801561042057600080fd5b50610275611387565b34801561043557600080fd5b50610248611459565b34801561044a57600080fd5b50610204611475565b34801561045f57600080fd5b5061020461046e366004612ad4565b61147b565b34801561047f57600080fd5b5061027561048e366004612c31565b61197e565b34801561049f57600080fd5b50610204611c71565b3480156104b457600080fd5b506104c86104c3366004612c4f565b611c7d565b6040516101e69190613e9d565b6102756104e3366004612c31565b611cee565b6004602052600090815260409020805460018201546002830154600784015460088501546009860154600a870154600b90970154959673ffffffffffffffffffffffffffffffffffffffff90951695939492939192909160ff8082169161010090041689565b6143805b90565b6040518060400160405280601281526020017f59414d20476f7665726e6f7220416c706861000000000000000000000000000081525081565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6105b5338383611f22565b5050565b60056020526000908152604090205481565b6040516105d790613ac4565b604051809103902081565b60025473ffffffffffffffffffffffffffffffffffffffff16331461063c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d6d565b60405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff90911691630825f38f91839190610673908790602001613ada565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016106a29493929190613b03565b600060405180830381600087803b1580156106bc57600080fd5b505af11580156106d0573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107169190810190612bfc565b505050565b60006107d16107ca600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397d63f936040518163ffffffff1660e01b815260040160206040518083038186803b15801561078b57600080fd5b505afa15801561079f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107c39190810190612bde565b6004612160565b60646121bb565b905090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561086557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161083a575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156108b757602002820191906000526020600020905b8154815260200190600101908083116108a3575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156109a85760008481526020908190208301805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001871615020190941693909304928301859004850281018501909152818152928301828280156109945780601f1061096957610100808354040283529160200191610994565b820191906000526020600020905b81548152906001019060200180831161097757829003601f168201915b5050505050815260200190600101906108df565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610a985760008481526020908190208301805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a845780601f10610a5957610100808354040283529160200191610a84565b820191906000526020600020905b815481529060010190602001808311610a6757829003601f168201915b5050505050815260200190600101906109cf565b5050505090509450945094509450509193509193565b600190565b60008160035410158015610ac75750600082115b610afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d7d565b6000828152600460205260409020600b81015460ff1615610b22576002915050610c70565b80600701544311610b37576000915050610c70565b80600801544311610b4c576001915050610c70565b80600a01548160090154111580610b6d5750610b6661071b565b8160090154105b15610b7c576003915050610c70565b6002810154610b8f576004915050610c70565b600b810154610100900460ff1615610bab576007915050610c70565b6002810154600054604080517fc1a287e20000000000000000000000000000000000000000000000000000000081529051610c5a939273ffffffffffffffffffffffffffffffffffffffff169163c1a287e2916004808301926020929190829003018186803b158015610c1d57600080fd5b505afa158015610c31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c559190810190612bde565b6121fd565b4210610c6a576006915050610c70565b60059150505b919050565b6000610c8082610ab3565b90506007816007811115610c9057fe5b1415610cc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e5d565b600082815260046020526040902060025473ffffffffffffffffffffffffffffffffffffffff16331480610da45750610cff6112e2565b600180548382015473ffffffffffffffffffffffffffffffffffffffff9182169263782d6fe19290911690610d3590439061223c565b6040518363ffffffff1660e01b8152600401610d52929190613b52565b60206040518083038186803b158015610d6a57600080fd5b505afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610da29190810190612bde565b105b610dda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dfd565b600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560005b6003820154811015610f1e5760005460038301805473ffffffffffffffffffffffffffffffffffffffff9092169163591fcdfe919084908110610e4957fe5b60009182526020909120015460048501805473ffffffffffffffffffffffffffffffffffffffff9092169185908110610e7e57fe5b9060005260206000200154856005018581548110610e9857fe5b90600052602060002001866006018681548110610eb157fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610ee0959493929190613bef565b600060405180830381600087803b158015610efa57600080fd5b505af1158015610f0e573d6000803e3d6000fd5b505060019092019150610e0a9050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610f4e9190613c7d565b60405180910390a1505050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b6000604051610f8590613ac4565b60408051918290038220828201909152601282527f59414d20476f7665726e6f7220416c70686100000000000000000000000000006020909201919091527f63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9610fec61227e565b306040516020016110009493929190613c8b565b604051602081830303815290604052805190602001209050600060405161102690613acf565b60405190819003812061103f9189908990602001613cc0565b6040516020818303038152906040528051906020012090506000828260405160200161106c929190613a93565b6040516020818303038152906040528051906020012090506000600182888888604051600081526020016040526040516110a99493929190613ce8565b6020604051602081039080840390855afa1580156110cb573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611143576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e3d565b61114e818a8a611f22565b505050505050505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146111aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e8d565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600a90565b60025473ffffffffffffffffffffffffffffffffffffffff16331461122a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dad565b6000805460405173ffffffffffffffffffffffffffffffffffffffff90911691633a66f90191839190611261908790602001613ada565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016112909493929190613b03565b602060405180830381600087803b1580156112aa57600080fd5b505af11580156112be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107169190810190612bde565b60006107d1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397d63f936040518163ffffffff1660e01b815260040160206040518083038186803b15801561134f57600080fd5b505afa158015611363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107ca9190810190612bde565b60025473ffffffffffffffffffffffffffffffffffffffff1633146113d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d3d565b60008054604080517f0e18b681000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921692630e18b6819260048084019382900301818387803b15801561143f57600080fd5b505af1158015611453573d6000803e3d6000fd5b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60006114856112e2565b6001805473ffffffffffffffffffffffffffffffffffffffff169063782d6fe19033906114b390439061223c565b6040518363ffffffff1660e01b81526004016114d0929190613ae8565b60206040518083038186803b1580156114e857600080fd5b505afa1580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506115209190810190612bde565b11611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e2d565b84518651148015611569575083518651145b8015611576575082518651145b6115ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613ddd565b85516115e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e1d565b6115ec6111d4565b86511115611626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dbd565b3360009081526005602052604090205480156116d757600061164782610ab3565b9050600181600781111561165757fe5b141561168f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e4d565b600081600781111561169d57fe5b14156116d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d9d565b505b60006116e543610c55610aae565b905060006116f582610c5561054e565b600380546001019055905061170861247f565b604051806101a0016040528060035481526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060046000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003019080519060200190611812929190612501565b506080820151805161182e91600484019160209091019061258b565b5060a0820151805161184a9160058401916020909101906125d2565b5060c0820151805161186691600684019160209091019061262b565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff02191690831515021790555061018082015181600b0160016101000a81548160ff021916908315150217905550905050806000015160056000836020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e60405161196699989796959493929190613eab565b60405180910390a15193505050505b95945050505050565b600461198982610ab3565b600781111561199457fe5b146119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d4d565b6000818152600460208181526040808420845482517f6a42b8f80000000000000000000000000000000000000000000000000000000081529251919594611a4694429473ffffffffffffffffffffffffffffffffffffffff90931693636a42b8f8938084019390829003018186803b158015610c1d57600080fd5b905060005b6003830154811015611c3757611c2f836003018281548110611a6957fe5b60009182526020909120015460048501805473ffffffffffffffffffffffffffffffffffffffff9092169184908110611a9e57fe5b9060005260206000200154856005018481548110611ab857fe5b600091825260209182902001805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600187161502019094169390930492830185900485028101850190915281815292830182828015611b645780601f10611b3957610100808354040283529160200191611b64565b820191906000526020600020905b815481529060010190602001808311611b4757829003601f168201915b5050505050866006018581548110611b7857fe5b600091825260209182902001805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100600187161502019094169390930492830185900485028101850190915281815292830182828015611c245780601f10611bf957610100808354040283529160200191611c24565b820191906000526020600020905b815481529060010190602001808311611c0757829003601f168201915b505050505086612282565b600101611a4b565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610f4e9085908490613fd9565b6040516105d790613acf565b611c85612684565b50600082815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452600c018252918290208251606081018452815460ff808216151583526101009091041615159281019290925260010154918101919091525b92915050565b6005611cf982610ab3565b6007811115611d0457fe5b14611d3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d5d565b6000818152600460205260408120600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055905b6003820154811015611ee65760005460048301805473ffffffffffffffffffffffffffffffffffffffff90921691630825f38f919084908110611db857fe5b9060005260206000200154846003018481548110611dd257fe5b60009182526020909120015460048601805473ffffffffffffffffffffffffffffffffffffffff9092169186908110611e0757fe5b9060005260206000200154866005018681548110611e2157fe5b90600052602060002001876006018781548110611e3a57fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611e69959493929190613bef565b6000604051808303818588803b158015611e8257600080fd5b505af1158015611e96573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611edd9190810190612bfc565b50600101611d79565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051611f169190613c7d565b60405180910390a15050565b6001611f2d83610ab3565b6007811115611f3857fe5b14611f6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e6d565b600082815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452600c8101909252909120805460ff1615611fdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613d8d565b60015460078301546040517f782d6fe100000000000000000000000000000000000000000000000000000000815260009273ffffffffffffffffffffffffffffffffffffffff169163782d6fe19161203b918a91600401613b52565b60206040518083038186803b15801561205357600080fd5b505afa158015612067573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061208b9190810190612bde565b905083156120ab576120a18360090154826121fd565b60098401556120bf565b6120b983600a0154826121fd565b600a8401555b815460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090911681177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008615150217835582018190556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690612150908890889088908690613b60565b60405180910390a1505050505050565b60008261216f57506000611ce8565b8282028284828161217c57fe5b04146121b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613ded565b9392505050565b60006121b483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061242e565b6000828201838110156121b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613dcd565b600082821115612278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e7d565b50900390565b4690565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091169063f2b06537906122bd9088908890889088908890602001613b95565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016122ef9190613c7d565b60206040518083038186803b15801561230757600080fd5b505afa15801561231b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061233f9190810190612bc0565b15612376576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390613e0d565b6000546040517f3a66f90100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633a66f901906123d49088908890889088908890600401613b95565b602060405180830381600087803b1580156123ee57600080fd5b505af1158015612402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506124269190810190612bde565b505050505050565b60008183612469576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106339190613d2c565b50600083858161247557fe5b0495945050505050565b604051806101a0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b82805482825590600052602060002090810192821561257b579160200282015b8281111561257b57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190612521565b506125879291506126a4565b5090565b8280548282559060005260206000209081019282156125c6579160200282015b828111156125c65782518255916020019190600101906125ab565b506125879291506126e0565b82805482825590600052602060002090810192821561261f579160200282015b8281111561261f578251805161260f9184916020909101906126fa565b50916020019190600101906125f2565b50612587929150612767565b828054828255906000526020600020908101928215612678579160200282015b8281111561267857825180516126689184916020909101906126fa565b509160200191906001019061264b565b5061258792915061278a565b604080516060810182526000808252602082018190529181019190915290565b61055291905b808211156125875780547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001016126aa565b61055291905b8082111561258757600081556001016126e6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061273b57805160ff19168380011785556125c6565b828001600101855582156125c657918201828111156125c65782518255916020019190600101906125ab565b61055291905b8082111561258757600061278182826127ad565b5060010161276d565b61055291905b808211156125875760006127a482826127ad565b50600101612790565b50805460018160011615610100020316600290046000825580601f106127d357506127f1565b601f0160209004906000526020600020908101906127f191906126e0565b50565b8035611ce88161415f565b600082601f83011261281057600080fd5b813561282361281e8261400e565b613fe7565b9150818183526020840193506020810190508385602084028201111561284857600080fd5b60005b83811015612874578161285e88826127f4565b845250602092830192919091019060010161284b565b5050505092915050565b600082601f83011261288f57600080fd5b813561289d61281e8261400e565b81815260209384019390925082018360005b8381101561287457813586016128c588826129d4565b84525060209283019291909101906001016128af565b600082601f8301126128ec57600080fd5b81356128fa61281e8261400e565b81815260209384019390925082018360005b83811015612874578135860161292288826129d4565b845250602092830192919091019060010161290c565b600082601f83011261294957600080fd5b813561295761281e8261400e565b9150818183526020840193506020810190508385602084028201111561297c57600080fd5b60005b83811015612874578161299288826129be565b845250602092830192919091019060010161297f565b8035611ce881614173565b8051611ce881614173565b8035611ce88161417c565b8051611ce88161417c565b600082601f8301126129e557600080fd5b81356129f361281e8261402f565b91508082526020830160208301858383011115612a0f57600080fd5b612a1a8382846140f5565b50505092915050565b600082601f830112612a3457600080fd5b8151612a4261281e8261402f565b91508082526020830160208301858383011115612a5e57600080fd5b612a1a838284614101565b8035611ce881614185565b600060208284031215612a8657600080fd5b6000612a9284846127f4565b949350505050565b60008060408385031215612aad57600080fd5b6000612ab985856127f4565b9250506020612aca858286016129be565b9150509250929050565b600080600080600060a08688031215612aec57600080fd5b853567ffffffffffffffff811115612b0357600080fd5b612b0f888289016127ff565b955050602086013567ffffffffffffffff811115612b2c57600080fd5b612b3888828901612938565b945050604086013567ffffffffffffffff811115612b5557600080fd5b612b61888289016128db565b935050606086013567ffffffffffffffff811115612b7e57600080fd5b612b8a8882890161287e565b925050608086013567ffffffffffffffff811115612ba757600080fd5b612bb3888289016129d4565b9150509295509295909350565b600060208284031215612bd257600080fd5b6000612a9284846129b3565b600060208284031215612bf057600080fd5b6000612a9284846129c9565b600060208284031215612c0e57600080fd5b815167ffffffffffffffff811115612c2557600080fd5b612a9284828501612a23565b600060208284031215612c4357600080fd5b6000612a9284846129be565b60008060408385031215612c6257600080fd5b6000612c6e85856129be565b9250506020612aca858286016127f4565b60008060408385031215612c9257600080fd5b6000612c9e85856129be565b9250506020612aca858286016129a8565b600080600080600060a08688031215612cc757600080fd5b6000612cd388886129be565b9550506020612ce4888289016129a8565b9450506040612cf588828901612a69565b9350506060612d06888289016129be565b9250506080612bb3888289016129be565b6000612d238383612d52565b505060200190565b60006121b48383612ef4565b6000612d238383612eda565b612d4c816140cd565b82525050565b612d4c81614094565b6000612d6682614087565b612d70818561408b565b9350612d7b83614075565b8060005b83811015612da9578151612d938882612d17565b9750612d9e83614075565b925050600101612d7f565b509495945050505050565b6000612dbf82614087565b612dc9818561408b565b935083602082028501612ddb85614075565b8060005b85811015612e155784840389528151612df88582612d2b565b9450612e0383614075565b60209a909a0199925050600101612ddf565b5091979650505050505050565b6000612e2d82614087565b612e37818561408b565b935083602082028501612e4985614075565b8060005b85811015612e155784840389528151612e668582612d2b565b9450612e7183614075565b60209a909a0199925050600101612e4d565b6000612e8e82614087565b612e98818561408b565b9350612ea383614075565b8060005b83811015612da9578151612ebb8882612d37565b9750612ec683614075565b925050600101612ea7565b612d4c8161409f565b612d4c81610552565b612d4c612eef82610552565b610552565b6000612eff82614087565b612f09818561408b565b9350612f19818560208601614101565b612f228161412d565b9093019392505050565b600081546001811660008114612f495760018114612f8d57612fcc565b607f6002830416612f5a818761408b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168152955050602085019250612fcc565b60028204612f9b818761408b565b9550612fa68561407b565b60005b82811015612fc557815488820152600190910190602001612fa9565b8701945050505b505092915050565b612d4c816140d4565b612d4c816140df565b612d4c816140ea565b6000612ffc60398361408b565b7f476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a20736581527f6e646572206d75737420626520676f7620677561726469616e00000000000000602082015260400192915050565b600061305b60448361408b565b7f476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c206381527f616e206f6e6c792062652071756575656420696620697420697320737563636560208201527f6564656400000000000000000000000000000000000000000000000000000000604082015260600192915050565b60006130e060458361408b565b7f476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c81527f2063616e206f6e6c79206265206578656375746564206966206974206973207160208201527f7565756564000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000613165600283610c70565b7f1901000000000000000000000000000000000000000000000000000000000000815260020192915050565b600061319e604c8361408b565b7f476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c81527f6f636b50656e64696e6741646d696e3a2073656e646572206d7573742062652060208201527f676f7620677561726469616e0000000000000000000000000000000000000000604082015260600192915050565b600061322360188361408b565b7f73657450656e64696e6741646d696e2861646472657373290000000000000000815260200192915050565b600061325c60298361408b565b7f476f7665726e6f72416c7068613a3a73746174653a20696e76616c696420707281527f6f706f73616c2069640000000000000000000000000000000000000000000000602082015260400192915050565b60006132bb602d8361408b565b7f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f7465722081527f616c726561647920766f74656400000000000000000000000000000000000000602082015260400192915050565b600061331a60598361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000604082015260600192915050565b600061339f604a8361408b565b7f476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f6381527f6b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f60208201527f7620677561726469616e00000000000000000000000000000000000000000000604082015260600192915050565b600061342460288361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7981527f20616374696f6e73000000000000000000000000000000000000000000000000602082015260400192915050565b600061348360118361408b565b7f6164646974696f6e206f766572666c6f77000000000000000000000000000000815260200192915050565b60006134bc604383610c70565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201527f6374290000000000000000000000000000000000000000000000000000000000604082015260430192915050565b6000613541602783610c70565b7f42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c207381527f7570706f72742900000000000000000000000000000000000000000000000000602082015260270192915050565b60006135a060448361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c81527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d60208201527f6174636800000000000000000000000000000000000000000000000000000000604082015260600192915050565b600061362560218361408b565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f81527f7700000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613684602f8361408b565b7f476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722081527f61626f7665207468726573686f6c640000000000000000000000000000000000602082015260400192915050565b60006136e360448361408b565b7f476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a207081527f726f706f73616c20616374696f6e20616c72656164792071756575656420617460208201527f2065746100000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000613768602c8361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f81527f7669646520616374696f6e730000000000000000000000000000000000000000602082015260400192915050565b60006137c7603f8361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657281527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400602082015260400192915050565b6000613826602f8361408b565b7f476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e81527f76616c6964207369676e61747572650000000000000000000000000000000000602082015260400192915050565b600061388560588361408b565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c7265616479206163746976652070726f706f73616c0000000000000000604082015260600192915050565b600061390a60368361408b565b7f476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f7420636181527f6e63656c2065786563757465642070726f706f73616c00000000000000000000602082015260400192915050565b6000613969602a8361408b565b7f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6781527f20697320636c6f73656400000000000000000000000000000000000000000000602082015260400192915050565b60006139c860158361408b565b7f7375627472616374696f6e20756e646572666c6f770000000000000000000000815260200192915050565b6000613a0160368361408b565b7f476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646581527f72206d75737420626520676f7620677561726469616e00000000000000000000602082015260400192915050565b80516060830190613a648482612ed1565b506020820151613a776020850182612ed1565b5060408201516114536040850182612eda565b612d4c816140c7565b6000613a9e82613158565b9150613aaa8285612ee3565b602082019150613aba8284612ee3565b5060200192915050565b6000611ce8826134af565b6000611ce882613534565b60208101611ce88284612d52565b60408101613af68285612d43565b6121b46020830184612eda565b60a08101613b118287612d52565b613b1e6020830186612fe6565b8181036040830152613b2f81613216565b90508181036060830152613b438185612ef4565b90506119756080830184612eda565b60408101613af68285612d52565b60808101613b6e8287612d52565b613b7b6020830186612eda565b613b886040830185612ed1565b6119756060830184612eda565b60a08101613ba38288612d52565b613bb06020830187612eda565b8181036040830152613bc28186612ef4565b90508181036060830152613bd68185612ef4565b9050613be56080830184612eda565b9695505050505050565b60a08101613bfd8288612d52565b613c0a6020830187612eda565b8181036040830152613c1c8186612f2c565b90508181036060830152613bd68185612f2c565b60808082528101613c418187612d5b565b90508181036020830152613c558186612e83565b90508181036040830152613c698185612e22565b90508181036060830152613be58184612db4565b60208101611ce88284612eda565b60808101613c998287612eda565b613ca66020830186612eda565b613cb36040830185612eda565b6119756060830184612d52565b60608101613cce8286612eda565b613cdb6020830185612eda565b612a926040830184612ed1565b60808101613cf68287612eda565b613d036020830186613a8a565b613b886040830185612eda565b60208101611ce88284612fd4565b60208101611ce88284612fdd565b602080825281016121b48184612ef4565b60208082528101611ce881612fef565b60208082528101611ce88161304e565b60208082528101611ce8816130d3565b60208082528101611ce881613191565b60208082528101611ce88161324f565b60208082528101611ce8816132ae565b60208082528101611ce88161330d565b60208082528101611ce881613392565b60208082528101611ce881613417565b60208082528101611ce881613476565b60208082528101611ce881613593565b60208082528101611ce881613618565b60208082528101611ce881613677565b60208082528101611ce8816136d6565b60208082528101611ce88161375b565b60208082528101611ce8816137ba565b60208082528101611ce881613819565b60208082528101611ce881613878565b60208082528101611ce8816138fd565b60208082528101611ce88161395c565b60208082528101611ce8816139bb565b60208082528101611ce8816139f4565b60608101611ce88284613a53565b6101208101613eba828c612eda565b613ec7602083018b612d43565b8181036040830152613ed9818a612d5b565b90508181036060830152613eed8189612e83565b90508181036080830152613f018188612e22565b905081810360a0830152613f158187612db4565b9050613f2460c0830186612eda565b613f3160e0830185612eda565b818103610100830152613f448184612ef4565b9b9a5050505050505050505050565b6101208101613f62828c612eda565b613f6f602083018b612d52565b613f7c604083018a612eda565b613f896060830189612eda565b613f966080830188612eda565b613fa360a0830187612eda565b613fb060c0830186612eda565b613fbd60e0830185612ed1565b613fcb610100830184612ed1565b9a9950505050505050505050565b60408101613af68285612eda565b60405181810167ffffffffffffffff8111828210171561400657600080fd5b604052919050565b600067ffffffffffffffff82111561402557600080fd5b5060209081020190565b600067ffffffffffffffff82111561404657600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b60009081526020902090565b5190565b90815260200190565b6000611ce8826140ae565b151590565b80610c7081614155565b73ffffffffffffffffffffffffffffffffffffffff1690565b60ff1690565b6000611ce8825b6000611ce882614094565b6000611ce8826140a4565b6000611ce882610552565b82818337506000910152565b60005b8381101561411c578181015183820152602001614104565b838111156114535750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b600881106127f157fe5b61416881614094565b81146127f157600080fd5b6141688161409f565b61416881610552565b614168816140c756fea365627a7a72315820bec7f78e83810f16849c12c92a640815d100798f393ab7abfad7b2addbfbd1c76c6578706572696d656e74616cf564736f6c63430005110040", - "sourceMap": "1038:15376:10:-;;;6000:173;8:9:-1;5:2;;;30:1;27;20:12;5:2;6000:173:10;;;;;;;;;;;;;;;;;;;;;6062:8;:39;;-1:-1:-1;;;;;6062:39:10;;;-1:-1:-1;;;;;;6062:39:10;;;;;;;;6111:24;;;;;;;;;;;;;;;;6145:8;:21;;;;;6156:10;6145:21;;;1038:15376;;5:134:-1;83:13;;101:33;83:13;101:33;;;68:71;;;;;146:399;;;278:2;266:9;257:7;253:23;249:32;246:2;;;294:1;291;284:12;246:2;329:1;346:64;402:7;382:9;346:64;;;336:74;;308:108;447:2;465:64;521:7;512:6;501:9;497:22;465:64;;;455:74;;426:109;240:305;;;;;;552:91;;-1:-1;;;;;712:54;;614:24;695:76;778:117;847:24;865:5;847:24;;;840:5;837:35;827:2;;886:1;883;876:12;827:2;821:74;;;1038:15376:10;;;;;;", - "deployedSourceMap": "1038:15376:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4683:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4683:46:10;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;2055:71;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2055:71:10;;;:::i;:::-;;;;;;;;1109:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1109:50:10;;;:::i;:::-;;;;;;;;2338:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2338:23:10;;;:::i;:::-;;;;;;;;12840:137;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;12840:137:10;;;;;;;;:::i;:::-;;4790:53;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4790:53:10;;;;;;;;:::i;4913:122::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4913:122:10;;;:::i;15555:370::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;15555:370:10;;;;;;;;:::i;1298:117::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1298:117:10;;;:::i;11212:373::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11212:373:10;;;;;;;;:::i;:::-;;;;;;;;;;;1908:66;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1908:66:10;;;:::i;11778:1056::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11778:1056:10;;;;;;;;:::i;:::-;;;;;;;;10453:753;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10453:753:10;;;;;;;;:::i;2421:23::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2421:23:10;;;:::i;:::-;;;;;;;;12983:950;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;12983:950:10;;;;;;;;:::i;15001:178::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15001:178:10;;;:::i;1727:77::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1727:77:10;;;:::i;15185:364::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;15185:364:10;;;;;;;;:::i;1521:106::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1521:106:10;;;:::i;14810:185::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14810:185:10;;;:::i;2237:33::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2237:33:10;;;:::i;2497:28::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2497:28:10;;;:::i;6179:2329::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6179:2329:10;;;;;;;;:::i;8514:683::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8514:683:10;;;;;;;;:::i;5122:94::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5122:94:10;;;:::i;11591:181::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11591:181:10;;;;;;;;:::i;:::-;;;;;;;;9856:591;;;;;;;;;:::i;4683:46::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2055:71::-;2118:5;2055:71;;:::o;1109:50::-;;;;;;;;;;;;;;;;;;;:::o;2338:23::-;;;;;;:::o;12840:137::-;12928:42;12938:10;12950;12962:7;12928:9;:42::i;:::-;12840:137;;:::o;4790:53::-;;;;;;;;;;;;;:::o;4913:122::-;4955:80;;;;;;;;;;;;;;4913:122;:::o;15555:370::-;15708:8;;;;15694:10;:22;15686:111;;;;;;;;;;;;;;;;;;;;;;15807:8;;;15885:27;;15807:8;;;;;:27;;:8;;;15885:27;;15896:15;;15885:27;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;15885:27:10;;;15914:3;15807:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15807:111:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15807:111:10;;;;;;39:16:-1;36:1;17:17;2:54;101:4;15807:111:10;80:15:-1;;;97:9;76:31;65:43;;120:4;113:20;15807:111:10;;;;;;;;;;15555:370;;:::o;1298:117::-;1342:7;1360:52;1373:33;1386:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1386:16:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1386:16:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1386:16:10;;;;;;;;;1404:1;1373:12;:33::i;:::-;1408:3;1360:12;:52::i;:::-;1353:59;;1298:117;:::o;11212:373::-;11310:24;11348:20;11382:26;11422:24;11471:18;11492:9;:21;11502:10;11492:21;;;;;;;;;;;11471:42;;11531:1;:9;;11542:1;:8;;11552:1;:12;;11566:1;:11;;11523:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11212:373;;;;;:::o;1908:66::-;1970:1;1908:66;:::o;11778:1056::-;11858:13;11912:10;11895:13;;:27;;:45;;;;;11939:1;11926:10;:14;11895:45;11887:99;;;;;;;;;;;;;;11996:25;12024:21;;;:9;:21;;;;;12059:17;;;;;;12055:773;;;12099:22;12092:29;;;;;12055:773;12158:8;:19;;;12142:12;:35;12138:690;;12200:21;12193:28;;;;;12138:690;12258:8;:17;;;12242:12;:33;12238:590;;12298:20;12291:27;;;;;12238:590;12360:8;:21;;;12339:8;:17;;;:42;;:79;;;;12405:13;:11;:13::i;:::-;12385:8;:17;;;:33;12339:79;12335:493;;;12441:22;12434:29;;;;;12335:493;12484:12;;;;12480:348;;12524:23;12517:30;;;;;12480:348;12568:17;;;;;;;;;12564:264;;;12608:22;12601:29;;;;;12564:264;12677:12;;;;12691:8;;:23;;;;;;;;12670:45;;12677:12;12691:8;;;:21;;:23;;;;;;;;;;;;;;:8;:23;;;5:2:-1;;;;30:1;27;20:12;5:2;12691:23:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12691:23:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;12691:23:10;;;;;;;;;12670:6;:45::i;:::-;12651:15;:64;12647:181;;12738:21;12731:28;;;;;12647:181;12797:20;12790:27;;;11778:1056;;;;:::o;10453:753::-;10518:19;10540:17;10546:10;10540:5;:17::i;:::-;10518:39;-1:-1:-1;10584:22:10;10575:5;:31;;;;;;;;;;10567:98;;;;;;;;;;;;;;10676:25;10704:21;;;:9;:21;;;;;10757:8;;;;10743:10;:22;;:109;;;10833:19;:17;:19::i;:::-;10769:3;;;10787:17;;;;10769:3;;;;;:17;;10787;;;;10806:23;;10813:12;;10806:6;:23::i;:::-;10769:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10769:61:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10769:61:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10769:61:10;;;;;;;;;:83;10743:109;10735:169;;;;;;;;;;;;;;10915:17;;;:24;;;;10935:4;10915:24;;;:17;10949:207;10973:16;;;:23;10969:27;;10949:207;;;11017:8;;11044:16;;;:19;;11017:8;;;;;:26;;11044:16;11061:1;;11044:19;;;;;;;;;;;;;;;;11065:15;;;:18;;11044:19;;;;;11081:1;;11065:18;;;;;;;;;;;;;;11085:8;:19;;11105:1;11085:22;;;;;;;;;;;;;;;11109:8;:18;;11128:1;11109:21;;;;;;;;;;;;;;;11132:8;:12;;;11017:128;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11017:128:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;10998:3:10;;;;;-1:-1:-1;10949:207:10;;-1:-1:-1;10949:207:10;;;11171:28;11188:10;11171:28;;;;;;;;;;;;;;;10453:753;;;:::o;2421:23::-;;;;;;:::o;12983:950::-;13146:23;4955:80;;;;;;;;;;;;;;;;13272:4;;;;;;;;;;;;;;;;;;13256:22;13296:12;:10;:12::i;:::-;13334:4;13195:158;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13195:158:10;;;13172:191;;;;;;13146:217;;13374:18;5164:52;;;;;;;;;;;;;;;13418:110;;13479:10;;13507:7;;13418:110;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13418:110:10;;;13395:143;;;;;;13374:164;;13549:14;13651:15;13684:10;13589:119;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13589:119:10;;;13566:152;;;;;;13549:169;;13729:17;13749:26;13759:6;13767:1;13770;13773;13749:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;13749:26:10;;;;;;-1:-1:-1;;13793:23:10;;;13785:83;;;;;;;;;;;;;;13885:41;13895:9;13906:10;13918:7;13885:9;:41::i;:::-;13878:48;;;;12983:950;;;;;:::o;15001:178::-;15074:8;;;;15060:10;:22;15052:89;;;;;;;;;;;;;;15151:8;:21;;;;;;15001:178::o;1727:77::-;1799:2;1727:77;:::o;15185:364::-;15336:8;;;;15322:10;:22;15314:109;;;;;;;;;;;;;;15433:8;;;15509:27;;15433:8;;;;;:25;;:8;;;15509:27;;15520:15;;15509:27;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;15509:27:10;;;15538:3;15433:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15433:109:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15433:109:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;15433:109:10;;;;;;;;1521:106;1571:7;1589:35;1602:3;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1602:16:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1602:16:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1602:16:10;;;;;;;;14810:185;14886:8;;;;14872:10;:22;14864:92;;;;;;;;;;;;;;14966:8;;;:22;;;;;;;;:8;;;;;:20;;:22;;;;;;;;;;:8;;:22;;;5:2:-1;;;;30:1;27;20:12;5:2;14966:22:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14966:22:10;;;;14810:185::o;2237:33::-;;;;;;:::o;2497:28::-;;;;:::o;6179:2329::-;6403:7;6491:19;:17;:19::i;:::-;6434:3;;;;;;:17;;6452:10;;6464:23;;6471:12;;6464:6;:23::i;:::-;6434:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6434:54:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6434:54:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;6434:54:10;;;;;;;;;:76;6426:152;;;;;;;;;;;;;;6614:6;:13;6596:7;:14;:31;:70;;;;;6649:10;:17;6631:7;:14;:35;6596:70;:108;;;;;6688:9;:16;6670:7;:14;:34;6596:108;6588:189;;;;;;;;;;;;;;6795:14;;6787:76;;;;;;;;;;;;;;6899:23;:21;:23::i;:::-;6881:7;:14;:41;;6873:94;;;;;;;;;;;;;;7023:10;6978:24;7005:29;;;:17;:29;;;;;;7048:21;;7044:450;;7083:42;7128:23;7134:16;7128:5;:23::i;:::-;7083:68;-1:-1:-1;7203:20:10;7171:28;:52;;;;;;;;;;7163:153;;;;;;;;;;;;;;7368:21;7336:28;:53;;;;;;;;;;7328:155;;;;;;;;;;;;;;7044:450;;7504:18;7525:35;7532:12;7546:13;:11;:13::i;7525:35::-;7504:56;;7570:16;7589:34;7596:10;7608:14;:12;:14::i;7589:34::-;7634:13;:15;;;;;;7570:53;-1:-1:-1;7659:27:10;;:::i;:::-;7689:413;;;;;;;;7716:13;;7689:413;;;;7753:10;7689:413;;;;;;7782:1;7689:413;;;;7806:7;7689:413;;;;7835:6;7689:413;;;;7867:10;7689:413;;;;7902:9;7689:413;;;;7937:10;7689:413;;;;7971:8;7689:413;;;;8003:1;7689:413;;;;8032:1;7689:413;;;;8057:5;7689:413;;;;;;8086:5;7689:413;;;;;7659:443;;8141:11;8113:9;:25;8123:11;:14;;;8113:25;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;8113:39:10;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;8113:39:10;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;8113:39:10;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8204:11;:14;;;8162:17;:39;8180:11;:20;;;8162:39;;;;;;;;;;;;;;;:56;;;;8234:236;8263:11;:14;;;8291:10;8315:7;8336:6;8356:10;8380:9;8403:10;8427:8;8449:11;8234:236;;;;;;;;;;;;;;;;;;;;;;;8487:14;;-1:-1:-1;;;;6179:2329:10;;;;;;;;:::o;8514:683::-;8607:23;8586:17;8592:10;8586:5;:17::i;:::-;:44;;;;;;;;;8578:125;;;;;;;;;;;;;;8713:25;8741:21;;;:9;:21;;;;;;;;8810:8;;:16;;;;;;;8741:21;;8713:25;8786:41;;8793:15;;8810:8;;;;;:14;;:16;;;;;;;;;;:8;:16;;;5:2:-1;;;;30:1;27;20:12;8786:41:10;8772:55;-1:-1:-1;8842:9:10;8837:280;8861:16;;;:23;8857:27;;8837:280;;;8905:201;8937:8;:16;;8954:1;8937:19;;;;;;;;;;;;;;;;;;8974:15;;;:18;;8937:19;;;;;8990:1;;8974:18;;;;;;;;;;;;;;9010:8;:19;;9030:1;9010:22;;;;;;;;;;;;;;;;;;8905:201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9010:22;8905:201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9050:8;:18;;9069:1;9050:21;;;;;;;;;;;;;;;;;;8905:201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9050:21;8905:201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9089:3;8905:14;:201::i;:::-;8886:3;;8837:280;;;-1:-1:-1;9126:12:10;;;:18;;;9159:31;;;;;;9174:10;;9141:3;;9159:31;;5122:94;5164:52;;;;;;11591:181;11691:14;;:::i;:::-;-1:-1:-1;11728:21:10;;;;:9;:21;;;;;;;;:37;;;;;:30;;:37;;;;;;11721:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11591:181;;;;;:::o;9856:591::-;9967:20;9946:17;9952:10;9946:5;:17::i;:::-;:41;;;;;;;;;9938:123;;;;;;;;;;;;;;10071:25;10099:21;;;:9;:21;;;;;10130:17;;;:24;;;;;;;;10099:21;10164:234;10188:16;;;:23;10184:27;;10164:234;;;10232:8;;10266:15;;;:18;;10232:8;;;;;:27;;10266:15;10282:1;;10266:18;;;;;;;;;;;;;;10286:8;:16;;10303:1;10286:19;;;;;;;;;;;;;;;;;;10307:15;;;:18;;10286:19;;;;;10323:1;;10307:18;;;;;;;;;;;;;;10327:8;:19;;10347:1;10327:22;;;;;;;;;;;;;;;10351:8;:18;;10370:1;10351:21;;;;;;;;;;;;;;;10374:8;:12;;;10232:155;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10232:155:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10232:155:10;;;;;;;39:16:-1;36:1;17:17;2:54;101:4;10232:155:10;80:15:-1;;;97:9;76:31;65:43;;120:4;113:20;10232:155:10;;;;;;;;;-1:-1:-1;10213:3:10;;10164:234;;;;10412:28;10429:10;10412:28;;;;;;;;;;;;;;;9856:591;;:::o;13939:865::-;14097:20;14076:17;14082:10;14076:5;:17::i;:::-;:41;;;;;;;;;14068:96;;;;;;;;;;;;;;14174:25;14202:21;;;:9;:21;;;;;;;;14259:24;;;;;:17;;;:24;;;;;;14301:16;;;;:25;14293:83;;;;;;;;;;;;;;14402:3;;14427:19;;;;14402:45;;;;;14386:13;;14402:3;;;:17;;:45;;14420:5;;14402:45;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14402:45:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14402:45:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;14402:45:10;;;;;;;;;14386:61;;14462:7;14458:181;;;14505:32;14512:8;:17;;;14531:5;14505:6;:32::i;:::-;14485:17;;;:52;14458:181;;;14592:36;14599:8;:21;;;14622:5;14592:6;:36::i;:::-;14568:21;;;:60;14458:181;14649:23;;14668:4;14649:23;;;;;;14682:25;;14649:23;14682:25;;;;;;;14717:13;;:21;;;14754:43;;;;;;14763:5;;14770:10;;14682:25;;14717:21;;14754:43;;;;;;;;;;13939:865;;;;;;:::o;2181:459:18:-;2239:7;2480:6;2476:45;;-1:-1:-1;2509:1:18;2502:8;;2476:45;2543:5;;;2547:1;2543;:5;:1;2566:5;;;;;:10;2558:56;;;;;;;;;;;;;;2632:1;2181:459;-1:-1:-1;;;2181:459:18:o;3102:130::-;3160:7;3186:39;3190:1;3193;3186:39;;;;;;;;;;;;;;;;;:3;:39::i;15931:168:10:-;15992:7;16023:5;;;16046:6;;;;16038:36;;;;;;;;;;;;;16105:149;16166:7;16198:1;16193;:6;;16185:40;;;;;;;;;;;;;;-1:-1:-1;16242:5:10;;;16105:149::o;16260:152::-;16371:9;16260:152;:::o;9203:647::-;9401:8;;9473:177;;9401:8;;;;;:27;;9473:177;;9507:6;;9537:5;;9566:9;;9599:4;;9627:3;;9473:177;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;9473:177:10;;;9444:222;;;;;;9401:277;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9401:277:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9401:277:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9401:277:10;;;;;;;;;9400:278;9392:378;;;;;;;;;;;;;;9781:8;;:62;;;;;:8;;;;;:25;;:62;;9807:6;;9815:5;;9822:9;;9833:4;;9839:3;;9781:62;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9781:62:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9781:62:10;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9781:62:10;;;;;;;;;;9203:647;;;;;:::o;3714:272:18:-;3800:7;3834:12;3827:5;3819:28;;;;;;;;;;;;;;;;3857:9;3873:1;3869;:5;;;;;;;3714:272;-1:-1:-1;;;;;3714:272:18:o;1038:15376:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1038:15376:10;;;;;;;-1:-1:-1;1038:15376:10;;;-1:-1:-1;1038:15376:10;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1038:15376:10;;;-1:-1:-1;1038:15376:10;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;1038:15376:10;;;-1:-1:-1;1038:15376:10;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;1038:15376:10;;;-1:-1:-1;1038:15376:10;:::i;:::-;;;;;;;;;-1:-1:-1;1038:15376:10;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;160:707;;277:3;270:4;262:6;258:17;254:27;244:2;;295:1;292;285:12;244:2;332:6;319:20;354:80;369:64;426:6;369:64;;;354:80;;;345:89;;451:5;476:6;469:5;462:21;506:4;498:6;494:17;484:27;;528:4;523:3;519:14;512:21;;581:6;628:3;620:4;612:6;608:17;603:3;599:27;596:36;593:2;;;645:1;642;635:12;593:2;670:1;655:206;680:6;677:1;674:13;655:206;;;738:3;760:37;793:3;781:10;760:37;;;748:50;;-1:-1;821:4;812:14;;;;840;;;;;702:1;695:9;655:206;;;659:14;237:630;;;;;;;;891:693;;1013:3;1006:4;998:6;994:17;990:27;980:2;;1031:1;1028;1021:12;980:2;1068:6;1055:20;1090:85;1105:69;1167:6;1105:69;;1090:85;1203:21;;;1247:4;1235:17;;;;1081:94;;-1:-1;1260:14;;1235:17;1355:1;1340:238;1365:6;1362:1;1359:13;1340:238;;;1448:3;1435:17;1427:6;1423:30;1472:42;1510:3;1498:10;1472:42;;;1460:55;;-1:-1;1538:4;1529:14;;;;1557;;;;;1387:1;1380:9;1340:238;;1609:696;;1732:3;1725:4;1717:6;1713:17;1709:27;1699:2;;1750:1;1747;1740:12;1699:2;1787:6;1774:20;1809:86;1824:70;1887:6;1824:70;;1809:86;1923:21;;;1967:4;1955:17;;;;1800:95;;-1:-1;1980:14;;1955:17;2075:1;2060:239;2085:6;2082:1;2079:13;2060:239;;;2168:3;2155:17;2147:6;2143:30;2192:43;2231:3;2219:10;2192:43;;;2180:56;;-1:-1;2259:4;2250:14;;;;2278;;;;;2107:1;2100:9;2060:239;;2331:707;;2448:3;2441:4;2433:6;2429:17;2425:27;2415:2;;2466:1;2463;2456:12;2415:2;2503:6;2490:20;2525:80;2540:64;2597:6;2540:64;;2525:80;2516:89;;2622:5;2647:6;2640:5;2633:21;2677:4;2669:6;2665:17;2655:27;;2699:4;2694:3;2690:14;2683:21;;2752:6;2799:3;2791:4;2783:6;2779:17;2774:3;2770:27;2767:36;2764:2;;;2816:1;2813;2806:12;2764:2;2841:1;2826:206;2851:6;2848:1;2845:13;2826:206;;;2909:3;2931:37;2964:3;2952:10;2931:37;;;2919:50;;-1:-1;2992:4;2983:14;;;;3011;;;;;2873:1;2866:9;2826:206;;3046:124;3110:20;;3135:30;3110:20;3135:30;;3177:128;3252:13;;3270:30;3252:13;3270:30;;3312:130;3379:20;;3404:33;3379:20;3404:33;;3449:134;3527:13;;3545:33;3527:13;3545:33;;3591:432;;3688:3;3681:4;3673:6;3669:17;3665:27;3655:2;;3706:1;3703;3696:12;3655:2;3743:6;3730:20;3765:60;3780:44;3817:6;3780:44;;3765:60;3756:69;;3845:6;3838:5;3831:21;3881:4;3873:6;3869:17;3914:4;3907:5;3903:16;3949:3;3940:6;3935:3;3931:16;3928:25;3925:2;;;3966:1;3963;3956:12;3925:2;3976:41;4010:6;4005:3;4000;3976:41;;;3648:375;;;;;;;;4032:442;;4144:3;4137:4;4129:6;4125:17;4121:27;4111:2;;4162:1;4159;4152:12;4111:2;4192:6;4186:13;4214:64;4229:48;4270:6;4229:48;;4214:64;4205:73;;4298:6;4291:5;4284:21;4334:4;4326:6;4322:17;4367:4;4360:5;4356:16;4402:3;4393:6;4388:3;4384:16;4381:25;4378:2;;;4419:1;4416;4409:12;4378:2;4429:39;4461:6;4456:3;4451;4429:39;;5654:126;5719:20;;5744:31;5719:20;5744:31;;5787:241;;5891:2;5879:9;5870:7;5866:23;5862:32;5859:2;;;5907:1;5904;5897:12;5859:2;5942:1;5959:53;6004:7;5984:9;5959:53;;;5949:63;5853:175;-1:-1;;;;5853:175;6035:366;;;6156:2;6144:9;6135:7;6131:23;6127:32;6124:2;;;6172:1;6169;6162:12;6124:2;6207:1;6224:53;6269:7;6249:9;6224:53;;;6214:63;;6186:97;6314:2;6332:53;6377:7;6368:6;6357:9;6353:22;6332:53;;;6322:63;;6293:98;6118:283;;;;;;6408:1415;;;;;;6701:3;6689:9;6680:7;6676:23;6672:33;6669:2;;;6718:1;6715;6708:12;6669:2;6753:31;;6804:18;6793:30;;6790:2;;;6836:1;6833;6826:12;6790:2;6856:78;6926:7;6917:6;6906:9;6902:22;6856:78;;;6846:88;;6732:208;6999:2;6988:9;6984:18;6971:32;7023:18;7015:6;7012:30;7009:2;;;7055:1;7052;7045:12;7009:2;7075:78;7145:7;7136:6;7125:9;7121:22;7075:78;;;7065:88;;6950:209;7218:2;7207:9;7203:18;7190:32;7242:18;7234:6;7231:30;7228:2;;;7274:1;7271;7264:12;7228:2;7294:84;7370:7;7361:6;7350:9;7346:22;7294:84;;;7284:94;;7169:215;7443:2;7432:9;7428:18;7415:32;7467:18;7459:6;7456:30;7453:2;;;7499:1;7496;7489:12;7453:2;7519:83;7594:7;7585:6;7574:9;7570:22;7519:83;;;7509:93;;7394:214;7667:3;7656:9;7652:19;7639:33;7692:18;7684:6;7681:30;7678:2;;;7724:1;7721;7714:12;7678:2;7744:63;7799:7;7790:6;7779:9;7775:22;7744:63;;;7734:73;;7618:195;6663:1160;;;;;;;;;7830:257;;7942:2;7930:9;7921:7;7917:23;7913:32;7910:2;;;7958:1;7955;7948:12;7910:2;7993:1;8010:61;8063:7;8043:9;8010:61;;8094:263;;8209:2;8197:9;8188:7;8184:23;8180:32;8177:2;;;8225:1;8222;8215:12;8177:2;8260:1;8277:64;8333:7;8313:9;8277:64;;8364:360;;8488:2;8476:9;8467:7;8463:23;8459:32;8456:2;;;8504:1;8501;8494:12;8456:2;8539:24;;8583:18;8572:30;;8569:2;;;8615:1;8612;8605:12;8569:2;8635:73;8700:7;8691:6;8680:9;8676:22;8635:73;;8731:241;;8835:2;8823:9;8814:7;8810:23;8806:32;8803:2;;;8851:1;8848;8841:12;8803:2;8886:1;8903:53;8948:7;8928:9;8903:53;;9249:366;;;9370:2;9358:9;9349:7;9345:23;9341:32;9338:2;;;9386:1;9383;9376:12;9338:2;9421:1;9438:53;9483:7;9463:9;9438:53;;;9428:63;;9400:97;9528:2;9546:53;9591:7;9582:6;9571:9;9567:22;9546:53;;9622:360;;;9740:2;9728:9;9719:7;9715:23;9711:32;9708:2;;;9756:1;9753;9746:12;9708:2;9791:1;9808:53;9853:7;9833:9;9808:53;;;9798:63;;9770:97;9898:2;9916:50;9958:7;9949:6;9938:9;9934:22;9916:50;;9989:733;;;;;;10156:3;10144:9;10135:7;10131:23;10127:33;10124:2;;;10173:1;10170;10163:12;10124:2;10208:1;10225:53;10270:7;10250:9;10225:53;;;10215:63;;10187:97;10315:2;10333:50;10375:7;10366:6;10355:9;10351:22;10333:50;;;10323:60;;10294:95;10420:2;10438:51;10481:7;10472:6;10461:9;10457:22;10438:51;;;10428:61;;10399:96;10526:2;10544:53;10589:7;10580:6;10569:9;10565:22;10544:53;;;10534:63;;10505:98;10634:3;10653:53;10698:7;10689:6;10678:9;10674:22;10653:53;;10730:173;;10817:46;10859:3;10851:6;10817:46;;;-1:-1;;10892:4;10883:14;;10810:93;10912:177;;11023:60;11079:3;11071:6;11023:60;;11288:173;;11375:46;11417:3;11409:6;11375:46;;11469:142;11560:45;11599:5;11560:45;;;11555:3;11548:58;11542:69;;;11618:103;11691:24;11709:5;11691:24;;11879:690;;12024:54;12072:5;12024:54;;;12091:86;12170:6;12165:3;12091:86;;;12084:93;;12198:56;12248:5;12198:56;;;12274:7;12302:1;12287:260;12312:6;12309:1;12306:13;12287:260;;;12379:6;12373:13;12400:63;12459:3;12444:13;12400:63;;;12393:70;;12480:60;12533:6;12480:60;;;12470:70;-1:-1;;12334:1;12327:9;12287:260;;;-1:-1;12560:3;;12003:566;-1:-1;;;;;12003:566;12604:888;;12759:59;12812:5;12759:59;;;12831:91;12915:6;12910:3;12831:91;;;12824:98;;12945:3;12987:4;12979:6;12975:17;12970:3;12966:27;13014:61;13069:5;13014:61;;;13095:7;13123:1;13108:345;13133:6;13130:1;13127:13;13108:345;;;13195:9;13189:4;13185:20;13180:3;13173:33;13240:6;13234:13;13262:74;13331:4;13316:13;13262:74;;;13254:82;;13353:65;13411:6;13353:65;;;13441:4;13432:14;;;;;13343:75;-1:-1;;13155:1;13148:9;13108:345;;;-1:-1;13466:4;;12738:754;-1:-1;;;;;;;12738:754;13529:896;;13686:60;13740:5;13686:60;;;13759:92;13844:6;13839:3;13759:92;;;13752:99;;13874:3;13916:4;13908:6;13904:17;13899:3;13895:27;13943:62;13999:5;13943:62;;;14025:7;14053:1;14038:348;14063:6;14060:1;14057:13;14038:348;;;14125:9;14119:4;14115:20;14110:3;14103:33;14170:6;14164:13;14192:76;14263:4;14248:13;14192:76;;;14184:84;;14285:66;14344:6;14285:66;;;14374:4;14365:14;;;;;14275:76;-1:-1;;14085:1;14078:9;14038:348;;14464:690;;14609:54;14657:5;14609:54;;;14676:86;14755:6;14750:3;14676:86;;;14669:93;;14783:56;14833:5;14783:56;;;14859:7;14887:1;14872:260;14897:6;14894:1;14891:13;14872:260;;;14964:6;14958:13;14985:63;15044:3;15029:13;14985:63;;;14978:70;;15065:60;15118:6;15065:60;;;15055:70;-1:-1;;14919:1;14912:9;14872:260;;15162:94;15229:21;15244:5;15229:21;;15374:113;15457:24;15475:5;15457:24;;15494:152;15595:45;15615:24;15633:5;15615:24;;;15595:45;;15653:343;;15763:38;15795:5;15763:38;;;15813:70;15876:6;15871:3;15813:70;;;15806:77;;15888:52;15933:6;15928:3;15921:4;15914:5;15910:16;15888:52;;;15961:29;15983:6;15961:29;;;15952:39;;;;15743:253;-1:-1;;;15743:253;16348:818;;16465:5;16459:12;16499:1;16488:9;16484:17;16512:1;16507:247;;;;16765:1;16760:400;;;;16477:683;;16507:247;16585:4;16581:1;16570:9;16566:17;16562:28;16604:70;16667:6;16662:3;16604:70;;;16708:9;16693:25;;16681:38;;16597:77;-1:-1;;16742:4;16733:14;;;-1:-1;16507:247;;16760:400;16829:1;16818:9;16814:17;16845:70;16908:6;16903:3;16845:70;;;16838:77;;16937:37;16968:5;16937:37;;;16990:1;16998:130;17012:6;17009:1;17006:13;16998:130;;;17071:14;;17058:11;;;17051:35;17118:1;17105:15;;;;17034:4;17027:12;16998:130;;;17142:11;;;-1:-1;;;16477:683;;16435:731;;;;;;17174:180;17284:64;17342:5;17284:64;;17538:160;17638:54;17686:5;17638:54;;17705:142;17796:45;17835:5;17796:45;;19737:394;;19897:67;19961:2;19956:3;19897:67;;;19997:34;19977:55;;20066:27;20061:2;20052:12;;20045:49;20122:2;20113:12;;19883:248;-1:-1;;19883:248;20140:442;;20300:67;20364:2;20359:3;20300:67;;;20400:34;20380:55;;20469:34;20464:2;20455:12;;20448:56;20538:6;20533:2;20524:12;;20517:28;20573:2;20564:12;;20286:296;-1:-1;;20286:296;20591:443;;20751:67;20815:2;20810:3;20751:67;;;20851:34;20831:55;;20920:34;20915:2;20906:12;;20899:56;20989:7;20984:2;20975:12;;20968:29;21025:2;21016:12;;20737:297;-1:-1;;20737:297;21043:398;;21221:84;21303:1;21298:3;21221:84;;;21338:66;21318:87;;21433:1;21424:11;;21207:234;-1:-1;;21207:234;21450:450;;21610:67;21674:2;21669:3;21610:67;;;21710:34;21690:55;;21779:34;21774:2;21765:12;;21758:56;21848:14;21843:2;21834:12;;21827:36;21891:2;21882:12;;21596:304;-1:-1;;21596:304;21909:324;;22069:67;22133:2;22128:3;22069:67;;;22169:26;22149:47;;22224:2;22215:12;;22055:178;-1:-1;;22055:178;22242:378;;22402:67;22466:2;22461:3;22402:67;;;22502:34;22482:55;;22571:11;22566:2;22557:12;;22550:33;22611:2;22602:12;;22388:232;-1:-1;;22388:232;22629:382;;22789:67;22853:2;22848:3;22789:67;;;22889:34;22869:55;;22958:15;22953:2;22944:12;;22937:37;23002:2;22993:12;;22775:236;-1:-1;;22775:236;23020:463;;23180:67;23244:2;23239:3;23180:67;;;23280:34;23260:55;;23349:34;23344:2;23335:12;;23328:56;23418:27;23413:2;23404:12;;23397:49;23474:2;23465:12;;23166:317;-1:-1;;23166:317;23492:448;;23652:67;23716:2;23711:3;23652:67;;;23752:34;23732:55;;23821:34;23816:2;23807:12;;23800:56;23890:12;23885:2;23876:12;;23869:34;23931:2;23922:12;;23638:302;-1:-1;;23638:302;23949:377;;24109:67;24173:2;24168:3;24109:67;;;24209:34;24189:55;;24278:10;24273:2;24264:12;;24257:32;24317:2;24308:12;;24095:231;-1:-1;;24095:231;24335:317;;24495:67;24559:2;24554:3;24495:67;;;24595:19;24575:40;;24643:2;24634:12;;24481:171;-1:-1;;24481:171;24661:477;;24839:85;24921:2;24916:3;24839:85;;;24957:34;24937:55;;25026:34;25021:2;25012:12;;25005:56;25095:5;25090:2;25081:12;;25074:27;25129:2;25120:12;;24825:313;-1:-1;;24825:313;25147:412;;25325:85;25407:2;25402:3;25325:85;;;25443:34;25423:55;;25512:9;25507:2;25498:12;;25491:31;25550:2;25541:12;;25311:248;-1:-1;;25311:248;25568:442;;25728:67;25792:2;25787:3;25728:67;;;25828:34;25808:55;;25897:34;25892:2;25883:12;;25876:56;25966:6;25961:2;25952:12;;25945:28;26001:2;25992:12;;25714:296;-1:-1;;25714:296;26019:370;;26179:67;26243:2;26238:3;26179:67;;;26279:34;26259:55;;26348:3;26343:2;26334:12;;26327:25;26380:2;26371:12;;26165:224;-1:-1;;26165:224;26398:384;;26558:67;26622:2;26617:3;26558:67;;;26658:34;26638:55;;26727:17;26722:2;26713:12;;26706:39;26773:2;26764:12;;26544:238;-1:-1;;26544:238;26791:442;;26951:67;27015:2;27010:3;26951:67;;;27051:34;27031:55;;27120:34;27115:2;27106:12;;27099:56;27189:6;27184:2;27175:12;;27168:28;27224:2;27215:12;;26937:296;-1:-1;;26937:296;27242:381;;27402:67;27466:2;27461:3;27402:67;;;27502:34;27482:55;;27571:14;27566:2;27557:12;;27550:36;27614:2;27605:12;;27388:235;-1:-1;;27388:235;27632:400;;27792:67;27856:2;27851:3;27792:67;;;27892:34;27872:55;;27961:33;27956:2;27947:12;;27940:55;28023:2;28014:12;;27778:254;-1:-1;;27778:254;28041:384;;28201:67;28265:2;28260:3;28201:67;;;28301:34;28281:55;;28370:17;28365:2;28356:12;;28349:39;28416:2;28407:12;;28187:238;-1:-1;;28187:238;28434:462;;28594:67;28658:2;28653:3;28594:67;;;28694:34;28674:55;;28763:34;28758:2;28749:12;;28742:56;28832:26;28827:2;28818:12;;28811:48;28887:2;28878:12;;28580:316;-1:-1;;28580:316;28905:391;;29065:67;29129:2;29124:3;29065:67;;;29165:34;29145:55;;29234:24;29229:2;29220:12;;29213:46;29287:2;29278:12;;29051:245;-1:-1;;29051:245;29305:379;;29465:67;29529:2;29524:3;29465:67;;;29565:34;29545:55;;29634:12;29629:2;29620:12;;29613:34;29675:2;29666:12;;29451:233;-1:-1;;29451:233;29693:321;;29853:67;29917:2;29912:3;29853:67;;;29953:23;29933:44;;30005:2;29996:12;;29839:175;-1:-1;;29839:175;30023:391;;30183:67;30247:2;30242:3;30183:67;;;30283:34;30263:55;;30352:24;30347:2;30338:12;;30331:46;30405:2;30396:12;;30169:245;-1:-1;;30169:245;30489:628;30704:23;;30634:4;30625:14;;;30733:57;30629:3;30704:23;30733:57;;;30654:142;30872:4;30865:5;30861:16;30855:23;30884:57;30935:4;30930:3;30926:14;30912:12;30884:57;;;30806:141;31021:4;31014:5;31010:16;31004:23;31033:63;31090:4;31085:3;31081:14;31067:12;31033:63;;31354:107;31433:22;31449:5;31433:22;;31468:650;;31723:148;31867:3;31723:148;;;31716:155;;31882:75;31953:3;31944:6;31882:75;;;31979:2;31974:3;31970:12;31963:19;;31993:75;32064:3;32055:6;31993:75;;;-1:-1;32090:2;32081:12;;31704:414;-1:-1;;31704:414;32125:372;;32324:148;32468:3;32324:148;;32504:372;;32703:148;32847:3;32703:148;;32883:213;33001:2;32986:18;;33015:71;32990:9;33059:6;33015:71;;33103:340;33257:2;33242:18;;33271:79;33246:9;33323:6;33271:79;;;33361:72;33429:2;33418:9;33414:18;33405:6;33361:72;;33450:953;33779:3;33764:19;;33794:71;33768:9;33838:6;33794:71;;;33876:80;33952:2;33941:9;33937:18;33928:6;33876:80;;;34004:9;33998:4;33994:20;33989:2;33978:9;33974:18;33967:48;34029:131;34155:4;34029:131;;;34021:139;;34208:9;34202:4;34198:20;34193:2;34182:9;34178:18;34171:48;34233:76;34304:4;34295:6;34233:76;;;34225:84;;34320:73;34388:3;34377:9;34373:19;34364:6;34320:73;;34410:324;34556:2;34541:18;;34570:71;34545:9;34614:6;34570:71;;34741:535;34937:3;34922:19;;34952:71;34926:9;34996:6;34952:71;;;35034:72;35102:2;35091:9;35087:18;35078:6;35034:72;;;35117:66;35179:2;35168:9;35164:18;35155:6;35117:66;;;35194:72;35262:2;35251:9;35247:18;35238:6;35194:72;;35283:831;35551:3;35536:19;;35566:71;35540:9;35610:6;35566:71;;;35648:72;35716:2;35705:9;35701:18;35692:6;35648:72;;;35768:9;35762:4;35758:20;35753:2;35742:9;35738:18;35731:48;35793:78;35866:4;35857:6;35793:78;;;35785:86;;35919:9;35913:4;35909:20;35904:2;35893:9;35889:18;35882:48;35944:76;36015:4;36006:6;35944:76;;;35936:84;;36031:73;36099:3;36088:9;36084:19;36075:6;36031:73;;;35522:592;;;;;;;;;36121:819;36383:3;36368:19;;36398:71;36372:9;36442:6;36398:71;;;36480:72;36548:2;36537:9;36533:18;36524:6;36480:72;;;36600:9;36594:4;36590:20;36585:2;36574:9;36570:18;36563:48;36625:75;36695:4;36686:6;36625:75;;;36617:83;;36748:9;36742:4;36738:20;36733:2;36722:9;36718:18;36711:48;36773:73;36841:4;36832:6;36773:73;;36947:1183;37371:3;37386:47;;;37356:19;;37447:108;37356:19;37541:6;37447:108;;;37439:116;;37603:9;37597:4;37593:20;37588:2;37577:9;37573:18;37566:48;37628:108;37731:4;37722:6;37628:108;;;37620:116;;37784:9;37778:4;37774:20;37769:2;37758:9;37754:18;37747:48;37809:120;37924:4;37915:6;37809:120;;;37801:128;;37977:9;37971:4;37967:20;37962:2;37951:9;37947:18;37940:48;38002:118;38115:4;38106:6;38002:118;;38137:213;38255:2;38240:18;;38269:71;38244:9;38313:6;38269:71;;38357:547;38559:3;38544:19;;38574:71;38548:9;38618:6;38574:71;;;38656:72;38724:2;38713:9;38709:18;38700:6;38656:72;;;38739;38807:2;38796:9;38792:18;38783:6;38739:72;;;38822;38890:2;38879:9;38875:18;38866:6;38822:72;;38911:423;39079:2;39064:18;;39093:71;39068:9;39137:6;39093:71;;;39175:72;39243:2;39232:9;39228:18;39219:6;39175:72;;;39258:66;39320:2;39309:9;39305:18;39296:6;39258:66;;39341:539;39539:3;39524:19;;39554:71;39528:9;39598:6;39554:71;;;39636:68;39700:2;39689:9;39685:18;39676:6;39636:68;;;39715:72;39783:2;39772:9;39768:18;39759:6;39715:72;;39887:267;40032:2;40017:18;;40046:98;40021:9;40117:6;40046:98;;40425:247;40560:2;40545:18;;40574:88;40549:9;40635:6;40574:88;;40679:293;40813:2;40827:47;;;40798:18;;40888:74;40798:18;40948:6;40888:74;;41287:407;41478:2;41492:47;;;41463:18;;41553:131;41463:18;41553:131;;41701:407;41892:2;41906:47;;;41877:18;;41967:131;41877:18;41967:131;;42115:407;42306:2;42320:47;;;42291:18;;42381:131;42291:18;42381:131;;42529:407;42720:2;42734:47;;;42705:18;;42795:131;42705:18;42795:131;;42943:407;43134:2;43148:47;;;43119:18;;43209:131;43119:18;43209:131;;43357:407;43548:2;43562:47;;;43533:18;;43623:131;43533:18;43623:131;;43771:407;43962:2;43976:47;;;43947:18;;44037:131;43947:18;44037:131;;44185:407;44376:2;44390:47;;;44361:18;;44451:131;44361:18;44451:131;;44599:407;44790:2;44804:47;;;44775:18;;44865:131;44775:18;44865:131;;45013:407;45204:2;45218:47;;;45189:18;;45279:131;45189:18;45279:131;;45427:407;45618:2;45632:47;;;45603:18;;45693:131;45603:18;45693:131;;45841:407;46032:2;46046:47;;;46017:18;;46107:131;46017:18;46107:131;;46255:407;46446:2;46460:47;;;46431:18;;46521:131;46431:18;46521:131;;46669:407;46860:2;46874:47;;;46845:18;;46935:131;46845:18;46935:131;;47083:407;47274:2;47288:47;;;47259:18;;47349:131;47259:18;47349:131;;47497:407;47688:2;47702:47;;;47673:18;;47763:131;47673:18;47763:131;;47911:407;48102:2;48116:47;;;48087:18;;48177:131;48087:18;48177:131;;48325:407;48516:2;48530:47;;;48501:18;;48591:131;48501:18;48591:131;;48739:407;48930:2;48944:47;;;48915:18;;49005:131;48915:18;49005:131;;49153:407;49344:2;49358:47;;;49329:18;;49419:131;49329:18;49419:131;;49567:407;49758:2;49772:47;;;49743:18;;49833:131;49743:18;49833:131;;49981:407;50172:2;50186:47;;;50157:18;;50247:131;50157:18;50247:131;;50395:317;50565:2;50550:18;;50579:123;50554:9;50675:6;50579:123;;50939:1847;51531:3;51516:19;;51546:71;51520:9;51590:6;51546:71;;;51628:80;51704:2;51693:9;51689:18;51680:6;51628:80;;;51756:9;51750:4;51746:20;51741:2;51730:9;51726:18;51719:48;51781:108;51884:4;51875:6;51781:108;;;51773:116;;51937:9;51931:4;51927:20;51922:2;51911:9;51907:18;51900:48;51962:108;52065:4;52056:6;51962:108;;;51954:116;;52119:9;52113:4;52109:20;52103:3;52092:9;52088:19;52081:49;52144:120;52259:4;52250:6;52144:120;;;52136:128;;52313:9;52307:4;52303:20;52297:3;52286:9;52282:19;52275:49;52338:118;52451:4;52442:6;52338:118;;;52330:126;;52467:73;52535:3;52524:9;52520:19;52511:6;52467:73;;;52551;52619:3;52608:9;52604:19;52595:6;52551:73;;;52673:9;52667:4;52663:20;52657:3;52646:9;52642:19;52635:49;52698:78;52771:4;52762:6;52698:78;;;52690:86;51502:1284;-1:-1;;;;;;;;;;;51502:1284;52793:1083;53123:3;53108:19;;53138:71;53112:9;53182:6;53138:71;;;53220:72;53288:2;53277:9;53273:18;53264:6;53220:72;;;53303;53371:2;53360:9;53356:18;53347:6;53303:72;;;53386;53454:2;53443:9;53439:18;53430:6;53386:72;;;53469:73;53537:3;53526:9;53522:19;53513:6;53469:73;;;53553;53621:3;53610:9;53606:19;53597:6;53553:73;;;53637;53705:3;53694:9;53690:19;53681:6;53637:73;;;53721:67;53783:3;53772:9;53768:19;53759:6;53721:67;;;53799;53861:3;53850:9;53846:19;53837:6;53799:67;;;53094:782;;;;;;;;;;;;;53883:324;54029:2;54014:18;;54043:71;54018:9;54087:6;54043:71;;54214:256;54276:2;54270:9;54302:17;;;54377:18;54362:34;;54398:22;;;54359:62;54356:2;;;54434:1;54431;54424:12;54356:2;54450;54443:22;54254:216;;-1:-1;54254:216;54477:304;;54636:18;54628:6;54625:30;54622:2;;;54668:1;54665;54658:12;54622:2;-1:-1;54703:4;54691:17;;;54756:15;;54559:222;55732:317;;55871:18;55863:6;55860:30;55857:2;;;55903:1;55900;55893:12;55857:2;-1:-1;56034:4;55970;55947:17;;;;55966:9;55943:33;56024:15;;55794:255;57038:151;57162:4;57153:14;;57110:79;57681:157;;57775:14;;;57817:4;57804:18;;;57734:104;58010:137;58113:12;;58084:63;59575:178;59693:19;;;59742:4;59733:14;;59686:67;61153:91;;61215:24;61233:5;61215:24;;61251:85;61317:13;61310:21;;61293:43;61422:144;61503:5;61509:52;61503:5;61509:52;;61573:121;61646:42;61635:54;;61618:76;61780:81;61851:4;61840:16;;61823:38;61868:129;;61955:37;61986:5;62004:175;;62110:64;62168:5;62110:64;;62637:144;;62733:43;62770:5;62733:43;;62788:116;;62875:24;62893:5;62875:24;;63155:145;63236:6;63231:3;63226;63213:30;-1:-1;63292:1;63274:16;;63267:27;63206:94;63309:268;63374:1;63381:101;63395:6;63392:1;63389:13;63381:101;;;63462:11;;;63456:18;63443:11;;;63436:39;63417:2;63410:10;63381:101;;;63497:6;63494:1;63491:13;63488:2;;;-1:-1;;63562:1;63544:16;;63537:27;63358:219;63666:97;63754:2;63734:14;63750:7;63730:28;;63714:49;63771:110;63859:1;63852:5;63849:12;63839:2;;63865:9;63888:117;63957:24;63975:5;63957:24;;;63950:5;63947:35;63937:2;;63996:1;63993;63986:12;64012:111;64078:21;64093:5;64078:21;;64130:117;64199:24;64217:5;64199:24;;64378:113;64445:22;64461:5;64445:22;", - "source": "pragma solidity ^0.5.17;\npragma experimental ABIEncoderV2;\n\n// Original work from Compound: https://github.com/yamound-finance/yamound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol\n// Modified to work in the YAM system\n\n// all votes work on underlying _yamBalances[address], not balanceOf(address)\n\n// Original audit: https://blog.openzeppelin.com/compound-alpha-governance-system-audit/\n// Overview:\n// No Critical\n// High:\n// Issue:\n// Approved proposal may be impossible to queue, cancel or execute\n// Fixed with `proposalMaxOperations`\n// Issue:\n// Queued proposal with repeated actions cannot be executed\n// Fixed by explicitly disallow proposals with repeated actions to be queued in the Timelock contract.\n//\n// Changes made by YAM after audit:\n// Formatting, naming, & uint256 instead of uint\n// Since YAM supply changes, updated quorum & proposal requirements\n// If any uint96, changed to uint256 to match YAM as opposed to comp\n\n\nimport \"../lib/SafeMath.sol\";\n\ncontract GovernorAlpha {\n /// @notice The name of this contract\n string public constant name = \"YAM Governor Alpha\";\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n function quorumVotes() public view returns (uint256) { return SafeMath.div(SafeMath.mul(yam.initSupply(), 4), 100); } // 4% of YAM\n\n /// @notice The number of votes required in order for a voter to become a proposer\n function proposalThreshold() public view returns (uint256) { return SafeMath.div(yam.initSupply(), 100); } // 1% of YAM\n\n /// @notice The maximum number of actions that can be included in a proposal\n function proposalMaxOperations() public pure returns (uint256) { return 10; } // 10 actions\n\n /// @notice The delay before voting on a proposal may take place, once proposed\n function votingDelay() public pure returns (uint256) { return 1; } // 1 block\n\n /// @notice The duration of voting on a proposal, in blocks\n function votingPeriod() public pure returns (uint256) { return 17280; } // ~3 days in blocks (assuming 15s blocks)\n\n /// @notice The address of the Compound Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Compound governance token\n YAMInterface public yam;\n\n /// @notice The address of the Governor Guardian\n address public guardian;\n\n /// @notice The total number of proposals\n uint256 public proposalCount;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint256 id;\n\n /// @notice Creator of the proposal\n address proposer;\n\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint256 eta;\n\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint256 startBlock;\n\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint256 endBlock;\n\n /// @notice Current number of votes in favor of this proposal\n uint256 forVotes;\n\n /// @notice Current number of votes in opposition to this proposal\n uint256 againstVotes;\n\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n\n /// @notice Receipts of ballots for the entire set of voters\n mapping (address => Receipt) receipts;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n\n /// @notice Whether or not the voter supports the proposal\n bool support;\n\n /// @notice The number of votes the voter had, which were cast\n uint256 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The official record of all proposals ever proposed\n mapping (uint256 => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping (address => uint256) public latestProposalIds;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,bool support)\");\n\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(uint256 id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description);\n\n /// @notice An event emitted when a vote has been cast on a proposal\n event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint256 id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint256 id, uint256 eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint256 id);\n\n constructor(address timelock_, address yam_) public {\n timelock = TimelockInterface(timelock_);\n yam = YAMInterface(yam_);\n guardian = msg.sender;\n }\n\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description\n )\n public\n returns (uint256)\n {\n require(yam.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), \"GovernorAlpha::propose: proposer votes below proposal threshold\");\n require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, \"GovernorAlpha::propose: proposal function information arity mismatch\");\n require(targets.length != 0, \"GovernorAlpha::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations(), \"GovernorAlpha::propose: too many actions\");\n\n uint256 latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(proposersLatestProposalState != ProposalState.Active, \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\");\n require(proposersLatestProposalState != ProposalState.Pending, \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\");\n }\n\n uint256 startBlock = add256(block.number, votingDelay());\n uint256 endBlock = add256(startBlock, votingPeriod());\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n canceled: false,\n executed: false\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description\n );\n return newProposal.id;\n }\n\n function queue(uint256 proposalId)\n public\n {\n require(state(proposalId) == ProposalState.Succeeded, \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\");\n Proposal storage proposal = proposals[proposalId];\n uint256 eta = add256(block.timestamp, timelock.delay());\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n _queueOrRevert(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function _queueOrRevert(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n )\n internal\n {\n require(!timelock.queuedTransactions(\n keccak256(\n abi.encode(\n target,\n value,\n signature,\n data,\n eta\n )\n )\n ),\n \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"\n );\n\n timelock.queueTransaction(target, value, signature, data, eta);\n }\n\n function execute(uint256 proposalId)\n public\n payable\n {\n require(state(proposalId) == ProposalState.Queued, \"GovernorAlpha::execute: proposal can only be executed if it is queued\");\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n emit ProposalExecuted(proposalId);\n }\n\n function cancel(uint256 proposalId)\n public\n {\n ProposalState state = state(proposalId);\n require(state != ProposalState.Executed, \"GovernorAlpha::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(msg.sender == guardian || yam.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), \"GovernorAlpha::cancel: proposer above threshold\");\n\n proposal.canceled = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n function getActions(uint256 proposalId)\n public\n view\n returns (\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas\n )\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n function getReceipt(uint256 proposalId, address voter)\n public\n view\n returns (Receipt memory)\n {\n return proposals[proposalId].receipts[voter];\n }\n\n function state(uint256 proposalId)\n public\n view\n returns (ProposalState)\n {\n require(proposalCount >= proposalId && proposalId > 0, \"GovernorAlpha::state: invalid proposal id\");\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n function castVote(uint256 proposalId, bool support)\n public\n {\n return _castVote(msg.sender, proposalId, support);\n }\n\n function castVoteBySig(\n uint256 proposalId,\n bool support,\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n public\n {\n bytes32 domainSeparator = keccak256(\n abi.encode(\n DOMAIN_TYPEHASH,\n keccak256(bytes(name)),\n getChainId(),\n address(this)\n )\n );\n\n bytes32 structHash = keccak256(\n abi.encode(\n BALLOT_TYPEHASH,\n proposalId,\n support\n )\n );\n\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n domainSeparator,\n structHash\n )\n );\n\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorAlpha::castVoteBySig: invalid signature\");\n return _castVote(signatory, proposalId, support);\n }\n\n function _castVote(\n address voter,\n uint256 proposalId,\n bool support\n )\n internal\n {\n require(state(proposalId) == ProposalState.Active, \"GovernorAlpha::_castVote: voting is closed\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorAlpha::_castVote: voter already voted\");\n uint256 votes = yam.getPriorVotes(voter, proposal.startBlock);\n\n if (support) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n emit VoteCast(voter, proposalId, support, votes);\n }\n\n function __acceptAdmin()\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\");\n timelock.acceptAdmin();\n }\n\n function __abdicate()\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__abdicate: sender must be gov guardian\");\n guardian = address(0);\n }\n\n function __queueSetTimelockPendingAdmin(\n address newPendingAdmin,\n uint256 eta\n )\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.queueTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function __executeSetTimelockPendingAdmin(\n address newPendingAdmin,\n uint256 eta\n )\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.executeTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainId() internal pure returns (uint256) {\n uint256 chainId;\n assembly { chainId := chainid() }\n return chainId;\n }\n}\n\ninterface TimelockInterface {\n function delay() external view returns (uint256);\n function GRACE_PERIOD() external view returns (uint256);\n function acceptAdmin() external;\n function queuedTransactions(bytes32 hash) external view returns (bool);\n function queueTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external returns (bytes32);\n function cancelTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external;\n function executeTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external payable returns (bytes memory);\n}\n\ninterface YAMInterface {\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256);\n function initSupply() external view returns (uint256);\n function _acceptGov() external;\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "exportedSymbols": { - "GovernorAlpha": [ - 12250 - ], - "TimelockInterface": [ - 12314 - ], - "YAMInterface": [ - 12332 - ] - }, - "id": 12333, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 11066, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "id": 11067, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:10" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 11068, - "nodeType": "ImportDirective", - "scope": 12333, - "sourceUnit": 14993, - "src": "1007:29:10", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12250, - "linearizedBaseContracts": [ - 12250 - ], - "name": "GovernorAlpha", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 11071, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "1109:50:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 11069, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1109:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "59414d20476f7665726e6f7220416c706861", - "id": 11070, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1139:20:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9", - "typeString": "literal_string \"YAM Governor Alpha\"" - }, - "value": "YAM Governor Alpha" - }, - "visibility": "public" - }, - { - "body": { - "id": 11088, - "nodeType": "Block", - "src": "1351:64:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11080, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1386:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1386:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1386:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "34", - "id": 11083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1404:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 11078, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1373:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:33:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11076, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1360:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1360:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11075, - "id": 11087, - "nodeType": "Return", - "src": "1353:59:10" - } - ] - }, - "documentation": "@notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed", - "id": 11089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "quorumVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11072, - "nodeType": "ParameterList", - "parameters": [], - "src": "1318:2:10" - }, - "returnParameters": { - "id": 11075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11074, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11089, - "src": "1342:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1342:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1341:9:10" - }, - "scope": 12250, - "src": "1298:117:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11102, - "nodeType": "Block", - "src": "1580:47:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11096, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1602:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1602:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1602:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1620:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11094, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1589:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1589:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11093, - "id": 11101, - "nodeType": "Return", - "src": "1582:42:10" - } - ] - }, - "documentation": "@notice The number of votes required in order for a voter to become a proposer", - "id": 11103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11090, - "nodeType": "ParameterList", - "parameters": [], - "src": "1547:2:10" - }, - "returnParameters": { - "id": 11093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11092, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11103, - "src": "1571:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1571:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1570:9:10" - }, - "scope": 12250, - "src": "1521:106:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11110, - "nodeType": "Block", - "src": "1790:14:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 11108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:2:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "functionReturnParameters": 11107, - "id": 11109, - "nodeType": "Return", - "src": "1792:9:10" - } - ] - }, - "documentation": "@notice The maximum number of actions that can be included in a proposal", - "id": 11111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalMaxOperations", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1757:2:10" - }, - "returnParameters": { - "id": 11107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11111, - "src": "1781:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1781:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:9:10" - }, - "scope": 12250, - "src": "1727:77:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11118, - "nodeType": "Block", - "src": "1961:13:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "31", - "id": 11116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1970:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "functionReturnParameters": 11115, - "id": 11117, - "nodeType": "Return", - "src": "1963:8:10" - } - ] - }, - "documentation": "@notice The delay before voting on a proposal may take place, once proposed", - "id": 11119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11112, - "nodeType": "ParameterList", - "parameters": [], - "src": "1928:2:10" - }, - "returnParameters": { - "id": 11115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11114, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11119, - "src": "1952:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1952:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1951:9:10" - }, - "scope": 12250, - "src": "1908:66:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11126, - "nodeType": "Block", - "src": "2109:17:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3137323830", - "id": 11124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2118:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17280_by_1", - "typeString": "int_const 17280" - }, - "value": "17280" - }, - "functionReturnParameters": 11123, - "id": 11125, - "nodeType": "Return", - "src": "2111:12:10" - } - ] - }, - "documentation": "@notice The duration of voting on a proposal, in blocks", - "id": 11127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11120, - "nodeType": "ParameterList", - "parameters": [], - "src": "2076:2:10" - }, - "returnParameters": { - "id": 11123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11122, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11127, - "src": "2100:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2100:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2099:9:10" - }, - "scope": 12250, - "src": "2055:71:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11129, - "name": "timelock", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2237:33:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - }, - "typeName": { - "contractScope": null, - "id": 11128, - "name": "TimelockInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12314, - "src": "2237:17:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11131, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2338:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - }, - "typeName": { - "contractScope": null, - "id": 11130, - "name": "YAMInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12332, - "src": "2338:12:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11133, - "name": "guardian", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2421:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2421:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11135, - "name": "proposalCount", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2497:28:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2497:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Proposal", - "id": 11170, - "members": [ - { - "constant": false, - "id": 11137, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2614:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11136, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11139, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2679:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11138, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2679:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11141, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2818:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2818:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11144, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2918:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2918:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11143, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2918:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11147, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3047:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11145, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3047:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3047:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11150, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3144:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11148, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3144:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11149, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3144:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11153, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3249:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3249:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11152, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11155, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3385:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11154, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3385:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11157, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3505:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3505:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11159, - "name": "forVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3602:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3602:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11161, - "name": "againstVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3704:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3704:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11163, - "name": "canceled", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3807:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11162, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3807:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11165, - "name": "executed", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3903:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11164, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3903:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11169, - "name": "receipts", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3996:37:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "typeName": { - "id": 11168, - "keyType": { - "id": 11166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3996:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "valueType": { - "contractScope": null, - "id": 11167, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "4016:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Proposal", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "2532:1508:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Receipt", - "id": 11177, - "members": [ - { - "constant": false, - "id": 11172, - "name": "hasVoted", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4177:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4177:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11174, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4268:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11173, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4268:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11176, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4362:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4362:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Receipt", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "4096:286:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.ProposalState", - "id": 11186, - "members": [ - { - "id": 11178, - "name": "Pending", - "nodeType": "EnumValue", - "src": "4475:7:10" - }, - { - "id": 11179, - "name": "Active", - "nodeType": "EnumValue", - "src": "4492:6:10" - }, - { - "id": 11180, - "name": "Canceled", - "nodeType": "EnumValue", - "src": "4508:8:10" - }, - { - "id": 11181, - "name": "Defeated", - "nodeType": "EnumValue", - "src": "4526:8:10" - }, - { - "id": 11182, - "name": "Succeeded", - "nodeType": "EnumValue", - "src": "4544:9:10" - }, - { - "id": 11183, - "name": "Queued", - "nodeType": "EnumValue", - "src": "4563:6:10" - }, - { - "id": 11184, - "name": "Expired", - "nodeType": "EnumValue", - "src": "4579:7:10" - }, - { - "id": 11185, - "name": "Executed", - "nodeType": "EnumValue", - "src": "4596:8:10" - } - ], - "name": "ProposalState", - "nodeType": "EnumDefinition", - "src": "4446:164:10" - }, - { - "constant": false, - "id": 11190, - "name": "proposals", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4683:46:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "typeName": { - "id": 11189, - "keyType": { - "id": 11187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4692:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "4683:29:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "valueType": { - "contractScope": null, - "id": 11188, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "4703:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11194, - "name": "latestProposalIds", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4790:53:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 11193, - "keyType": { - "id": 11191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "4790:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 11192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4810:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 11199, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4913:122:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11195, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4913:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 11197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4965:69:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 11196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4955:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4955:80:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 11204, - "name": "BALLOT_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "5122:94:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11200, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5122:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20737570706f727429", - "id": 11202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5174:41:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - }, - "value": "Ballot(uint256 proposalId,bool support)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - } - ], - "id": 11201, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5164:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a new proposal is created", - "id": 11228, - "name": "ProposalCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 11227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11206, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5309:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5309:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11208, - "indexed": false, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5321:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5321:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11211, - "indexed": false, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5339:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5339:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11210, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5339:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11214, - "indexed": false, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5358:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11212, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5358:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11213, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5358:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11217, - "indexed": false, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5373:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5373:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11216, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11220, - "indexed": false, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5394:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11218, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11219, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5394:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11222, - "indexed": false, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5413:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5413:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11224, - "indexed": false, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5433:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5433:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11226, - "indexed": false, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5451:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11225, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5451:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5308:162:10" - }, - "src": "5287:184:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a vote has been cast on a proposal", - "id": 11238, - "name": "VoteCast", - "nodeType": "EventDefinition", - "parameters": { - "id": 11237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11230, - "indexed": false, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5565:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5565:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11232, - "indexed": false, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5580:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5580:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11234, - "indexed": false, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5600:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11233, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5600:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11236, - "indexed": false, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5614:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5564:64:10" - }, - "src": "5550:79:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been canceled", - "id": 11242, - "name": "ProposalCanceled", - "nodeType": "EventDefinition", - "parameters": { - "id": 11241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11240, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11242, - "src": "5725:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5725:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5724:12:10" - }, - "src": "5702:35:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been queued in the Timelock", - "id": 11248, - "name": "ProposalQueued", - "nodeType": "EventDefinition", - "parameters": { - "id": 11247, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11244, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5845:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5845:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11246, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5857:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5857:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5844:25:10" - }, - "src": "5824:46:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been executed in the Timelock", - "id": 11252, - "name": "ProposalExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 11251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11250, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11252, - "src": "5982:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5982:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5981:12:10" - }, - "src": "5959:35:10" - }, - { - "body": { - "id": 11276, - "nodeType": "Block", - "src": "6052:121:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11259, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "6062:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11261, - "name": "timelock_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11254, - "src": "6091:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11260, - "name": "TimelockInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12314, - "src": "6073:17:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_TimelockInterface_$12314_$", - "typeString": "type(contract TimelockInterface)" - } - }, - "id": 11262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6073:28:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "src": "6062:39:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11264, - "nodeType": "ExpressionStatement", - "src": "6062:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11265, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6111:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11267, - "name": "yam_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11256, - "src": "6130:4:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11266, - "name": "YAMInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12332, - "src": "6117:12:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMInterface_$12332_$", - "typeString": "type(contract YAMInterface)" - } - }, - "id": 11268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6117:18:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "src": "6111:24:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11270, - "nodeType": "ExpressionStatement", - "src": "6111:24:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11271, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "6145:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11272, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6156:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6145:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11275, - "nodeType": "ExpressionStatement", - "src": "6145:21:10" - } - ] - }, - "documentation": null, - "id": 11277, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11257, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11254, - "name": "timelock_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6012:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6012:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11256, - "name": "yam_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6031:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11255, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6031:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6011:33:10" - }, - "returnParameters": { - "id": 11258, - "nodeType": "ParameterList", - "parameters": [], - "src": "6052:0:10" - }, - "scope": 12250, - "src": "6000:173:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11456, - "nodeType": "Block", - "src": "6416:2092:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11299, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6452:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6452:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11302, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6471:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6471:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6485:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11301, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "6464:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6464:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11297, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6434:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "6434:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6434:54:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11307, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "6491:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6491:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6434:76:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657220766f7465732062656c6f772070726f706f73616c207468726573686f6c64", - "id": 11310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6512:65:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - }, - "value": "GovernorAlpha::propose: proposer votes below proposal threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - } - ], - "id": 11296, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6426:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6426:152:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11312, - "nodeType": "ExpressionStatement", - "src": "6426:152:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11314, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6596:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6596:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11316, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "6614:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 11317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6614:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6596:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11319, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6631:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6631:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11321, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "6649:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 11322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6649:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6631:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:70:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11325, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6670:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6670:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11327, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "6688:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 11328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6688:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6670:34:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:108:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368", - "id": 11331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6706:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - }, - "value": "GovernorAlpha::propose: proposal function information arity mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - } - ], - "id": 11313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6588:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6588:189:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11333, - "nodeType": "ExpressionStatement", - "src": "6588:189:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11335, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6795:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6795:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6813:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6795:19:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f7669646520616374696f6e73", - "id": 11339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6816:46:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - }, - "value": "GovernorAlpha::propose: must provide actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - } - ], - "id": 11334, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6787:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6787:76:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11341, - "nodeType": "ExpressionStatement", - "src": "6787:76:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11343, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6881:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6881:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11345, - "name": "proposalMaxOperations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11111, - "src": "6899:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6899:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6881:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7920616374696f6e73", - "id": 11348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:42:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - }, - "value": "GovernorAlpha::propose: too many actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - } - ], - "id": 11342, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6873:94:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11350, - "nodeType": "ExpressionStatement", - "src": "6873:94:10" - }, - { - "assignments": [ - 11352 - ], - "declarations": [ - { - "constant": false, - "id": 11352, - "name": "latestProposalId", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "6978:24:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6978:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11357, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11353, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "7005:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11356, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7023:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7023:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7005:29:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6978:56:10" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11358, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7048:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7068:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7048:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 11384, - "nodeType": "IfStatement", - "src": "7044:450:10", - "trueBody": { - "id": 11383, - "nodeType": "Block", - "src": "7071:423:10", - "statements": [ - { - "assignments": [ - 11362 - ], - "declarations": [ - { - "constant": false, - "id": 11362, - "name": "proposersLatestProposalState", - "nodeType": "VariableDeclaration", - "scope": 11383, - "src": "7083:42:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11361, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "7083:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11364, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7134:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11363, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "7128:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7083:68:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11368, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11369, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7203:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7203:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7171:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c7265616479206163746976652070726f706f73616c", - "id": 11372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7225:90:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - } - ], - "id": 11367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7163:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7163:153:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11374, - "nodeType": "ExpressionStatement", - "src": "7163:153:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11376, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7336:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11377, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7368:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7368:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7336:53:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c72656164792070656e64696e672070726f706f73616c", - "id": 11380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7391:91:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - } - ], - "id": 11375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7328:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7328:155:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11382, - "nodeType": "ExpressionStatement", - "src": "7328:155:10" - } - ] - } - }, - { - "assignments": [ - 11386 - ], - "declarations": [ - { - "constant": false, - "id": 11386, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7504:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11385, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7504:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11393, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11388, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "7532:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7532:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11390, - "name": "votingDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11119, - "src": "7546:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7546:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11387, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7525:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7525:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7504:56:10" - }, - { - "assignments": [ - 11395 - ], - "declarations": [ - { - "constant": false, - "id": 11395, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7570:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7570:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11401, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11397, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7596:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11398, - "name": "votingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11127, - "src": "7608:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7608:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11396, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7589:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7589:34:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7570:53:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7634:15:10", - "subExpression": { - "argumentTypes": null, - "id": 11402, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7634:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11404, - "nodeType": "ExpressionStatement", - "src": "7634:15:10" - }, - { - "assignments": [ - 11406 - ], - "declarations": [ - { - "constant": false, - "id": 11406, - "name": "newProposal", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7659:27:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11405, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "7659:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11423, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11408, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7716:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11409, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7753:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7753:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7782:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 11412, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "7806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11413, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "7835:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11414, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "7867:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11415, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "7902:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11416, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7937:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11417, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "7971:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8003:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8032:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8057:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8086:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11407, - "name": "Proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11170, - "src": "7689:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Proposal_$11170_storage_ptr_$", - "typeString": "type(struct GovernorAlpha.Proposal storage pointer)" - } - }, - "id": 11422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "id", - "proposer", - "eta", - "targets", - "values", - "signatures", - "calldatas", - "startBlock", - "endBlock", - "forVotes", - "againstVotes", - "canceled", - "executed" - ], - "nodeType": "FunctionCall", - "src": "7689:413:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7659:443:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11424, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8113:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11427, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11425, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8123:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8123:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8113:25:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11428, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8141:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "src": "8113:39:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11430, - "nodeType": "ExpressionStatement", - "src": "8113:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11431, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "8162:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11434, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11432, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8180:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11433, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "8180:20:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8162:39:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11435, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8204:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11436, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8204:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8162:56:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11438, - "nodeType": "ExpressionStatement", - "src": "8162:56:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11440, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8263:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8263:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11442, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8291:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8291:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11444, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "8315:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11445, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "8336:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11446, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "8356:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11447, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "8380:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11448, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "8403:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11449, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "8427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11450, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11291, - "src": "8449:11:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11439, - "name": "ProposalCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11228, - "src": "8234:15:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,address[] memory,uint256[] memory,string memory[] memory,bytes memory[] memory,uint256,uint256,string memory)" - } - }, - "id": 11451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8234:236:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11452, - "nodeType": "EmitStatement", - "src": "8229:241:10" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11453, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8487:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8487:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11295, - "id": 11455, - "nodeType": "Return", - "src": "8480:21:10" - } - ] - }, - "documentation": null, - "id": 11457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "propose", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11280, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6205:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11278, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6205:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11279, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6205:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11283, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6239:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11281, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6239:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6239:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11286, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6269:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11284, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6269:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11285, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6269:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11289, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6305:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11287, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6305:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11288, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11291, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6339:25:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6339:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6195:175:10" - }, - "returnParameters": { - "id": 11295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6403:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6403:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6402:9:10" - }, - "scope": 12250, - "src": "6179:2329:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11533, - "nodeType": "Block", - "src": "8568:629:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11464, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8592:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11463, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "8586:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8586:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11466, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "8607:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8607:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "8586:44:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c2063616e206f6e6c792062652071756575656420696620697420697320737563636565646564", - "id": 11469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8632:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - }, - "value": "GovernorAlpha::queue: proposal can only be queued if it is succeeded" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - } - ], - "id": 11462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8578:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8578:125:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11471, - "nodeType": "ExpressionStatement", - "src": "8578:125:10" - }, - { - "assignments": [ - 11473 - ], - "declarations": [ - { - "constant": false, - "id": 11473, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8713:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11472, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "8713:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11477, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11474, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8741:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11476, - "indexExpression": { - "argumentTypes": null, - "id": 11475, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8751:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8741:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8713:49:10" - }, - { - "assignments": [ - 11479 - ], - "declarations": [ - { - "constant": false, - "id": 11479, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8772:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11478, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8772:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11481, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "8793:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8793:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11483, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "8810:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delay", - "nodeType": "MemberAccess", - "referencedDeclaration": 12255, - "src": "8810:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11480, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "8786:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8786:41:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8772:55:10" - }, - { - "body": { - "id": 11520, - "nodeType": "Block", - "src": "8891:226:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11501, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8937:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11502, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8937:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11504, - "indexExpression": { - "argumentTypes": null, - "id": 11503, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8954:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8937:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11505, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8974:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "8974:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11508, - "indexExpression": { - "argumentTypes": null, - "id": 11507, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8990:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8974:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11509, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9010:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11510, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "9010:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11512, - "indexExpression": { - "argumentTypes": null, - "id": 11511, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9030:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9010:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11513, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9050:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "9050:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11516, - "indexExpression": { - "argumentTypes": null, - "id": 11515, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9069:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9050:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "id": 11517, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9089:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11500, - "name": "_queueOrRevert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11576, - "src": "8905:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8905:201:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11519, - "nodeType": "ExpressionStatement", - "src": "8905:201:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11492, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8857:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11493, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8861:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11494, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8861:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8861:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8857:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11521, - "initializationExpression": { - "assignments": [ - 11489 - ], - "declarations": [ - { - "constant": false, - "id": 11489, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11521, - "src": "8842:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11488, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8842:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11491, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8842:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8886:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11497, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8886:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11499, - "nodeType": "ExpressionStatement", - "src": "8886:3:10" - }, - "nodeType": "ForStatement", - "src": "8837:280:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11522, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9126:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "9126:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11525, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9141:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9126:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11527, - "nodeType": "ExpressionStatement", - "src": "9126:18:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11529, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "9174:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11530, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9186:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11528, - "name": "ProposalQueued", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11248, - "src": "9159:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 11531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9159:31:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11532, - "nodeType": "EmitStatement", - "src": "9154:36:10" - } - ] - }, - "documentation": null, - "id": 11534, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11459, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11534, - "src": "8529:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8529:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8528:20:10" - }, - "returnParameters": { - "id": 11461, - "nodeType": "ParameterList", - "parameters": [], - "src": "8568:0:10" - }, - "scope": 12250, - "src": "8514:683:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11575, - "nodeType": "Block", - "src": "9382:468:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9400:278:10", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11553, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9507:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11554, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9537:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11555, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11556, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9599:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11557, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9627:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9473:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9473:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9473:177:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "9444:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9444:222:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11548, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9401:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queuedTransactions", - "nodeType": "MemberAccess", - "referencedDeclaration": 12270, - "src": "9401:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 11560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9401:277:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a2070726f706f73616c20616374696f6e20616c72656164792071756575656420617420657461", - "id": 11562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9690:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - }, - "value": "GovernorAlpha::_queueOrRevert: proposal action already queued at eta" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - } - ], - "id": 11547, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9392:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9392:378:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11564, - "nodeType": "ExpressionStatement", - "src": "9392:378:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11568, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9807:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11569, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9815:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11570, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9822:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11571, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9833:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11572, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9839:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11565, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9781:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "9781:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 11573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9781:62:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 11574, - "nodeType": "ExpressionStatement", - "src": "9781:62:10" - } - ] - }, - "documentation": null, - "id": 11576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_queueOrRevert", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11536, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9236:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11535, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9236:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11538, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9260:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9260:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11540, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9283:23:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11539, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9283:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11542, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9316:17:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11541, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9316:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11544, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9343:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9343:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9226:134:10" - }, - "returnParameters": { - "id": 11546, - "nodeType": "ParameterList", - "parameters": [], - "src": "9382:0:10" - }, - "scope": 12250, - "src": "9203:647:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 11651, - "nodeType": "Block", - "src": "9928:519:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11583, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "9952:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11582, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "9946:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9946:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11585, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "9967:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9967:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "9946:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637574656420696620697420697320717565756564", - "id": 11588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9989:71:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - }, - "value": "GovernorAlpha::execute: proposal can only be executed if it is queued" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - } - ], - "id": 11581, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9938:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9938:123:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11590, - "nodeType": "ExpressionStatement", - "src": "9938:123:10" - }, - { - "assignments": [ - 11592 - ], - "declarations": [ - { - "constant": false, - "id": 11592, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11651, - "src": "10071:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11591, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10071:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11596, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11593, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10099:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11595, - "indexExpression": { - "argumentTypes": null, - "id": 11594, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10109:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10099:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10071:49:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11597, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10130:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "10130:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10150:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10130:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11602, - "nodeType": "ExpressionStatement", - "src": "10130:24:10" - }, - { - "body": { - "id": 11645, - "nodeType": "Block", - "src": "10218:180:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11625, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10286:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11626, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10286:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11628, - "indexExpression": { - "argumentTypes": null, - "id": 11627, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10303:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10286:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11629, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10307:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11630, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10307:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11632, - "indexExpression": { - "argumentTypes": null, - "id": 11631, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10323:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10307:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11633, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10327:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "10327:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11636, - "indexExpression": { - "argumentTypes": null, - "id": 11635, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10347:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10327:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11637, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10351:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11638, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "10351:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11640, - "indexExpression": { - "argumentTypes": null, - "id": 11639, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10370:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10351:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11641, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10374:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11642, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "10374:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11620, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10266:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11621, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10266:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11623, - "indexExpression": { - "argumentTypes": null, - "id": 11622, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10282:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10266:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11615, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "10232:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "10232:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10232:33:10", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory))" - } - }, - "id": 11624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:53:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:155:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11644, - "nodeType": "ExpressionStatement", - "src": "10232:155:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11607, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10184:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11608, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10188:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10188:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10188:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10184:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11646, - "initializationExpression": { - "assignments": [ - 11604 - ], - "declarations": [ - { - "constant": false, - "id": 11604, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11646, - "src": "10169:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11603, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10169:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11606, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10181:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10169:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10213:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11612, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10213:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11614, - "nodeType": "ExpressionStatement", - "src": "10213:3:10" - }, - "nodeType": "ForStatement", - "src": "10164:234:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11648, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10429:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11647, - "name": "ProposalExecuted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11252, - "src": "10412:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10412:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11650, - "nodeType": "EmitStatement", - "src": "10407:33:10" - } - ] - }, - "documentation": null, - "id": 11652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "execute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11578, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11652, - "src": "9873:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9872:20:10" - }, - "returnParameters": { - "id": 11580, - "nodeType": "ParameterList", - "parameters": [], - "src": "9928:0:10" - }, - "scope": 12250, - "src": "9856:591:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11746, - "nodeType": "Block", - "src": "10508:698:10", - "statements": [ - { - "assignments": [ - 11658 - ], - "declarations": [ - { - "constant": false, - "id": 11658, - "name": "state", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10518:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11657, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "10518:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11662, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11660, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10546:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11659, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "10540:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10540:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10518:39:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11664, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11658, - "src": "10575:5:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11665, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "10584:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10584:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "10575:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616e63656c2065786563757465642070726f706f73616c", - "id": 11668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10608:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - }, - "value": "GovernorAlpha::cancel: cannot cancel executed proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - } - ], - "id": 11663, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10567:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10567:98:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11670, - "nodeType": "ExpressionStatement", - "src": "10567:98:10" - }, - { - "assignments": [ - 11672 - ], - "declarations": [ - { - "constant": false, - "id": 11672, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10676:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11671, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10676:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11676, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11673, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10704:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11675, - "indexExpression": { - "argumentTypes": null, - "id": 11674, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10714:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10704:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10676:49:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11678, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10743:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10743:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 11680, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "10757:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10743:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11684, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10787:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "10787:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "10813:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10813:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10827:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11686, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "10806:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10806:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11682, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "10769:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "10769:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10769:61:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11692, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "10833:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10833:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10769:83:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10743:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722061626f7665207468726573686f6c64", - "id": 11696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10854:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - }, - "value": "GovernorAlpha::cancel: proposer above threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - } - ], - "id": 11677, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10735:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10735:169:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11698, - "nodeType": "ExpressionStatement", - "src": "10735:169:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11699, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10915:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11701, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "10915:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10935:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10915:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11704, - "nodeType": "ExpressionStatement", - "src": "10915:24:10" - }, - { - "body": { - "id": 11740, - "nodeType": "Block", - "src": "11003:153:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11720, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11044:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11044:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11723, - "indexExpression": { - "argumentTypes": null, - "id": 11722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11061:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11044:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11724, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11065:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11065:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11727, - "indexExpression": { - "argumentTypes": null, - "id": 11726, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11081:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11065:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11728, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11085:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11729, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11085:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11731, - "indexExpression": { - "argumentTypes": null, - "id": 11730, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11105:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11085:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11732, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11109:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11733, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11109:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11735, - "indexExpression": { - "argumentTypes": null, - "id": 11734, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11128:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11109:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11736, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11132:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11737, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "11132:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11717, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "11017:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12298, - "src": "11017:26:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external" - } - }, - "id": 11738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11017:128:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11739, - "nodeType": "ExpressionStatement", - "src": "11017:128:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10969:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11710, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10973:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11711, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10973:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10973:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10969:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11741, - "initializationExpression": { - "assignments": [ - 11706 - ], - "declarations": [ - { - "constant": false, - "id": 11706, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11741, - "src": "10954:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10954:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11708, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10966:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10954:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10998:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10998:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11716, - "nodeType": "ExpressionStatement", - "src": "10998:3:10" - }, - "nodeType": "ForStatement", - "src": "10949:207:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11743, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "11188:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11742, - "name": "ProposalCanceled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11242, - "src": "11171:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11745, - "nodeType": "EmitStatement", - "src": "11166:33:10" - } - ] - }, - "documentation": null, - "id": 11747, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancel", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11655, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11654, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11747, - "src": "10469:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11653, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10469:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10468:20:10" - }, - "returnParameters": { - "id": 11656, - "nodeType": "ParameterList", - "parameters": [], - "src": "10508:0:10" - }, - "scope": 12250, - "src": "10453:753:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11780, - "nodeType": "Block", - "src": "11461:124:10", - "statements": [ - { - "assignments": [ - 11765 - ], - "declarations": [ - { - "constant": false, - "id": 11765, - "name": "p", - "nodeType": "VariableDeclaration", - "scope": 11780, - "src": "11471:18:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11764, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11471:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11769, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11766, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11492:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11768, - "indexExpression": { - "argumentTypes": null, - "id": 11767, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11749, - "src": "11502:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11492:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11471:42:10" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11770, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11531:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11771, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11531:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11772, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11542:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11773, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11542:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11774, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11552:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11552:12:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11776, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11566:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11566:11:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - } - ], - "id": 11778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11530:48:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_storage_$_t_array$_t_uint256_$dyn_storage_$_t_array$_t_string_storage_$dyn_storage_$_t_array$_t_bytes_storage_$dyn_storage_$", - "typeString": "tuple(address[] storage ref,uint256[] storage ref,string storage ref[] storage ref,bytes storage ref[] storage ref)" - } - }, - "functionReturnParameters": 11763, - "id": 11779, - "nodeType": "Return", - "src": "11523:55:10" - } - ] - }, - "documentation": null, - "id": 11781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getActions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11749, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11232:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11232:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11231:20:10" - }, - "returnParameters": { - "id": 11763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11753, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11310:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11310:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11752, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11310:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11756, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11348:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11754, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11348:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11755, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11348:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11759, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11382:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11382:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11758, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11382:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11762, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11422:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11422:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11422:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11296:160:10" - }, - "scope": 12250, - "src": "11212:373:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11797, - "nodeType": "Block", - "src": "11711:61:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11790, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11728:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11792, - "indexExpression": { - "argumentTypes": null, - "id": 11791, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11783, - "src": "11738:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11793, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "11728:30:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 11795, - "indexExpression": { - "argumentTypes": null, - "id": 11794, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11785, - "src": "11759:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:37:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "functionReturnParameters": 11789, - "id": 11796, - "nodeType": "Return", - "src": "11721:44:10" - } - ] - }, - "documentation": null, - "id": 11798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11783, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11611:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11611:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11785, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11631:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11631:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11610:35:10" - }, - "returnParameters": { - "id": 11789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11691:14:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_memory_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 11787, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "11691:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11690:16:10" - }, - "scope": 12250, - "src": "11591:181:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11900, - "nodeType": "Block", - "src": "11877:957:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11806, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "11895:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 11807, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11912:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11895:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11809, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11926:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11926:14:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11895:45:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726f706f73616c206964", - "id": 11813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11942:43:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - }, - "value": "GovernorAlpha::state: invalid proposal id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - } - ], - "id": 11805, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11887:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11887:99:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11815, - "nodeType": "ExpressionStatement", - "src": "11887:99:10" - }, - { - "assignments": [ - 11817 - ], - "declarations": [ - { - "constant": false, - "id": 11817, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11900, - "src": "11996:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11816, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11996:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11821, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11818, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "12024:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11820, - "indexExpression": { - "argumentTypes": null, - "id": 11819, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "12034:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12024:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11996:49:10" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11822, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12059:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11823, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "12059:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11828, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12142:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12142:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11830, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12158:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11831, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "12158:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12142:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11837, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12242:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11839, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12258:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11157, - "src": "12258:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12242:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11846, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12339:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12339:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11848, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "12360:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12339:42:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11851, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12385:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12385:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11853, - "name": "quorumVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11089, - "src": "12405:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12405:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12385:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12339:79:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11861, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12484:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11862, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12484:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12500:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12484:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11869, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11870, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "12568:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12651:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11878, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12677:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12677:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11880, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "12691:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "GRACE_PERIOD", - "nodeType": "MemberAccess", - "referencedDeclaration": 12260, - "src": "12691:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12691:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11877, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "12670:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12670:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12651:64:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11892, - "nodeType": "Block", - "src": "12776:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11889, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12797:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12797:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11891, - "nodeType": "Return", - "src": "12790:27:10" - } - ] - }, - "id": 11893, - "nodeType": "IfStatement", - "src": "12647:181:10", - "trueBody": { - "id": 11888, - "nodeType": "Block", - "src": "12717:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11885, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12738:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11886, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Expired", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12738:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11887, - "nodeType": "Return", - "src": "12731:28:10" - } - ] - } - }, - "id": 11894, - "nodeType": "IfStatement", - "src": "12564:264:10", - "trueBody": { - "id": 11874, - "nodeType": "Block", - "src": "12587:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11871, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12608:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12608:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11873, - "nodeType": "Return", - "src": "12601:29:10" - } - ] - } - }, - "id": 11895, - "nodeType": "IfStatement", - "src": "12480:348:10", - "trueBody": { - "id": 11868, - "nodeType": "Block", - "src": "12503:55:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11865, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12524:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12524:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11867, - "nodeType": "Return", - "src": "12517:30:10" - } - ] - } - }, - "id": 11896, - "nodeType": "IfStatement", - "src": "12335:493:10", - "trueBody": { - "id": 11860, - "nodeType": "Block", - "src": "12420:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11857, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12441:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Defeated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12441:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11859, - "nodeType": "Return", - "src": "12434:29:10" - } - ] - } - }, - "id": 11897, - "nodeType": "IfStatement", - "src": "12238:590:10", - "trueBody": { - "id": 11845, - "nodeType": "Block", - "src": "12277:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11842, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12298:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12298:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11844, - "nodeType": "Return", - "src": "12291:27:10" - } - ] - } - }, - "id": 11898, - "nodeType": "IfStatement", - "src": "12138:690:10", - "trueBody": { - "id": 11836, - "nodeType": "Block", - "src": "12179:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11833, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12200:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12200:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11835, - "nodeType": "Return", - "src": "12193:28:10" - } - ] - } - }, - "id": 11899, - "nodeType": "IfStatement", - "src": "12055:773:10", - "trueBody": { - "id": 11827, - "nodeType": "Block", - "src": "12078:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11824, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12099:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12099:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11826, - "nodeType": "Return", - "src": "12092:29:10" - } - ] - } - } - ] - }, - "documentation": null, - "id": 11901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11800, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11793:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11793:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11792:20:10" - }, - "returnParameters": { - "id": 11804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11858:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11802, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "11858:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11857:15:10" - }, - "scope": 12250, - "src": "11778:1056:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11915, - "nodeType": "Block", - "src": "12911:66:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "12938:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12938:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11911, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11903, - "src": "12950:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11912, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11905, - "src": "12962:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11908, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "12928:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12928:42:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11907, - "id": 11914, - "nodeType": "Return", - "src": "12921:49:10" - } - ] - }, - "documentation": null, - "id": 11916, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11903, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12858:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12858:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11905, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12878:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12878:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12857:34:10" - }, - "returnParameters": { - "id": 11907, - "nodeType": "ParameterList", - "parameters": [], - "src": "12911:0:10" - }, - "scope": 12250, - "src": "12840:137:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11994, - "nodeType": "Block", - "src": "13136:797:10", - "statements": [ - { - "assignments": [ - 11930 - ], - "declarations": [ - { - "constant": false, - "id": 11930, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13146:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11929, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13146:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11947, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11199, - "src": "13223:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11937, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11071, - "src": "13272:4:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - ], - "id": 11936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13266:5:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13266:11:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11935, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13256:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13256:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11940, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12249, - "src": "13296:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11943, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19284, - "src": "13334:4:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - ], - "id": 11942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13326:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13326:13:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 11932, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13195:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13195:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13195:158:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13172:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:191:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13146:217:10" - }, - { - "assignments": [ - 11949 - ], - "declarations": [ - { - "constant": false, - "id": 11949, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13374:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11958, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11953, - "name": "BALLOT_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11204, - "src": "13446:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11954, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13479:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11955, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13507:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 11951, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13418:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13418:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13418:110:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11950, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13395:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13395:143:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13374:164:10" - }, - { - "assignments": [ - 11960 - ], - "declarations": [ - { - "constant": false, - "id": 11960, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13549:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13549:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 11964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13623:10:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 11965, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11930, - "src": "13651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11966, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11949, - "src": "13684:10:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13589:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13589:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13589:119:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13566:152:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13549:169:10" - }, - { - "assignments": [ - 11971 - ], - "declarations": [ - { - "constant": false, - "id": 11971, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13729:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11970, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13729:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11978, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11973, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11960, - "src": "13759:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11974, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11922, - "src": "13767:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 11975, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11924, - "src": "13770:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11976, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11926, - "src": "13773:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11972, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "13749:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 11977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13749:26:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13729:46:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11980, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13793:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 11982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13814:1:10", - "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": 11981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13806:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13793:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e76616c6964207369676e6174757265", - "id": 11985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13818:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - }, - "value": "GovernorAlpha::castVoteBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - } - ], - "id": 11979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "13785:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13785:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11987, - "nodeType": "ExpressionStatement", - "src": "13785:83:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11989, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13895:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11990, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13906:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11991, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13918:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11988, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "13885:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13885:41:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11928, - "id": 11993, - "nodeType": "Return", - "src": "13878:48:10" - } - ] - }, - "documentation": null, - "id": 11995, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVoteBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11927, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11918, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13015:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13015:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11920, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13043:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11919, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13043:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11922, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13065:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 11921, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "13065:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11924, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13082:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11923, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13082:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11926, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13101:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13101:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13005:111:10" - }, - "returnParameters": { - "id": 11928, - "nodeType": "ParameterList", - "parameters": [], - "src": "13136:0:10" - }, - "scope": 12250, - "src": "12983:950:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12093, - "nodeType": "Block", - "src": "14058:746:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 12010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12006, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14082:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12005, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "14076:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 12007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14076:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12008, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "14097:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 12009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14097:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "14076:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6720697320636c6f736564", - "id": 12011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14119:44:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - }, - "value": "GovernorAlpha::_castVote: voting is closed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - } - ], - "id": 12004, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14068:96:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12013, - "nodeType": "ExpressionStatement", - "src": "14068:96:10" - }, - { - "assignments": [ - 12015 - ], - "declarations": [ - { - "constant": false, - "id": 12015, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14174:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 12014, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "14174:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12019, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 12016, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "14202:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 12018, - "indexExpression": { - "argumentTypes": null, - "id": 12017, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14212:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14202:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14174:49:10" - }, - { - "assignments": [ - 12021 - ], - "declarations": [ - { - "constant": false, - "id": 12021, - "name": "receipt", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14233:23:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 12020, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "14233:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12026, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12022, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14259:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "14259:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 12025, - "indexExpression": { - "argumentTypes": null, - "id": 12024, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14277:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14259:24:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14233:50:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12028, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14301:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12029, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14301:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 12030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14321:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14301:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74657220616c726561647920766f746564", - "id": 12032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14328:47:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - }, - "value": "GovernorAlpha::_castVote: voter already voted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - } - ], - "id": 12027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14293:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14293:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12034, - "nodeType": "ExpressionStatement", - "src": "14293:83:10" - }, - { - "assignments": [ - 12036 - ], - "declarations": [ - { - "constant": false, - "id": 12036, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14386:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14386:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12043, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12039, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14420:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12040, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "14427:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12037, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "14402:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 12038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "14402:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 12042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14402:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14386:61:10" - }, - { - "condition": { - "argumentTypes": null, - "id": 12044, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14462:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 12066, - "nodeType": "Block", - "src": "14554:85:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12056, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12058, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14568:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12060, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14599:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12061, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14599:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12062, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14622:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12059, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14592:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14592:36:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14568:60:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12065, - "nodeType": "ExpressionStatement", - "src": "14568:60:10" - } - ] - }, - "id": 12067, - "nodeType": "IfStatement", - "src": "14458:181:10", - "trueBody": { - "id": 12055, - "nodeType": "Block", - "src": "14471:77:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12045, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14485:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14485:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12049, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14512:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12050, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14512:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12051, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14531:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12048, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14505:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14505:32:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14485:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12054, - "nodeType": "ExpressionStatement", - "src": "14485:52:10" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 12072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12068, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14649:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12070, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14649:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 12071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14668:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14649:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12073, - "nodeType": "ExpressionStatement", - "src": "14649:23:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12074, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14682:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "support", - "nodeType": "MemberAccess", - "referencedDeclaration": 11174, - "src": "14682:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12077, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14700:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14682:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12079, - "nodeType": "ExpressionStatement", - "src": "14682:25:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12080, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14717:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12082, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11176, - "src": "14717:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12083, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14733:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14717:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12085, - "nodeType": "ExpressionStatement", - "src": "14717:21:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12087, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14763:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12088, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14770:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12089, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14782:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12090, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14791:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12086, - "name": "VoteCast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11238, - "src": "14754:8:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bool,uint256)" - } - }, - "id": 12091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14754:43:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12092, - "nodeType": "EmitStatement", - "src": "14749:48:10" - } - ] - }, - "documentation": null, - "id": 12094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11997, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13967:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13967:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11999, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13990:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13990:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12001, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "14018:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14018:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13957:79:10" - }, - "returnParameters": { - "id": 12003, - "nodeType": "ParameterList", - "parameters": [], - "src": "14058:0:10" - }, - "scope": 12250, - "src": "13939:865:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12110, - "nodeType": "Block", - "src": "14854:141:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12098, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "14872:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14872:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12100, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "14886:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14872:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14896:59:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__acceptAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - } - ], - "id": 12097, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14864:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14864:92:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12104, - "nodeType": "ExpressionStatement", - "src": "14864:92:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 12105, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "14966:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "acceptAdmin", - "nodeType": "MemberAccess", - "referencedDeclaration": 12263, - "src": "14966:20:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 12108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14966:22:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12109, - "nodeType": "ExpressionStatement", - "src": "14966:22:10" - } - ] - }, - "documentation": null, - "id": 12111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12095, - "nodeType": "ParameterList", - "parameters": [], - "src": "14832:2:10" - }, - "returnParameters": { - "id": 12096, - "nodeType": "ParameterList", - "parameters": [], - "src": "14854:0:10" - }, - "scope": 12250, - "src": "14810:185:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12128, - "nodeType": "Block", - "src": "15042:137:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15060:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15060:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12117, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15074:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15060:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15084:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__abdicate: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - } - ], - "id": 12114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15052:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15052:89:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12121, - "nodeType": "ExpressionStatement", - "src": "15052:89:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12122, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15151:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15170:1:10", - "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": 12123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15162:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15162:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15151:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12127, - "nodeType": "ExpressionStatement", - "src": "15151:21:10" - } - ] - }, - "documentation": null, - "id": 12129, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__abdicate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12112, - "nodeType": "ParameterList", - "parameters": [], - "src": "15020:2:10" - }, - "returnParameters": { - "id": 12113, - "nodeType": "ParameterList", - "parameters": [], - "src": "15042:0:10" - }, - "scope": 12250, - "src": "15001:178:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12159, - "nodeType": "Block", - "src": "15304:245:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12137, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15322:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15322:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12139, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15336:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15322:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15346:76:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12136, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15314:109:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12143, - "nodeType": "ExpressionStatement", - "src": "15314:109:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12148, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15467:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15459:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15459:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15478:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15481:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12154, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12131, - "src": "15520:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15509:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15509:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15509:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12156, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12133, - "src": "15538:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12144, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15433:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "15433:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 12157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15433:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 12158, - "nodeType": "ExpressionStatement", - "src": "15433:109:10" - } - ] - }, - "documentation": null, - "id": 12160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__queueSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12131, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15234:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15234:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12133, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15267:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15267:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15224:60:10" - }, - "returnParameters": { - "id": 12135, - "nodeType": "ParameterList", - "parameters": [], - "src": "15304:0:10" - }, - "scope": 12250, - "src": "15185:364:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12190, - "nodeType": "Block", - "src": "15676:249:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15694:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15694:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12170, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15708:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15694:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15718:78:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12167, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15686:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15686:111:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12174, - "nodeType": "ExpressionStatement", - "src": "15686:111:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12179, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15843:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15835:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15835:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15857:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12185, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12162, - "src": "15896:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12183, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15885:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15885:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15885:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12187, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12164, - "src": "15914:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12175, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15807:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "15807:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 12188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15807:111:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 12189, - "nodeType": "ExpressionStatement", - "src": "15807:111:10" - } - ] - }, - "documentation": null, - "id": 12191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__executeSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12165, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12162, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15606:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15606:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12164, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15639:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12163, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15639:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15596:60:10" - }, - "returnParameters": { - "id": 12166, - "nodeType": "ParameterList", - "parameters": [], - "src": "15676:0:10" - }, - "scope": 12250, - "src": "15555:370:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12215, - "nodeType": "Block", - "src": "16001:98:10", - "statements": [ - { - "assignments": [ - 12201 - ], - "declarations": [ - { - "constant": false, - "id": 12201, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12215, - "src": "16011:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12200, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16011:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12205, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12202, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16023:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12203, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12195, - "src": "16027:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16023:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16011:17:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12207, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16046:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12208, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16051:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16046:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6164646974696f6e206f766572666c6f77", - "id": 12210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16054:19:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - }, - "value": "addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - } - ], - "id": 12206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16038:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16038:36:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12212, - "nodeType": "ExpressionStatement", - "src": "16038:36:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12213, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16091:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12199, - "id": 12214, - "nodeType": "Return", - "src": "16084:8:10" - } - ] - }, - "documentation": null, - "id": 12216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15947:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15947:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15958:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15958:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15946:22:10" - }, - "returnParameters": { - "id": 12199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15992:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15992:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15991:9:10" - }, - "scope": 12250, - "src": "15931:168:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12236, - "nodeType": "Block", - "src": "16175:79:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12226, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16193:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12227, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16198:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16193:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7375627472616374696f6e20756e646572666c6f77", - "id": 12229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16201:23:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - }, - "value": "subtraction underflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - } - ], - "id": 12225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16185:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16185:40:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12231, - "nodeType": "ExpressionStatement", - "src": "16185:40:10" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12232, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16242:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12233, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16246:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12224, - "id": 12235, - "nodeType": "Return", - "src": "16235:12:10" - } - ] - }, - "documentation": null, - "id": 12237, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12218, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16121:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16121:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12220, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16132:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16132:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16120:22:10" - }, - "returnParameters": { - "id": 12224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12223, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16166:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16166:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16165:9:10" - }, - "scope": 12250, - "src": "16105:149:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12248, - "nodeType": "Block", - "src": "16314:98:10", - "statements": [ - { - "assignments": [ - 12243 - ], - "declarations": [ - { - "constant": false, - "id": 12243, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 12248, - "src": "16324:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16324:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16324:15:10" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 12243, - "isOffset": false, - "isSlot": false, - "src": "16360:7:10", - "valueSize": 1 - } - } - ], - "id": 12245, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "16349:33:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12246, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12243, - "src": "16398:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12241, - "id": 12247, - "nodeType": "Return", - "src": "16391:14:10" - } - ] - }, - "documentation": null, - "id": 12249, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12238, - "nodeType": "ParameterList", - "parameters": [], - "src": "16279:2:10" - }, - "returnParameters": { - "id": 12241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12240, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12249, - "src": "16305:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16304:9:10" - }, - "scope": 12250, - "src": "16260:152:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 12333, - "src": "1038:15376:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12314, - "linearizedBaseContracts": [ - 12314 - ], - "name": "TimelockInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12255, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12251, - "nodeType": "ParameterList", - "parameters": [], - "src": "16464:2:10" - }, - "returnParameters": { - "id": 12254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12253, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12255, - "src": "16490:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16490:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:9:10" - }, - "scope": 12314, - "src": "16450:49:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12260, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "GRACE_PERIOD", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12256, - "nodeType": "ParameterList", - "parameters": [], - "src": "16525:2:10" - }, - "returnParameters": { - "id": 12259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12260, - "src": "16551:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16551:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16550:9:10" - }, - "scope": 12314, - "src": "16504:56:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12263, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12261, - "nodeType": "ParameterList", - "parameters": [], - "src": "16585:2:10" - }, - "returnParameters": { - "id": 12262, - "nodeType": "ParameterList", - "parameters": [], - "src": "16596:0:10" - }, - "scope": 12314, - "src": "16565:32:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12270, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queuedTransactions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12265, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16630:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12264, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16630:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16629:14:10" - }, - "returnParameters": { - "id": 12269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12268, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16667:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16667:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16666:6:10" - }, - "scope": 12314, - "src": "16602:71:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12285, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12272, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16704:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12271, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16704:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12274, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16720:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12273, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16720:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12276, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16735:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12275, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16735:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12278, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16762:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12277, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16762:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12280, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16783:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16783:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16703:92:10" - }, - "returnParameters": { - "id": 12284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16814:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12282, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16814:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16813:9:10" - }, - "scope": 12314, - "src": "16678:145:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12298, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12296, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12287, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16855:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16855:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12289, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16871:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16871:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12291, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16886:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16886:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16913:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16913:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12295, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16934:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16934:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16854:92:10" - }, - "returnParameters": { - "id": 12297, - "nodeType": "ParameterList", - "parameters": [], - "src": "16955:0:10" - }, - "scope": 12314, - "src": "16828:128:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12313, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12300, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "16989:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16989:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12302, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17005:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12304, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17020:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12303, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17020:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12306, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17047:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17047:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12308, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17068:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16988:92:10" - }, - "returnParameters": { - "id": 12312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17107:12:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17107:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17106:14:10" - }, - "scope": 12314, - "src": "16961:160:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "16416:707:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12332, - "linearizedBaseContracts": [ - 12332 - ], - "name": "YAMInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12323, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12316, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17177:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17177:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12318, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17194:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17194:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17176:38:10" - }, - "returnParameters": { - "id": 12322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17238:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17238:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17237:9:10" - }, - "scope": 12332, - "src": "17154:93:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12328, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12324, - "nodeType": "ParameterList", - "parameters": [], - "src": "17271:2:10" - }, - "returnParameters": { - "id": 12327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12328, - "src": "17297:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17297:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17296:9:10" - }, - "scope": 12332, - "src": "17252:54:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12331, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12329, - "nodeType": "ParameterList", - "parameters": [], - "src": "17330:2:10" - }, - "returnParameters": { - "id": 12330, - "nodeType": "ParameterList", - "parameters": [], - "src": "17341:0:10" - }, - "scope": 12332, - "src": "17311:31:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "17125:219:10" - } - ], - "src": "0:17345:10" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "exportedSymbols": { - "GovernorAlpha": [ - 12250 - ], - "TimelockInterface": [ - 12314 - ], - "YAMInterface": [ - 12332 - ] - }, - "id": 12333, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 11066, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "id": 11067, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:10" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 11068, - "nodeType": "ImportDirective", - "scope": 12333, - "sourceUnit": 14993, - "src": "1007:29:10", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12250, - "linearizedBaseContracts": [ - 12250 - ], - "name": "GovernorAlpha", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 11071, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "1109:50:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 11069, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1109:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "59414d20476f7665726e6f7220416c706861", - "id": 11070, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1139:20:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9", - "typeString": "literal_string \"YAM Governor Alpha\"" - }, - "value": "YAM Governor Alpha" - }, - "visibility": "public" - }, - { - "body": { - "id": 11088, - "nodeType": "Block", - "src": "1351:64:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11080, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1386:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1386:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1386:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "34", - "id": 11083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1404:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 11078, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1373:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:33:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11076, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1360:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1360:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11075, - "id": 11087, - "nodeType": "Return", - "src": "1353:59:10" - } - ] - }, - "documentation": "@notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed", - "id": 11089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "quorumVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11072, - "nodeType": "ParameterList", - "parameters": [], - "src": "1318:2:10" - }, - "returnParameters": { - "id": 11075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11074, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11089, - "src": "1342:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1342:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1341:9:10" - }, - "scope": 12250, - "src": "1298:117:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11102, - "nodeType": "Block", - "src": "1580:47:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11096, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1602:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1602:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1602:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1620:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11094, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1589:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1589:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11093, - "id": 11101, - "nodeType": "Return", - "src": "1582:42:10" - } - ] - }, - "documentation": "@notice The number of votes required in order for a voter to become a proposer", - "id": 11103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11090, - "nodeType": "ParameterList", - "parameters": [], - "src": "1547:2:10" - }, - "returnParameters": { - "id": 11093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11092, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11103, - "src": "1571:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1571:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1570:9:10" - }, - "scope": 12250, - "src": "1521:106:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11110, - "nodeType": "Block", - "src": "1790:14:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 11108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:2:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "functionReturnParameters": 11107, - "id": 11109, - "nodeType": "Return", - "src": "1792:9:10" - } - ] - }, - "documentation": "@notice The maximum number of actions that can be included in a proposal", - "id": 11111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalMaxOperations", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1757:2:10" - }, - "returnParameters": { - "id": 11107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11111, - "src": "1781:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1781:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:9:10" - }, - "scope": 12250, - "src": "1727:77:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11118, - "nodeType": "Block", - "src": "1961:13:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "31", - "id": 11116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1970:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "functionReturnParameters": 11115, - "id": 11117, - "nodeType": "Return", - "src": "1963:8:10" - } - ] - }, - "documentation": "@notice The delay before voting on a proposal may take place, once proposed", - "id": 11119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11112, - "nodeType": "ParameterList", - "parameters": [], - "src": "1928:2:10" - }, - "returnParameters": { - "id": 11115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11114, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11119, - "src": "1952:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1952:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1951:9:10" - }, - "scope": 12250, - "src": "1908:66:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11126, - "nodeType": "Block", - "src": "2109:17:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3137323830", - "id": 11124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2118:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17280_by_1", - "typeString": "int_const 17280" - }, - "value": "17280" - }, - "functionReturnParameters": 11123, - "id": 11125, - "nodeType": "Return", - "src": "2111:12:10" - } - ] - }, - "documentation": "@notice The duration of voting on a proposal, in blocks", - "id": 11127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11120, - "nodeType": "ParameterList", - "parameters": [], - "src": "2076:2:10" - }, - "returnParameters": { - "id": 11123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11122, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11127, - "src": "2100:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2100:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2099:9:10" - }, - "scope": 12250, - "src": "2055:71:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11129, - "name": "timelock", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2237:33:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - }, - "typeName": { - "contractScope": null, - "id": 11128, - "name": "TimelockInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12314, - "src": "2237:17:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11131, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2338:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - }, - "typeName": { - "contractScope": null, - "id": 11130, - "name": "YAMInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12332, - "src": "2338:12:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11133, - "name": "guardian", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2421:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2421:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11135, - "name": "proposalCount", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2497:28:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2497:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Proposal", - "id": 11170, - "members": [ - { - "constant": false, - "id": 11137, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2614:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11136, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11139, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2679:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11138, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2679:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11141, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2818:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2818:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11144, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2918:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2918:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11143, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2918:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11147, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3047:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11145, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3047:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3047:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11150, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3144:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11148, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3144:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11149, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3144:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11153, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3249:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3249:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11152, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11155, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3385:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11154, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3385:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11157, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3505:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3505:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11159, - "name": "forVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3602:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3602:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11161, - "name": "againstVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3704:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3704:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11163, - "name": "canceled", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3807:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11162, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3807:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11165, - "name": "executed", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3903:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11164, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3903:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11169, - "name": "receipts", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3996:37:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "typeName": { - "id": 11168, - "keyType": { - "id": 11166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3996:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "valueType": { - "contractScope": null, - "id": 11167, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "4016:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Proposal", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "2532:1508:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Receipt", - "id": 11177, - "members": [ - { - "constant": false, - "id": 11172, - "name": "hasVoted", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4177:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4177:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11174, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4268:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11173, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4268:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11176, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4362:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4362:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Receipt", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "4096:286:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.ProposalState", - "id": 11186, - "members": [ - { - "id": 11178, - "name": "Pending", - "nodeType": "EnumValue", - "src": "4475:7:10" - }, - { - "id": 11179, - "name": "Active", - "nodeType": "EnumValue", - "src": "4492:6:10" - }, - { - "id": 11180, - "name": "Canceled", - "nodeType": "EnumValue", - "src": "4508:8:10" - }, - { - "id": 11181, - "name": "Defeated", - "nodeType": "EnumValue", - "src": "4526:8:10" - }, - { - "id": 11182, - "name": "Succeeded", - "nodeType": "EnumValue", - "src": "4544:9:10" - }, - { - "id": 11183, - "name": "Queued", - "nodeType": "EnumValue", - "src": "4563:6:10" - }, - { - "id": 11184, - "name": "Expired", - "nodeType": "EnumValue", - "src": "4579:7:10" - }, - { - "id": 11185, - "name": "Executed", - "nodeType": "EnumValue", - "src": "4596:8:10" - } - ], - "name": "ProposalState", - "nodeType": "EnumDefinition", - "src": "4446:164:10" - }, - { - "constant": false, - "id": 11190, - "name": "proposals", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4683:46:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "typeName": { - "id": 11189, - "keyType": { - "id": 11187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4692:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "4683:29:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "valueType": { - "contractScope": null, - "id": 11188, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "4703:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11194, - "name": "latestProposalIds", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4790:53:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 11193, - "keyType": { - "id": 11191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "4790:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 11192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4810:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 11199, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4913:122:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11195, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4913:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 11197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4965:69:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 11196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4955:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4955:80:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 11204, - "name": "BALLOT_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "5122:94:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11200, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5122:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20737570706f727429", - "id": 11202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5174:41:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - }, - "value": "Ballot(uint256 proposalId,bool support)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - } - ], - "id": 11201, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5164:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a new proposal is created", - "id": 11228, - "name": "ProposalCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 11227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11206, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5309:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5309:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11208, - "indexed": false, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5321:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5321:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11211, - "indexed": false, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5339:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5339:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11210, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5339:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11214, - "indexed": false, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5358:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11212, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5358:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11213, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5358:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11217, - "indexed": false, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5373:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5373:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11216, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11220, - "indexed": false, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5394:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11218, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11219, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5394:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11222, - "indexed": false, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5413:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5413:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11224, - "indexed": false, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5433:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5433:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11226, - "indexed": false, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5451:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11225, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5451:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5308:162:10" - }, - "src": "5287:184:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a vote has been cast on a proposal", - "id": 11238, - "name": "VoteCast", - "nodeType": "EventDefinition", - "parameters": { - "id": 11237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11230, - "indexed": false, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5565:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5565:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11232, - "indexed": false, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5580:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5580:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11234, - "indexed": false, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5600:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11233, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5600:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11236, - "indexed": false, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5614:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5564:64:10" - }, - "src": "5550:79:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been canceled", - "id": 11242, - "name": "ProposalCanceled", - "nodeType": "EventDefinition", - "parameters": { - "id": 11241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11240, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11242, - "src": "5725:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5725:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5724:12:10" - }, - "src": "5702:35:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been queued in the Timelock", - "id": 11248, - "name": "ProposalQueued", - "nodeType": "EventDefinition", - "parameters": { - "id": 11247, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11244, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5845:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5845:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11246, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5857:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5857:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5844:25:10" - }, - "src": "5824:46:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been executed in the Timelock", - "id": 11252, - "name": "ProposalExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 11251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11250, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11252, - "src": "5982:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5982:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5981:12:10" - }, - "src": "5959:35:10" - }, - { - "body": { - "id": 11276, - "nodeType": "Block", - "src": "6052:121:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11259, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "6062:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11261, - "name": "timelock_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11254, - "src": "6091:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11260, - "name": "TimelockInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12314, - "src": "6073:17:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_TimelockInterface_$12314_$", - "typeString": "type(contract TimelockInterface)" - } - }, - "id": 11262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6073:28:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "src": "6062:39:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11264, - "nodeType": "ExpressionStatement", - "src": "6062:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11265, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6111:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11267, - "name": "yam_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11256, - "src": "6130:4:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11266, - "name": "YAMInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12332, - "src": "6117:12:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMInterface_$12332_$", - "typeString": "type(contract YAMInterface)" - } - }, - "id": 11268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6117:18:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "src": "6111:24:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11270, - "nodeType": "ExpressionStatement", - "src": "6111:24:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11271, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "6145:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11272, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6156:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6145:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11275, - "nodeType": "ExpressionStatement", - "src": "6145:21:10" - } - ] - }, - "documentation": null, - "id": 11277, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11257, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11254, - "name": "timelock_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6012:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6012:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11256, - "name": "yam_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6031:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11255, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6031:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6011:33:10" - }, - "returnParameters": { - "id": 11258, - "nodeType": "ParameterList", - "parameters": [], - "src": "6052:0:10" - }, - "scope": 12250, - "src": "6000:173:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11456, - "nodeType": "Block", - "src": "6416:2092:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11299, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6452:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6452:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11302, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6471:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6471:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6485:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11301, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "6464:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6464:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11297, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6434:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "6434:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6434:54:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11307, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "6491:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6491:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6434:76:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657220766f7465732062656c6f772070726f706f73616c207468726573686f6c64", - "id": 11310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6512:65:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - }, - "value": "GovernorAlpha::propose: proposer votes below proposal threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - } - ], - "id": 11296, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6426:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6426:152:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11312, - "nodeType": "ExpressionStatement", - "src": "6426:152:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11314, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6596:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6596:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11316, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "6614:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 11317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6614:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6596:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11319, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6631:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6631:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11321, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "6649:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 11322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6649:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6631:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:70:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11325, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6670:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6670:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11327, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "6688:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 11328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6688:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6670:34:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:108:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368", - "id": 11331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6706:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - }, - "value": "GovernorAlpha::propose: proposal function information arity mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - } - ], - "id": 11313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6588:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6588:189:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11333, - "nodeType": "ExpressionStatement", - "src": "6588:189:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11335, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6795:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6795:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6813:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6795:19:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f7669646520616374696f6e73", - "id": 11339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6816:46:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - }, - "value": "GovernorAlpha::propose: must provide actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - } - ], - "id": 11334, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6787:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6787:76:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11341, - "nodeType": "ExpressionStatement", - "src": "6787:76:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11343, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6881:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6881:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11345, - "name": "proposalMaxOperations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11111, - "src": "6899:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6899:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6881:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7920616374696f6e73", - "id": 11348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:42:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - }, - "value": "GovernorAlpha::propose: too many actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - } - ], - "id": 11342, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6873:94:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11350, - "nodeType": "ExpressionStatement", - "src": "6873:94:10" - }, - { - "assignments": [ - 11352 - ], - "declarations": [ - { - "constant": false, - "id": 11352, - "name": "latestProposalId", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "6978:24:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6978:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11357, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11353, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "7005:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11356, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7023:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7023:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7005:29:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6978:56:10" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11358, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7048:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7068:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7048:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 11384, - "nodeType": "IfStatement", - "src": "7044:450:10", - "trueBody": { - "id": 11383, - "nodeType": "Block", - "src": "7071:423:10", - "statements": [ - { - "assignments": [ - 11362 - ], - "declarations": [ - { - "constant": false, - "id": 11362, - "name": "proposersLatestProposalState", - "nodeType": "VariableDeclaration", - "scope": 11383, - "src": "7083:42:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11361, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "7083:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11364, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7134:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11363, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "7128:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7083:68:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11368, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11369, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7203:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7203:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7171:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c7265616479206163746976652070726f706f73616c", - "id": 11372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7225:90:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - } - ], - "id": 11367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7163:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7163:153:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11374, - "nodeType": "ExpressionStatement", - "src": "7163:153:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11376, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7336:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11377, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7368:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7368:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7336:53:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c72656164792070656e64696e672070726f706f73616c", - "id": 11380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7391:91:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - } - ], - "id": 11375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7328:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7328:155:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11382, - "nodeType": "ExpressionStatement", - "src": "7328:155:10" - } - ] - } - }, - { - "assignments": [ - 11386 - ], - "declarations": [ - { - "constant": false, - "id": 11386, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7504:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11385, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7504:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11393, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11388, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "7532:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7532:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11390, - "name": "votingDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11119, - "src": "7546:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7546:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11387, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7525:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7525:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7504:56:10" - }, - { - "assignments": [ - 11395 - ], - "declarations": [ - { - "constant": false, - "id": 11395, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7570:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7570:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11401, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11397, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7596:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11398, - "name": "votingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11127, - "src": "7608:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7608:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11396, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7589:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7589:34:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7570:53:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7634:15:10", - "subExpression": { - "argumentTypes": null, - "id": 11402, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7634:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11404, - "nodeType": "ExpressionStatement", - "src": "7634:15:10" - }, - { - "assignments": [ - 11406 - ], - "declarations": [ - { - "constant": false, - "id": 11406, - "name": "newProposal", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7659:27:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11405, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "7659:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11423, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11408, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7716:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11409, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7753:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7753:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7782:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 11412, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "7806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11413, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "7835:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11414, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "7867:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11415, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "7902:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11416, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7937:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11417, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "7971:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8003:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8032:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8057:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8086:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11407, - "name": "Proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11170, - "src": "7689:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Proposal_$11170_storage_ptr_$", - "typeString": "type(struct GovernorAlpha.Proposal storage pointer)" - } - }, - "id": 11422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "id", - "proposer", - "eta", - "targets", - "values", - "signatures", - "calldatas", - "startBlock", - "endBlock", - "forVotes", - "againstVotes", - "canceled", - "executed" - ], - "nodeType": "FunctionCall", - "src": "7689:413:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7659:443:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11424, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8113:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11427, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11425, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8123:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8123:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8113:25:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11428, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8141:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "src": "8113:39:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11430, - "nodeType": "ExpressionStatement", - "src": "8113:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11431, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "8162:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11434, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11432, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8180:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11433, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "8180:20:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8162:39:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11435, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8204:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11436, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8204:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8162:56:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11438, - "nodeType": "ExpressionStatement", - "src": "8162:56:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11440, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8263:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8263:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11442, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8291:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8291:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11444, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "8315:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11445, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "8336:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11446, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "8356:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11447, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "8380:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11448, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "8403:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11449, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "8427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11450, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11291, - "src": "8449:11:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11439, - "name": "ProposalCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11228, - "src": "8234:15:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,address[] memory,uint256[] memory,string memory[] memory,bytes memory[] memory,uint256,uint256,string memory)" - } - }, - "id": 11451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8234:236:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11452, - "nodeType": "EmitStatement", - "src": "8229:241:10" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11453, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8487:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8487:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11295, - "id": 11455, - "nodeType": "Return", - "src": "8480:21:10" - } - ] - }, - "documentation": null, - "id": 11457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "propose", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11280, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6205:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11278, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6205:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11279, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6205:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11283, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6239:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11281, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6239:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6239:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11286, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6269:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11284, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6269:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11285, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6269:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11289, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6305:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11287, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6305:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11288, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11291, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6339:25:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6339:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6195:175:10" - }, - "returnParameters": { - "id": 11295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6403:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6403:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6402:9:10" - }, - "scope": 12250, - "src": "6179:2329:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11533, - "nodeType": "Block", - "src": "8568:629:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11464, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8592:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11463, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "8586:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8586:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11466, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "8607:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8607:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "8586:44:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c2063616e206f6e6c792062652071756575656420696620697420697320737563636565646564", - "id": 11469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8632:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - }, - "value": "GovernorAlpha::queue: proposal can only be queued if it is succeeded" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - } - ], - "id": 11462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8578:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8578:125:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11471, - "nodeType": "ExpressionStatement", - "src": "8578:125:10" - }, - { - "assignments": [ - 11473 - ], - "declarations": [ - { - "constant": false, - "id": 11473, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8713:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11472, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "8713:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11477, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11474, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8741:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11476, - "indexExpression": { - "argumentTypes": null, - "id": 11475, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8751:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8741:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8713:49:10" - }, - { - "assignments": [ - 11479 - ], - "declarations": [ - { - "constant": false, - "id": 11479, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8772:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11478, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8772:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11481, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "8793:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8793:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11483, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "8810:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delay", - "nodeType": "MemberAccess", - "referencedDeclaration": 12255, - "src": "8810:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11480, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "8786:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8786:41:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8772:55:10" - }, - { - "body": { - "id": 11520, - "nodeType": "Block", - "src": "8891:226:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11501, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8937:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11502, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8937:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11504, - "indexExpression": { - "argumentTypes": null, - "id": 11503, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8954:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8937:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11505, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8974:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "8974:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11508, - "indexExpression": { - "argumentTypes": null, - "id": 11507, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8990:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8974:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11509, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9010:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11510, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "9010:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11512, - "indexExpression": { - "argumentTypes": null, - "id": 11511, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9030:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9010:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11513, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9050:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "9050:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11516, - "indexExpression": { - "argumentTypes": null, - "id": 11515, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9069:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9050:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "id": 11517, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9089:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11500, - "name": "_queueOrRevert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11576, - "src": "8905:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8905:201:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11519, - "nodeType": "ExpressionStatement", - "src": "8905:201:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11492, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8857:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11493, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8861:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11494, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8861:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8861:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8857:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11521, - "initializationExpression": { - "assignments": [ - 11489 - ], - "declarations": [ - { - "constant": false, - "id": 11489, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11521, - "src": "8842:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11488, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8842:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11491, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8842:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8886:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11497, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8886:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11499, - "nodeType": "ExpressionStatement", - "src": "8886:3:10" - }, - "nodeType": "ForStatement", - "src": "8837:280:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11522, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9126:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "9126:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11525, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9141:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9126:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11527, - "nodeType": "ExpressionStatement", - "src": "9126:18:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11529, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "9174:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11530, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9186:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11528, - "name": "ProposalQueued", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11248, - "src": "9159:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 11531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9159:31:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11532, - "nodeType": "EmitStatement", - "src": "9154:36:10" - } - ] - }, - "documentation": null, - "id": 11534, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11459, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11534, - "src": "8529:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8529:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8528:20:10" - }, - "returnParameters": { - "id": 11461, - "nodeType": "ParameterList", - "parameters": [], - "src": "8568:0:10" - }, - "scope": 12250, - "src": "8514:683:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11575, - "nodeType": "Block", - "src": "9382:468:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9400:278:10", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11553, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9507:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11554, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9537:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11555, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11556, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9599:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11557, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9627:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9473:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9473:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9473:177:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "9444:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9444:222:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11548, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9401:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queuedTransactions", - "nodeType": "MemberAccess", - "referencedDeclaration": 12270, - "src": "9401:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 11560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9401:277:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a2070726f706f73616c20616374696f6e20616c72656164792071756575656420617420657461", - "id": 11562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9690:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - }, - "value": "GovernorAlpha::_queueOrRevert: proposal action already queued at eta" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - } - ], - "id": 11547, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9392:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9392:378:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11564, - "nodeType": "ExpressionStatement", - "src": "9392:378:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11568, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9807:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11569, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9815:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11570, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9822:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11571, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9833:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11572, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9839:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11565, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9781:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "9781:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 11573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9781:62:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 11574, - "nodeType": "ExpressionStatement", - "src": "9781:62:10" - } - ] - }, - "documentation": null, - "id": 11576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_queueOrRevert", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11536, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9236:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11535, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9236:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11538, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9260:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9260:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11540, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9283:23:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11539, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9283:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11542, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9316:17:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11541, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9316:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11544, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9343:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9343:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9226:134:10" - }, - "returnParameters": { - "id": 11546, - "nodeType": "ParameterList", - "parameters": [], - "src": "9382:0:10" - }, - "scope": 12250, - "src": "9203:647:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 11651, - "nodeType": "Block", - "src": "9928:519:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11583, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "9952:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11582, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "9946:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9946:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11585, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "9967:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9967:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "9946:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637574656420696620697420697320717565756564", - "id": 11588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9989:71:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - }, - "value": "GovernorAlpha::execute: proposal can only be executed if it is queued" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - } - ], - "id": 11581, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9938:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9938:123:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11590, - "nodeType": "ExpressionStatement", - "src": "9938:123:10" - }, - { - "assignments": [ - 11592 - ], - "declarations": [ - { - "constant": false, - "id": 11592, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11651, - "src": "10071:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11591, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10071:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11596, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11593, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10099:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11595, - "indexExpression": { - "argumentTypes": null, - "id": 11594, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10109:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10099:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10071:49:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11597, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10130:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "10130:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10150:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10130:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11602, - "nodeType": "ExpressionStatement", - "src": "10130:24:10" - }, - { - "body": { - "id": 11645, - "nodeType": "Block", - "src": "10218:180:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11625, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10286:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11626, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10286:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11628, - "indexExpression": { - "argumentTypes": null, - "id": 11627, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10303:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10286:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11629, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10307:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11630, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10307:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11632, - "indexExpression": { - "argumentTypes": null, - "id": 11631, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10323:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10307:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11633, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10327:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "10327:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11636, - "indexExpression": { - "argumentTypes": null, - "id": 11635, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10347:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10327:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11637, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10351:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11638, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "10351:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11640, - "indexExpression": { - "argumentTypes": null, - "id": 11639, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10370:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10351:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11641, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10374:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11642, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "10374:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11620, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10266:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11621, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10266:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11623, - "indexExpression": { - "argumentTypes": null, - "id": 11622, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10282:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10266:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11615, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "10232:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "10232:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10232:33:10", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory))" - } - }, - "id": 11624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:53:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:155:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11644, - "nodeType": "ExpressionStatement", - "src": "10232:155:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11607, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10184:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11608, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10188:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10188:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10188:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10184:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11646, - "initializationExpression": { - "assignments": [ - 11604 - ], - "declarations": [ - { - "constant": false, - "id": 11604, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11646, - "src": "10169:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11603, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10169:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11606, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10181:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10169:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10213:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11612, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10213:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11614, - "nodeType": "ExpressionStatement", - "src": "10213:3:10" - }, - "nodeType": "ForStatement", - "src": "10164:234:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11648, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10429:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11647, - "name": "ProposalExecuted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11252, - "src": "10412:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10412:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11650, - "nodeType": "EmitStatement", - "src": "10407:33:10" - } - ] - }, - "documentation": null, - "id": 11652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "execute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11578, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11652, - "src": "9873:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9872:20:10" - }, - "returnParameters": { - "id": 11580, - "nodeType": "ParameterList", - "parameters": [], - "src": "9928:0:10" - }, - "scope": 12250, - "src": "9856:591:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11746, - "nodeType": "Block", - "src": "10508:698:10", - "statements": [ - { - "assignments": [ - 11658 - ], - "declarations": [ - { - "constant": false, - "id": 11658, - "name": "state", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10518:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11657, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "10518:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11662, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11660, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10546:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11659, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "10540:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10540:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10518:39:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11664, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11658, - "src": "10575:5:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11665, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "10584:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10584:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "10575:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616e63656c2065786563757465642070726f706f73616c", - "id": 11668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10608:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - }, - "value": "GovernorAlpha::cancel: cannot cancel executed proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - } - ], - "id": 11663, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10567:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10567:98:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11670, - "nodeType": "ExpressionStatement", - "src": "10567:98:10" - }, - { - "assignments": [ - 11672 - ], - "declarations": [ - { - "constant": false, - "id": 11672, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10676:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11671, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10676:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11676, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11673, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10704:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11675, - "indexExpression": { - "argumentTypes": null, - "id": 11674, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10714:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10704:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10676:49:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11678, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10743:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10743:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 11680, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "10757:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10743:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11684, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10787:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "10787:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "10813:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10813:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10827:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11686, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "10806:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10806:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11682, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "10769:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "10769:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10769:61:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11692, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "10833:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10833:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10769:83:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10743:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722061626f7665207468726573686f6c64", - "id": 11696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10854:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - }, - "value": "GovernorAlpha::cancel: proposer above threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - } - ], - "id": 11677, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10735:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10735:169:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11698, - "nodeType": "ExpressionStatement", - "src": "10735:169:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11699, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10915:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11701, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "10915:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10935:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10915:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11704, - "nodeType": "ExpressionStatement", - "src": "10915:24:10" - }, - { - "body": { - "id": 11740, - "nodeType": "Block", - "src": "11003:153:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11720, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11044:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11044:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11723, - "indexExpression": { - "argumentTypes": null, - "id": 11722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11061:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11044:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11724, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11065:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11065:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11727, - "indexExpression": { - "argumentTypes": null, - "id": 11726, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11081:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11065:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11728, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11085:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11729, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11085:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11731, - "indexExpression": { - "argumentTypes": null, - "id": 11730, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11105:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11085:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11732, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11109:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11733, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11109:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11735, - "indexExpression": { - "argumentTypes": null, - "id": 11734, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11128:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11109:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11736, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11132:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11737, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "11132:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11717, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "11017:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12298, - "src": "11017:26:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external" - } - }, - "id": 11738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11017:128:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11739, - "nodeType": "ExpressionStatement", - "src": "11017:128:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10969:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11710, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10973:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11711, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10973:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10973:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10969:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11741, - "initializationExpression": { - "assignments": [ - 11706 - ], - "declarations": [ - { - "constant": false, - "id": 11706, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11741, - "src": "10954:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10954:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11708, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10966:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10954:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10998:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10998:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11716, - "nodeType": "ExpressionStatement", - "src": "10998:3:10" - }, - "nodeType": "ForStatement", - "src": "10949:207:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11743, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "11188:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11742, - "name": "ProposalCanceled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11242, - "src": "11171:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11745, - "nodeType": "EmitStatement", - "src": "11166:33:10" - } - ] - }, - "documentation": null, - "id": 11747, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancel", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11655, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11654, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11747, - "src": "10469:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11653, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10469:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10468:20:10" - }, - "returnParameters": { - "id": 11656, - "nodeType": "ParameterList", - "parameters": [], - "src": "10508:0:10" - }, - "scope": 12250, - "src": "10453:753:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11780, - "nodeType": "Block", - "src": "11461:124:10", - "statements": [ - { - "assignments": [ - 11765 - ], - "declarations": [ - { - "constant": false, - "id": 11765, - "name": "p", - "nodeType": "VariableDeclaration", - "scope": 11780, - "src": "11471:18:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11764, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11471:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11769, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11766, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11492:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11768, - "indexExpression": { - "argumentTypes": null, - "id": 11767, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11749, - "src": "11502:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11492:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11471:42:10" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11770, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11531:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11771, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11531:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11772, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11542:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11773, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11542:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11774, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11552:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11552:12:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11776, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11566:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11566:11:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - } - ], - "id": 11778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11530:48:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_storage_$_t_array$_t_uint256_$dyn_storage_$_t_array$_t_string_storage_$dyn_storage_$_t_array$_t_bytes_storage_$dyn_storage_$", - "typeString": "tuple(address[] storage ref,uint256[] storage ref,string storage ref[] storage ref,bytes storage ref[] storage ref)" - } - }, - "functionReturnParameters": 11763, - "id": 11779, - "nodeType": "Return", - "src": "11523:55:10" - } - ] - }, - "documentation": null, - "id": 11781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getActions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11749, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11232:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11232:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11231:20:10" - }, - "returnParameters": { - "id": 11763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11753, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11310:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11310:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11752, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11310:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11756, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11348:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11754, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11348:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11755, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11348:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11759, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11382:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11382:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11758, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11382:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11762, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11422:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11422:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11422:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11296:160:10" - }, - "scope": 12250, - "src": "11212:373:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11797, - "nodeType": "Block", - "src": "11711:61:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11790, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11728:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11792, - "indexExpression": { - "argumentTypes": null, - "id": 11791, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11783, - "src": "11738:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11793, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "11728:30:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 11795, - "indexExpression": { - "argumentTypes": null, - "id": 11794, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11785, - "src": "11759:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:37:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "functionReturnParameters": 11789, - "id": 11796, - "nodeType": "Return", - "src": "11721:44:10" - } - ] - }, - "documentation": null, - "id": 11798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11783, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11611:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11611:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11785, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11631:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11631:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11610:35:10" - }, - "returnParameters": { - "id": 11789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11691:14:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_memory_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 11787, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "11691:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11690:16:10" - }, - "scope": 12250, - "src": "11591:181:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11900, - "nodeType": "Block", - "src": "11877:957:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11806, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "11895:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 11807, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11912:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11895:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11809, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11926:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11926:14:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11895:45:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726f706f73616c206964", - "id": 11813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11942:43:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - }, - "value": "GovernorAlpha::state: invalid proposal id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - } - ], - "id": 11805, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11887:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11887:99:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11815, - "nodeType": "ExpressionStatement", - "src": "11887:99:10" - }, - { - "assignments": [ - 11817 - ], - "declarations": [ - { - "constant": false, - "id": 11817, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11900, - "src": "11996:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11816, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11996:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11821, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11818, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "12024:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11820, - "indexExpression": { - "argumentTypes": null, - "id": 11819, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "12034:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12024:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11996:49:10" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11822, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12059:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11823, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "12059:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11828, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12142:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12142:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11830, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12158:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11831, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "12158:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12142:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11837, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12242:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11839, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12258:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11157, - "src": "12258:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12242:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11846, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12339:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12339:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11848, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "12360:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12339:42:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11851, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12385:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12385:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11853, - "name": "quorumVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11089, - "src": "12405:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12405:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12385:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12339:79:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11861, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12484:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11862, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12484:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12500:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12484:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11869, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11870, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "12568:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12651:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11878, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12677:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12677:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11880, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "12691:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "GRACE_PERIOD", - "nodeType": "MemberAccess", - "referencedDeclaration": 12260, - "src": "12691:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12691:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11877, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "12670:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12670:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12651:64:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11892, - "nodeType": "Block", - "src": "12776:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11889, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12797:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12797:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11891, - "nodeType": "Return", - "src": "12790:27:10" - } - ] - }, - "id": 11893, - "nodeType": "IfStatement", - "src": "12647:181:10", - "trueBody": { - "id": 11888, - "nodeType": "Block", - "src": "12717:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11885, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12738:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11886, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Expired", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12738:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11887, - "nodeType": "Return", - "src": "12731:28:10" - } - ] - } - }, - "id": 11894, - "nodeType": "IfStatement", - "src": "12564:264:10", - "trueBody": { - "id": 11874, - "nodeType": "Block", - "src": "12587:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11871, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12608:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12608:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11873, - "nodeType": "Return", - "src": "12601:29:10" - } - ] - } - }, - "id": 11895, - "nodeType": "IfStatement", - "src": "12480:348:10", - "trueBody": { - "id": 11868, - "nodeType": "Block", - "src": "12503:55:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11865, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12524:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12524:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11867, - "nodeType": "Return", - "src": "12517:30:10" - } - ] - } - }, - "id": 11896, - "nodeType": "IfStatement", - "src": "12335:493:10", - "trueBody": { - "id": 11860, - "nodeType": "Block", - "src": "12420:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11857, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12441:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Defeated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12441:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11859, - "nodeType": "Return", - "src": "12434:29:10" - } - ] - } - }, - "id": 11897, - "nodeType": "IfStatement", - "src": "12238:590:10", - "trueBody": { - "id": 11845, - "nodeType": "Block", - "src": "12277:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11842, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12298:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12298:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11844, - "nodeType": "Return", - "src": "12291:27:10" - } - ] - } - }, - "id": 11898, - "nodeType": "IfStatement", - "src": "12138:690:10", - "trueBody": { - "id": 11836, - "nodeType": "Block", - "src": "12179:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11833, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12200:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12200:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11835, - "nodeType": "Return", - "src": "12193:28:10" - } - ] - } - }, - "id": 11899, - "nodeType": "IfStatement", - "src": "12055:773:10", - "trueBody": { - "id": 11827, - "nodeType": "Block", - "src": "12078:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11824, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12099:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12099:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11826, - "nodeType": "Return", - "src": "12092:29:10" - } - ] - } - } - ] - }, - "documentation": null, - "id": 11901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11800, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11793:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11793:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11792:20:10" - }, - "returnParameters": { - "id": 11804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11858:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11802, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "11858:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11857:15:10" - }, - "scope": 12250, - "src": "11778:1056:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11915, - "nodeType": "Block", - "src": "12911:66:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "12938:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12938:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11911, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11903, - "src": "12950:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11912, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11905, - "src": "12962:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11908, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "12928:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12928:42:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11907, - "id": 11914, - "nodeType": "Return", - "src": "12921:49:10" - } - ] - }, - "documentation": null, - "id": 11916, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11903, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12858:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12858:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11905, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12878:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12878:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12857:34:10" - }, - "returnParameters": { - "id": 11907, - "nodeType": "ParameterList", - "parameters": [], - "src": "12911:0:10" - }, - "scope": 12250, - "src": "12840:137:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11994, - "nodeType": "Block", - "src": "13136:797:10", - "statements": [ - { - "assignments": [ - 11930 - ], - "declarations": [ - { - "constant": false, - "id": 11930, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13146:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11929, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13146:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11947, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11199, - "src": "13223:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11937, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11071, - "src": "13272:4:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - ], - "id": 11936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13266:5:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13266:11:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11935, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13256:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13256:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11940, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12249, - "src": "13296:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11943, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19284, - "src": "13334:4:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - ], - "id": 11942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13326:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13326:13:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 11932, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13195:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13195:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13195:158:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13172:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:191:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13146:217:10" - }, - { - "assignments": [ - 11949 - ], - "declarations": [ - { - "constant": false, - "id": 11949, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13374:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11958, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11953, - "name": "BALLOT_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11204, - "src": "13446:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11954, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13479:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11955, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13507:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 11951, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13418:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13418:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13418:110:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11950, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13395:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13395:143:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13374:164:10" - }, - { - "assignments": [ - 11960 - ], - "declarations": [ - { - "constant": false, - "id": 11960, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13549:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13549:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 11964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13623:10:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 11965, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11930, - "src": "13651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11966, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11949, - "src": "13684:10:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13589:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13589:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13589:119:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13566:152:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13549:169:10" - }, - { - "assignments": [ - 11971 - ], - "declarations": [ - { - "constant": false, - "id": 11971, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13729:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11970, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13729:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11978, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11973, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11960, - "src": "13759:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11974, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11922, - "src": "13767:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 11975, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11924, - "src": "13770:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11976, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11926, - "src": "13773:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11972, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "13749:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 11977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13749:26:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13729:46:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11980, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13793:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 11982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13814:1:10", - "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": 11981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13806:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13793:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e76616c6964207369676e6174757265", - "id": 11985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13818:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - }, - "value": "GovernorAlpha::castVoteBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - } - ], - "id": 11979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "13785:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13785:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11987, - "nodeType": "ExpressionStatement", - "src": "13785:83:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11989, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13895:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11990, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13906:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11991, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13918:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11988, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "13885:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13885:41:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11928, - "id": 11993, - "nodeType": "Return", - "src": "13878:48:10" - } - ] - }, - "documentation": null, - "id": 11995, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVoteBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11927, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11918, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13015:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13015:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11920, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13043:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11919, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13043:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11922, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13065:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 11921, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "13065:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11924, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13082:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11923, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13082:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11926, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13101:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13101:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13005:111:10" - }, - "returnParameters": { - "id": 11928, - "nodeType": "ParameterList", - "parameters": [], - "src": "13136:0:10" - }, - "scope": 12250, - "src": "12983:950:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12093, - "nodeType": "Block", - "src": "14058:746:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 12010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12006, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14082:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12005, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "14076:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 12007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14076:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12008, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "14097:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 12009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14097:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "14076:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6720697320636c6f736564", - "id": 12011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14119:44:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - }, - "value": "GovernorAlpha::_castVote: voting is closed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - } - ], - "id": 12004, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14068:96:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12013, - "nodeType": "ExpressionStatement", - "src": "14068:96:10" - }, - { - "assignments": [ - 12015 - ], - "declarations": [ - { - "constant": false, - "id": 12015, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14174:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 12014, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "14174:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12019, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 12016, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "14202:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 12018, - "indexExpression": { - "argumentTypes": null, - "id": 12017, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14212:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14202:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14174:49:10" - }, - { - "assignments": [ - 12021 - ], - "declarations": [ - { - "constant": false, - "id": 12021, - "name": "receipt", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14233:23:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 12020, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "14233:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12026, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12022, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14259:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "14259:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 12025, - "indexExpression": { - "argumentTypes": null, - "id": 12024, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14277:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14259:24:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14233:50:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12028, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14301:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12029, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14301:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 12030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14321:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14301:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74657220616c726561647920766f746564", - "id": 12032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14328:47:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - }, - "value": "GovernorAlpha::_castVote: voter already voted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - } - ], - "id": 12027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14293:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14293:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12034, - "nodeType": "ExpressionStatement", - "src": "14293:83:10" - }, - { - "assignments": [ - 12036 - ], - "declarations": [ - { - "constant": false, - "id": 12036, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14386:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14386:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12043, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12039, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14420:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12040, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "14427:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12037, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "14402:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 12038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "14402:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 12042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14402:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14386:61:10" - }, - { - "condition": { - "argumentTypes": null, - "id": 12044, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14462:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 12066, - "nodeType": "Block", - "src": "14554:85:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12056, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12058, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14568:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12060, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14599:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12061, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14599:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12062, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14622:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12059, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14592:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14592:36:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14568:60:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12065, - "nodeType": "ExpressionStatement", - "src": "14568:60:10" - } - ] - }, - "id": 12067, - "nodeType": "IfStatement", - "src": "14458:181:10", - "trueBody": { - "id": 12055, - "nodeType": "Block", - "src": "14471:77:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12045, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14485:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14485:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12049, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14512:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12050, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14512:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12051, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14531:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12048, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14505:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14505:32:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14485:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12054, - "nodeType": "ExpressionStatement", - "src": "14485:52:10" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 12072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12068, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14649:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12070, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14649:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 12071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14668:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14649:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12073, - "nodeType": "ExpressionStatement", - "src": "14649:23:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12074, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14682:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "support", - "nodeType": "MemberAccess", - "referencedDeclaration": 11174, - "src": "14682:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12077, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14700:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14682:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12079, - "nodeType": "ExpressionStatement", - "src": "14682:25:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12080, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14717:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12082, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11176, - "src": "14717:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12083, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14733:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14717:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12085, - "nodeType": "ExpressionStatement", - "src": "14717:21:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12087, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14763:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12088, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14770:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12089, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14782:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12090, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14791:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12086, - "name": "VoteCast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11238, - "src": "14754:8:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bool,uint256)" - } - }, - "id": 12091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14754:43:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12092, - "nodeType": "EmitStatement", - "src": "14749:48:10" - } - ] - }, - "documentation": null, - "id": 12094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11997, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13967:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13967:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11999, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13990:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13990:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12001, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "14018:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14018:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13957:79:10" - }, - "returnParameters": { - "id": 12003, - "nodeType": "ParameterList", - "parameters": [], - "src": "14058:0:10" - }, - "scope": 12250, - "src": "13939:865:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12110, - "nodeType": "Block", - "src": "14854:141:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12098, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "14872:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14872:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12100, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "14886:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14872:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14896:59:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__acceptAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - } - ], - "id": 12097, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14864:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14864:92:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12104, - "nodeType": "ExpressionStatement", - "src": "14864:92:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 12105, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "14966:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "acceptAdmin", - "nodeType": "MemberAccess", - "referencedDeclaration": 12263, - "src": "14966:20:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 12108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14966:22:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12109, - "nodeType": "ExpressionStatement", - "src": "14966:22:10" - } - ] - }, - "documentation": null, - "id": 12111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12095, - "nodeType": "ParameterList", - "parameters": [], - "src": "14832:2:10" - }, - "returnParameters": { - "id": 12096, - "nodeType": "ParameterList", - "parameters": [], - "src": "14854:0:10" - }, - "scope": 12250, - "src": "14810:185:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12128, - "nodeType": "Block", - "src": "15042:137:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15060:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15060:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12117, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15074:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15060:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15084:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__abdicate: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - } - ], - "id": 12114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15052:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15052:89:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12121, - "nodeType": "ExpressionStatement", - "src": "15052:89:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12122, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15151:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15170:1:10", - "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": 12123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15162:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15162:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15151:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12127, - "nodeType": "ExpressionStatement", - "src": "15151:21:10" - } - ] - }, - "documentation": null, - "id": 12129, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__abdicate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12112, - "nodeType": "ParameterList", - "parameters": [], - "src": "15020:2:10" - }, - "returnParameters": { - "id": 12113, - "nodeType": "ParameterList", - "parameters": [], - "src": "15042:0:10" - }, - "scope": 12250, - "src": "15001:178:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12159, - "nodeType": "Block", - "src": "15304:245:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12137, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15322:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15322:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12139, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15336:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15322:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15346:76:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12136, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15314:109:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12143, - "nodeType": "ExpressionStatement", - "src": "15314:109:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12148, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15467:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15459:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15459:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15478:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15481:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12154, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12131, - "src": "15520:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15509:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15509:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15509:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12156, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12133, - "src": "15538:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12144, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15433:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "15433:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 12157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15433:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 12158, - "nodeType": "ExpressionStatement", - "src": "15433:109:10" - } - ] - }, - "documentation": null, - "id": 12160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__queueSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12131, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15234:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15234:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12133, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15267:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15267:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15224:60:10" - }, - "returnParameters": { - "id": 12135, - "nodeType": "ParameterList", - "parameters": [], - "src": "15304:0:10" - }, - "scope": 12250, - "src": "15185:364:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12190, - "nodeType": "Block", - "src": "15676:249:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15694:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15694:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12170, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15708:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15694:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15718:78:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12167, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15686:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15686:111:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12174, - "nodeType": "ExpressionStatement", - "src": "15686:111:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12179, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15843:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15835:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15835:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15857:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12185, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12162, - "src": "15896:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12183, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15885:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15885:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15885:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12187, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12164, - "src": "15914:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12175, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15807:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "15807:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 12188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15807:111:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 12189, - "nodeType": "ExpressionStatement", - "src": "15807:111:10" - } - ] - }, - "documentation": null, - "id": 12191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__executeSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12165, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12162, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15606:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15606:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12164, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15639:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12163, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15639:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15596:60:10" - }, - "returnParameters": { - "id": 12166, - "nodeType": "ParameterList", - "parameters": [], - "src": "15676:0:10" - }, - "scope": 12250, - "src": "15555:370:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12215, - "nodeType": "Block", - "src": "16001:98:10", - "statements": [ - { - "assignments": [ - 12201 - ], - "declarations": [ - { - "constant": false, - "id": 12201, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12215, - "src": "16011:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12200, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16011:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12205, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12202, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16023:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12203, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12195, - "src": "16027:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16023:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16011:17:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12207, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16046:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12208, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16051:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16046:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6164646974696f6e206f766572666c6f77", - "id": 12210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16054:19:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - }, - "value": "addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - } - ], - "id": 12206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16038:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16038:36:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12212, - "nodeType": "ExpressionStatement", - "src": "16038:36:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12213, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16091:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12199, - "id": 12214, - "nodeType": "Return", - "src": "16084:8:10" - } - ] - }, - "documentation": null, - "id": 12216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15947:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15947:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15958:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15958:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15946:22:10" - }, - "returnParameters": { - "id": 12199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15992:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15992:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15991:9:10" - }, - "scope": 12250, - "src": "15931:168:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12236, - "nodeType": "Block", - "src": "16175:79:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12226, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16193:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12227, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16198:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16193:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7375627472616374696f6e20756e646572666c6f77", - "id": 12229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16201:23:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - }, - "value": "subtraction underflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - } - ], - "id": 12225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16185:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16185:40:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12231, - "nodeType": "ExpressionStatement", - "src": "16185:40:10" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12232, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16242:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12233, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16246:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12224, - "id": 12235, - "nodeType": "Return", - "src": "16235:12:10" - } - ] - }, - "documentation": null, - "id": 12237, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12218, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16121:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16121:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12220, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16132:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16132:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16120:22:10" - }, - "returnParameters": { - "id": 12224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12223, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16166:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16166:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16165:9:10" - }, - "scope": 12250, - "src": "16105:149:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12248, - "nodeType": "Block", - "src": "16314:98:10", - "statements": [ - { - "assignments": [ - 12243 - ], - "declarations": [ - { - "constant": false, - "id": 12243, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 12248, - "src": "16324:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16324:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16324:15:10" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 12243, - "isOffset": false, - "isSlot": false, - "src": "16360:7:10", - "valueSize": 1 - } - } - ], - "id": 12245, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "16349:33:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12246, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12243, - "src": "16398:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12241, - "id": 12247, - "nodeType": "Return", - "src": "16391:14:10" - } - ] - }, - "documentation": null, - "id": 12249, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12238, - "nodeType": "ParameterList", - "parameters": [], - "src": "16279:2:10" - }, - "returnParameters": { - "id": 12241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12240, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12249, - "src": "16305:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16304:9:10" - }, - "scope": 12250, - "src": "16260:152:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 12333, - "src": "1038:15376:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12314, - "linearizedBaseContracts": [ - 12314 - ], - "name": "TimelockInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12255, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12251, - "nodeType": "ParameterList", - "parameters": [], - "src": "16464:2:10" - }, - "returnParameters": { - "id": 12254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12253, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12255, - "src": "16490:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16490:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:9:10" - }, - "scope": 12314, - "src": "16450:49:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12260, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "GRACE_PERIOD", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12256, - "nodeType": "ParameterList", - "parameters": [], - "src": "16525:2:10" - }, - "returnParameters": { - "id": 12259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12260, - "src": "16551:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16551:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16550:9:10" - }, - "scope": 12314, - "src": "16504:56:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12263, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12261, - "nodeType": "ParameterList", - "parameters": [], - "src": "16585:2:10" - }, - "returnParameters": { - "id": 12262, - "nodeType": "ParameterList", - "parameters": [], - "src": "16596:0:10" - }, - "scope": 12314, - "src": "16565:32:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12270, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queuedTransactions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12265, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16630:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12264, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16630:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16629:14:10" - }, - "returnParameters": { - "id": 12269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12268, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16667:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16667:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16666:6:10" - }, - "scope": 12314, - "src": "16602:71:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12285, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12272, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16704:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12271, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16704:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12274, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16720:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12273, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16720:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12276, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16735:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12275, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16735:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12278, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16762:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12277, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16762:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12280, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16783:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16783:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16703:92:10" - }, - "returnParameters": { - "id": 12284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16814:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12282, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16814:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16813:9:10" - }, - "scope": 12314, - "src": "16678:145:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12298, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12296, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12287, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16855:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16855:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12289, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16871:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16871:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12291, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16886:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16886:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16913:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16913:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12295, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16934:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16934:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16854:92:10" - }, - "returnParameters": { - "id": 12297, - "nodeType": "ParameterList", - "parameters": [], - "src": "16955:0:10" - }, - "scope": 12314, - "src": "16828:128:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12313, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12300, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "16989:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16989:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12302, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17005:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12304, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17020:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12303, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17020:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12306, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17047:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17047:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12308, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17068:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16988:92:10" - }, - "returnParameters": { - "id": 12312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17107:12:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17107:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17106:14:10" - }, - "scope": 12314, - "src": "16961:160:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "16416:707:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12332, - "linearizedBaseContracts": [ - 12332 - ], - "name": "YAMInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12323, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12316, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17177:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17177:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12318, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17194:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17194:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17176:38:10" - }, - "returnParameters": { - "id": 12322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17238:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17238:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17237:9:10" - }, - "scope": 12332, - "src": "17154:93:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12328, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12324, - "nodeType": "ParameterList", - "parameters": [], - "src": "17271:2:10" - }, - "returnParameters": { - "id": 12327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12328, - "src": "17297:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17297:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17296:9:10" - }, - "scope": 12332, - "src": "17252:54:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12331, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12329, - "nodeType": "ParameterList", - "parameters": [], - "src": "17330:2:10" - }, - "returnParameters": { - "id": 12330, - "nodeType": "ParameterList", - "parameters": [], - "src": "17341:0:10" - }, - "scope": 12332, - "src": "17311:31:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "17125:219:10" - } - ], - "src": "0:17345:10" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event", - "signature": "0x789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c" - }, - "0x7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e0": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event", - "signature": "0x7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e0" - }, - "0x712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event", - "signature": "0x712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f" - }, - "0x9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ProposalQueued", - "type": "event", - "signature": "0x9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892" - }, - "0x877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c46": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "name": "VoteCast", - "type": "event", - "signature": "0x877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c46" - } - }, - "links": {}, - "address": "0x47Ff9D00cDAE31B4E09DEf8081bb3a1282e8061D", - "transactionHash": "0xf1393fa7e9962615415996e53debd8188cf2a4895609bb8b83da714d59020879" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.490Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": { - "proposalMaxOperations()": { - "notice": "The maximum number of actions that can be included in a proposal" - }, - "proposalThreshold()": { - "notice": "The number of votes required in order for a voter to become a proposer" - }, - "quorumVotes()": { - "notice": "The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed" - }, - "votingDelay()": { - "notice": "The delay before voting on a proposal may take place, once proposed" - }, - "votingPeriod()": { - "notice": "The duration of voting on a proposal, in blocks" - } - } - } -} \ No newline at end of file diff --git a/build/contracts/IERC20.json b/build/contracts/IERC20.json deleted file mode 100644 index 80f310c..0000000 --- a/build/contracts/IERC20.json +++ /dev/null @@ -1,1906 +0,0 @@ -{ - "contractName": "IERC20", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/IERC20.sol\":{\"keccak256\":\"0xb654abe85060b241b440e22ead01dabb724dda69034d49b483e5e3e55ee64400\",\"urls\":[\"bzz-raw://53f67e469e2c4dfc10411d72f465a3c5b85939f1df4b2b26f12deb729f260b04\",\"dweb:/ipfs/QmSNUGpXPcmWNDczauAmUgZsypdcAB2pZNi3B2RGpYVyp2\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.5.17;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "exportedSymbols": { - "IERC20": [ - 14358 - ] - }, - "id": 14359, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14291, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:15" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP.", - "fullyImplemented": false, - "id": 14358, - "linearizedBaseContracts": [ - 14358 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 14296, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14292, - "nodeType": "ParameterList", - "parameters": [], - "src": "244:2:15" - }, - "returnParameters": { - "id": 14295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14296, - "src": "270:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "270:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "269:9:15" - }, - "scope": 14358, - "src": "224:55:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 14303, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14299, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14298, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 14303, - "src": "381:15:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "381:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "380:17:15" - }, - "returnParameters": { - "id": 14302, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14301, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14303, - "src": "421:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14300, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "421:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "420:9:15" - }, - "scope": 14358, - "src": "362:68:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 14312, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14308, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14305, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 14312, - "src": "668:17:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14304, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "668:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14307, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 14312, - "src": "687:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14306, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "687:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "667:35:15" - }, - "returnParameters": { - "id": 14311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14310, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14312, - "src": "721:4:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14309, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "720:6:15" - }, - "scope": 14358, - "src": "650:77:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 14321, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14317, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14314, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14321, - "src": "1021:13:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14313, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1021:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14316, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14321, - "src": "1036:15:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1036:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1020:32:15" - }, - "returnParameters": { - "id": 14320, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14319, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14321, - "src": "1076:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14318, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1076:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1075:9:15" - }, - "scope": 14358, - "src": "1002:83:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 14330, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14326, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14323, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14330, - "src": "1755:15:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14322, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1755:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14325, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 14330, - "src": "1772:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14324, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1772:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1754:33:15" - }, - "returnParameters": { - "id": 14329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14328, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14330, - "src": "1806:4:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14327, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1806:4:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1805:6:15" - }, - "scope": 14358, - "src": "1738:74:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 14341, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14337, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14332, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2141:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2141:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14334, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2157:17:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14333, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2157:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14336, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2176:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2176:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2140:51:15" - }, - "returnParameters": { - "id": 14340, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14339, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2210:4:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14338, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2210:4:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2209:6:15" - }, - "scope": 14358, - "src": "2119:97:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 14349, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 14348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14343, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "2400:20:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14342, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2400:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14345, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "2422:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14344, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2422:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14347, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "2442:13:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14346, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2442:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2399:57:15" - }, - "src": "2385:72:15" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 14357, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 14356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14351, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "2631:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14350, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2631:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14353, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "2654:23:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14352, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2654:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14355, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "2679:13:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2679:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2630:63:15" - }, - "src": "2616:78:15" - } - ], - "scope": 14359, - "src": "130:2566:15" - } - ], - "src": "33:2664:15" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "exportedSymbols": { - "IERC20": [ - 14358 - ] - }, - "id": 14359, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14291, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:15" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP.", - "fullyImplemented": false, - "id": 14358, - "linearizedBaseContracts": [ - 14358 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 14296, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14292, - "nodeType": "ParameterList", - "parameters": [], - "src": "244:2:15" - }, - "returnParameters": { - "id": 14295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14296, - "src": "270:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "270:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "269:9:15" - }, - "scope": 14358, - "src": "224:55:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 14303, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14299, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14298, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 14303, - "src": "381:15:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "381:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "380:17:15" - }, - "returnParameters": { - "id": 14302, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14301, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14303, - "src": "421:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14300, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "421:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "420:9:15" - }, - "scope": 14358, - "src": "362:68:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 14312, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14308, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14305, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 14312, - "src": "668:17:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14304, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "668:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14307, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 14312, - "src": "687:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14306, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "687:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "667:35:15" - }, - "returnParameters": { - "id": 14311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14310, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14312, - "src": "721:4:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14309, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "720:6:15" - }, - "scope": 14358, - "src": "650:77:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 14321, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14317, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14314, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14321, - "src": "1021:13:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14313, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1021:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14316, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14321, - "src": "1036:15:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1036:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1020:32:15" - }, - "returnParameters": { - "id": 14320, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14319, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14321, - "src": "1076:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14318, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1076:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1075:9:15" - }, - "scope": 14358, - "src": "1002:83:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 14330, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14326, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14323, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14330, - "src": "1755:15:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14322, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1755:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14325, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 14330, - "src": "1772:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14324, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1772:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1754:33:15" - }, - "returnParameters": { - "id": 14329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14328, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14330, - "src": "1806:4:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14327, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1806:4:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1805:6:15" - }, - "scope": 14358, - "src": "1738:74:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 14341, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14337, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14332, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2141:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2141:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14334, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2157:17:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14333, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2157:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14336, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2176:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2176:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2140:51:15" - }, - "returnParameters": { - "id": 14340, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14339, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14341, - "src": "2210:4:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14338, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2210:4:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2209:6:15" - }, - "scope": 14358, - "src": "2119:97:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 14349, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 14348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14343, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "2400:20:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14342, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2400:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14345, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "2422:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14344, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2422:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14347, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "2442:13:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14346, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2442:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2399:57:15" - }, - "src": "2385:72:15" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 14357, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 14356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14351, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "2631:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14350, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2631:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14353, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "2654:23:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14352, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2654:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14355, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "2679:13:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2679:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2630:63:15" - }, - "src": "2616:78:15" - } - ], - "scope": 14359, - "src": "130:2566:15" - } - ], - "src": "33:2664:15" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.140Z", - "devdoc": { - "details": "Interface of the ERC20 standard as defined in the EIP.", - "methods": { - "allowance(address,address)": { - "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called." - }, - "approve(address,uint256)": { - "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event." - }, - "balanceOf(address)": { - "details": "Returns the amount of tokens owned by `account`." - }, - "totalSupply()": { - "details": "Returns the amount of tokens in existence." - }, - "transfer(address,uint256)": { - "details": "Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event." - }, - "transferFrom(address,address,uint256)": { - "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/IRewardDistributionRecipient.json b/build/contracts/IRewardDistributionRecipient.json deleted file mode 100644 index c26978f..0000000 --- a/build/contracts/IRewardDistributionRecipient.json +++ /dev/null @@ -1,39855 +0,0 @@ -{ - "contractName": "IRewardDistributionRecipient", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":\"IRewardDistributionRecipient\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":{\"keccak256\":\"0xa8918e83ad8afd1ce8589d00dce386d2ee6a380f1bdafdd583db6f5b990e24c5\",\"urls\":[\"bzz-raw://cb926895e76ea186de7c790e05578cef920c77f6f9258d41df8a844cec163c37\",\"dweb:/ipfs/QmVomvauEub1TiDCPgBS9CSuAhnafgFVWJCstYyCGH9SQK\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-27\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-26\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMIncentives.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n function mint(address account, uint amount) external;\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni_lp = IERC20(0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd);\n\n uint256 private _totalSupply;\n\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n function mint(address to, uint256 amount) external;\n}\n\ncontract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000;\n\n uint256 public initreward = 15 * 10**5 * 10**18; // 1.5m\n uint256 public starttime = 1597931200 + 24 hours; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkhalve checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n modifier checkhalve() {\n if (block.timestamp >= periodFinish) {\n initreward = initreward.mul(50).div(100);\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 newRewards = initreward.mul(scalingFactor).div(10**18);\n yam.mint(address(this), newRewards);\n\n rewardRate = initreward.div(DURATION);\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(initreward);\n }\n _;\n }\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n require(yam.balanceOf(address(this)) == 0, \"already initialized\");\n yam.mint(address(this), initreward);\n rewardRate = initreward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n\n\n // This function allows governance to take unsupported tokens out of the\n // contract, since this one exists longer than the other pools.\n // This is in an effort to make someone whole, should they seriously\n // mess up. There is no guarantee governance will vote to return these.\n // It also allows for removal of airdropped tokens.\n function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to)\n external\n {\n // only gov\n require(msg.sender == owner(), \"!governance\");\n // cant take staked asset\n require(_token != uni_lp, \"uni_lp\");\n // cant take reward asset\n require(_token != yam, \"yam\");\n\n // transfer to\n _token.safeTransfer(to, amount);\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.168Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/LPTokenWrapper.json b/build/contracts/LPTokenWrapper.json deleted file mode 100644 index c2a80b7..0000000 --- a/build/contracts/LPTokenWrapper.json +++ /dev/null @@ -1,39820 +0,0 @@ -{ - "contractName": "LPTokenWrapper", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "uni_lp", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"uni_lp\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":\"LPTokenWrapper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":{\"keccak256\":\"0xa8918e83ad8afd1ce8589d00dce386d2ee6a380f1bdafdd583db6f5b990e24c5\",\"urls\":[\"bzz-raw://cb926895e76ea186de7c790e05578cef920c77f6f9258d41df8a844cec163c37\",\"dweb:/ipfs/QmVomvauEub1TiDCPgBS9CSuAhnafgFVWJCstYyCGH9SQK\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b03191673e9b70db3e22324f962f53e5290cb1f4af72c9ebd17905534801561003657600080fd5b506107c4806100466000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806370a082311161005057806370a08231146100a557806383d0fdc1146100d8578063a694fc3a1461010957610067565b806318160ddd1461006c5780632e1a7d4d14610086575b600080fd5b610074610126565b60408051918252519081900360200190f35b6100a36004803603602081101561009c57600080fd5b503561012c565b005b610074600480360360208110156100bb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661019d565b6100e06101c5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100a36004803603602081101561011f57600080fd5b50356101e1565b60015490565b60015461013f908263ffffffff61025016565b60015533600090815260026020526040902054610162908263ffffffff61025016565b33600081815260026020526040812092909255905461019a9173ffffffffffffffffffffffffffffffffffffffff9091169083610299565b50565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6001546101f4908263ffffffff61032b16565b60015533600090815260026020526040902054610217908263ffffffff61032b16565b33600081815260026020526040812092909255905461019a9173ffffffffffffffffffffffffffffffffffffffff90911690308461039f565b600061029283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061043a565b9392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526103269084906104eb565b505050565b60008282018381101561029257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526104349085906104eb565b50505050565b600081848411156104e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104a8578181015183820152602001610490565b50505050905090810190601f1680156104d55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b61050a8273ffffffffffffffffffffffffffffffffffffffff16610729565b61057557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106105de57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016105a1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610640576040519150601f19603f3d011682016040523d82523d6000602084013e610645565b606091505b5091509150816106b657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610434578080602001905160208110156106d257600080fd5b5051610434576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610766602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061075d5750808214155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820f7ebf94eeb82f540fb87e6f3bc560dcb9440281479db100d3460e0728aaa485f64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100675760003560e01c806370a082311161005057806370a08231146100a557806383d0fdc1146100d8578063a694fc3a1461010957610067565b806318160ddd1461006c5780632e1a7d4d14610086575b600080fd5b610074610126565b60408051918252519081900360200190f35b6100a36004803603602081101561009c57600080fd5b503561012c565b005b610074600480360360208110156100bb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661019d565b6100e06101c5565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100a36004803603602081101561011f57600080fd5b50356101e1565b60015490565b60015461013f908263ffffffff61025016565b60015533600090815260026020526040902054610162908263ffffffff61025016565b33600081815260026020526040812092909255905461019a9173ffffffffffffffffffffffffffffffffffffffff9091169083610299565b50565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6001546101f4908263ffffffff61032b16565b60015533600090815260026020526040902054610217908263ffffffff61032b16565b33600081815260026020526040812092909255905461019a9173ffffffffffffffffffffffffffffffffffffffff90911690308461039f565b600061029283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061043a565b9392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526103269084906104eb565b505050565b60008282018381101561029257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526104349085906104eb565b50505050565b600081848411156104e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104a8578181015183820152602001610490565b50505050905090810190601f1680156104d55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b61050a8273ffffffffffffffffffffffffffffffffffffffff16610729565b61057557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106105de57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016105a1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610640576040519150601f19603f3d011682016040523d82523d6000602084013e610645565b606091505b5091509150816106b657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610434578080602001905160208110156106d257600080fd5b5051610434576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610766602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061075d5750808214155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820f7ebf94eeb82f540fb87e6f3bc560dcb9440281479db100d3460e0728aaa485f64736f6c63430005110032", - "sourceMap": "21568:921:11:-;;;21663:73;;;-1:-1:-1;;;;;;21663:73:11;21693:42;21663:73;;;21568:921;5:2:-1;;;;30:1;27;20:12;5:2;21568:921:11;;;;;;;", - "deployedSourceMap": "21568:921:11:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;21568:921:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21830:89;;;:::i;:::-;;;;;;;;;;;;;;;;22274:213;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22274:213:11;;:::i;:::-;;21925:108;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21925:108:11;;;;:::i;21663:73::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;22039:229;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22039:229:11;;:::i;21830:89::-;21900:12;;21830:89;:::o;22274:213::-;22340:12;;:24;;22357:6;22340:24;:16;:24;:::i;:::-;22325:12;:39;22408:10;22398:21;;;;:9;:21;;;;;;:33;;22424:6;22398:33;:25;:33;:::i;:::-;22384:10;22374:21;;;;:9;:21;;;;;:57;;;;22441:6;;:39;;22374:21;22441:6;;;;22473;22441:19;:39::i;:::-;22274:213;:::o;21925:108::-;22008:18;;21982:7;22008:18;;;:9;:18;;;;;;;21925:108::o;21663:73::-;;;;;;:::o;22039:229::-;22102:12;;:24;;22119:6;22102:24;:16;:24;:::i;:::-;22087:12;:39;22170:10;22160:21;;;;:9;:21;;;;;;:33;;22186:6;22160:33;:25;:33;:::i;:::-;22146:10;22136:21;;;;:9;:21;;;;;:57;;;;22203:6;;:58;;22136:21;22203:6;;;;22247:4;22254:6;22203:23;:58::i;3722:134::-;3780:7;3806:43;3810:1;3813;3806:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3799:50;3722:134;-1:-1:-1;;;3722:134:11:o;17863:174::-;17971:58;;;17994:14;17971:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17971:58:11;;;;;;;;25:18:-1;;61:17;;17971:58:11;182:15:-1;17994:23:11;179:29:-1;160:49;;17945:85:11;;17964:5;;17945:18;:85::i;:::-;17863:174;;;:::o;3282:176::-;3340:7;3371:5;;;3394:6;;;;3386:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18043:202;18169:68;;;18192:18;18169:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;18169:68:11;;;;;;;;25:18:-1;;61:17;;18169:68:11;182:15:-1;18192:27:11;179:29:-1;160:49;;18143:95:11;;18162:5;;18143:18;:95::i;:::-;18043:202;;;;:::o;4180:187::-;4266:7;4301:12;4293:6;;;;4285:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4285:29:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4336:5:11;;;4180:187::o;19867:1095::-;20462:27;20470:5;20462:25;;;:27::i;:::-;20454:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20596:12;20610:23;20645:5;20637:19;;20657:4;20637:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20637:25:11;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20595:67:11;;;;20680:7;20672:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20739:17;;:21;20735:221;;20879:10;20868:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20868:30:11;20860:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14773:797;14833:4;15481:20;;15326:66;15520:15;;;;;:42;;;15551:11;15539:8;:23;;15520:42;15512:51;14773:797;-1:-1:-1;;;;14773:797:11:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-27\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-26\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMIncentives.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n function mint(address account, uint amount) external;\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni_lp = IERC20(0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd);\n\n uint256 private _totalSupply;\n\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n function mint(address to, uint256 amount) external;\n}\n\ncontract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000;\n\n uint256 public initreward = 15 * 10**5 * 10**18; // 1.5m\n uint256 public starttime = 1597931200 + 24 hours; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkhalve checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n modifier checkhalve() {\n if (block.timestamp >= periodFinish) {\n initreward = initreward.mul(50).div(100);\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 newRewards = initreward.mul(scalingFactor).div(10**18);\n yam.mint(address(this), newRewards);\n\n rewardRate = initreward.div(DURATION);\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(initreward);\n }\n _;\n }\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n require(yam.balanceOf(address(this)) == 0, \"already initialized\");\n yam.mint(address(this), initreward);\n rewardRate = initreward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n\n\n // This function allows governance to take unsupported tokens out of the\n // contract, since this one exists longer than the other pools.\n // This is in an effort to make someone whole, should they seriously\n // mess up. There is no guarantee governance will vote to return these.\n // It also allows for removal of airdropped tokens.\n function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to)\n external\n {\n // only gov\n require(msg.sender == owner(), \"!governance\");\n // cant take staked asset\n require(_token != uni_lp, \"uni_lp\");\n // cant take reward asset\n require(_token != yam, \"yam\");\n\n // transfer to\n _token.safeTransfer(to, amount);\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.203Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Math.json b/build/contracts/Math.json deleted file mode 100644 index 77cee1c..0000000 --- a/build/contracts/Math.json +++ /dev/null @@ -1,39739 +0,0 @@ -{ - "contractName": "Math", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":\"Math\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":{\"keccak256\":\"0xa8918e83ad8afd1ce8589d00dce386d2ee6a380f1bdafdd583db6f5b990e24c5\",\"urls\":[\"bzz-raw://cb926895e76ea186de7c790e05578cef920c77f6f9258d41df8a844cec163c37\",\"dweb:/ipfs/QmVomvauEub1TiDCPgBS9CSuAhnafgFVWJCstYyCGH9SQK\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158205d3a6887749457c122bee48c8ebe894e7f02813ff0f9b04190af1f0467ae56da64736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158205d3a6887749457c122bee48c8ebe894e7f02813ff0f9b04190af1f0467ae56da64736f6c63430005110032", - "sourceMap": "1726:668:11:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "1726:668:11:-;;;;;;;;", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-27\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-26\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMIncentives.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n function mint(address account, uint amount) external;\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni_lp = IERC20(0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd);\n\n uint256 private _totalSupply;\n\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n function mint(address to, uint256 amount) external;\n}\n\ncontract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000;\n\n uint256 public initreward = 15 * 10**5 * 10**18; // 1.5m\n uint256 public starttime = 1597931200 + 24 hours; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkhalve checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n modifier checkhalve() {\n if (block.timestamp >= periodFinish) {\n initreward = initreward.mul(50).div(100);\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 newRewards = initreward.mul(scalingFactor).div(10**18);\n yam.mint(address(this), newRewards);\n\n rewardRate = initreward.div(DURATION);\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(initreward);\n }\n _;\n }\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n require(yam.balanceOf(address(this)) == 0, \"already initialized\");\n yam.mint(address(this), initreward);\n rewardRate = initreward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n\n\n // This function allows governance to take unsupported tokens out of the\n // contract, since this one exists longer than the other pools.\n // This is in an effort to make someone whole, should they seriously\n // mess up. There is no guarantee governance will vote to return these.\n // It also allows for removal of airdropped tokens.\n function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to)\n external\n {\n // only gov\n require(msg.sender == owner(), \"!governance\");\n // cant take staked asset\n require(_token != uni_lp, \"uni_lp\");\n // cant take reward asset\n require(_token != yam, \"yam\");\n\n // transfer to\n _token.safeTransfer(to, amount);\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.232Z", - "devdoc": { - "details": "Standard math utilities missing in the Solidity language.", - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json deleted file mode 100644 index a1329cf..0000000 --- a/build/contracts/Migrations.json +++ /dev/null @@ -1,905 +0,0 @@ -{ - "contractName": "Migrations", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "constant": true, - "inputs": [], - "name": "last_completed_migration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "completed", - "type": "uint256" - } - ], - "name": "setCompleted", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/Migrations.sol\":{\"keccak256\":\"0xe04e2fb3d39d415aa4d2368410c1e9f8937cdda2d99d2e412cb45b9d13ce9ec8\",\"urls\":[\"bzz-raw://db986a7934528a7c97f35685a115dbc98af9c3f56ea049deab5c47e8543804a1\",\"dweb:/ipfs/QmRACrDoyh9BMeGP5nr1f9k7bbHsLnQ85HiVKvbPGx9KFW\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610123806100326000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c8063445df0ac1460415780638da5cb5b146059578063fdacd576146088575b600080fd5b604760a4565b60408051918252519081900360200190f35b605f60aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60a260048036036020811015609c57600080fd5b503560c6565b005b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141560eb5760018190555b5056fea265627a7a723158206358d12d2b03d5e625930987def3276d570b337cbb1589d24ded2765b90e155c64736f6c63430005110032", - "deployedBytecode": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c8063445df0ac1460415780638da5cb5b146059578063fdacd576146088575b600080fd5b604760a4565b60408051918252519081900360200190f35b605f60aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60a260048036036020811015609c57600080fd5b503560c6565b005b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141560eb5760018190555b5056fea265627a7a723158206358d12d2b03d5e625930987def3276d570b337cbb1589d24ded2765b90e155c64736f6c63430005110032", - "sourceMap": "66:311:0:-;;;155:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;182:5:0;:18;;-1:-1:-1;;;;;;182:18:0;190:10;182:18;;;66:311;;;;;;", - "deployedSourceMap": "66:311:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;66:311:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114:36;;;:::i;:::-;;;;;;;;;;;;;;;;90:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;272:103;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;272:103:0;;:::i;:::-;;114:36;;;;:::o;90:20::-;;;;;;:::o;272:103::-;255:5;;;;241:10;:19;237:26;;;334:24;:36;;;237:26;272:103;:::o", - "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.21 <0.7.0;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/Migrations.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 36 - ] - }, - "id": 37, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.4", - ".21", - "<", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "32:32:0" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 36, - "linearizedBaseContracts": [ - 36 - ], - "name": "Migrations", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 36, - "src": "90:20:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "90:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 5, - "name": "last_completed_migration", - "nodeType": "VariableDeclaration", - "scope": 36, - "src": "114:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "114:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 13, - "nodeType": "Block", - "src": "176:29:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "182:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "190:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "190:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "182:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12, - "nodeType": "ExpressionStatement", - "src": "182:18:0" - } - ] - }, - "documentation": null, - "id": 14, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6, - "nodeType": "ParameterList", - "parameters": [], - "src": "166:2:0" - }, - "returnParameters": { - "id": 7, - "nodeType": "ParameterList", - "parameters": [], - "src": "176:0:0" - }, - "scope": 36, - "src": "155:50:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 22, - "nodeType": "Block", - "src": "231:37:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "241:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "241:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "255:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "241:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 21, - "nodeType": "IfStatement", - "src": "237:26:0", - "trueBody": { - "id": 20, - "nodeType": "PlaceholderStatement", - "src": "262:1:0" - } - } - ] - }, - "documentation": null, - "id": 23, - "name": "restricted", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [], - "src": "228:2:0" - }, - "src": "209:59:0", - "visibility": "internal" - }, - { - "body": { - "id": 34, - "nodeType": "Block", - "src": "328:47:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 30, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "334:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 31, - "name": "completed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 25, - "src": "361:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "334:36:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 33, - "nodeType": "ExpressionStatement", - "src": "334:36:0" - } - ] - }, - "documentation": null, - "id": 35, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 28, - "modifierName": { - "argumentTypes": null, - "id": 27, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "317:10:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "317:10:0" - } - ], - "name": "setCompleted", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 26, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 25, - "name": "completed", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "294:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 24, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "294:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "293:16:0" - }, - "returnParameters": { - "id": 29, - "nodeType": "ParameterList", - "parameters": [], - "src": "328:0:0" - }, - "scope": 36, - "src": "272:103:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 37, - "src": "66:311:0" - } - ], - "src": "32:346:0" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 36 - ] - }, - "id": 37, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.4", - ".21", - "<", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "32:32:0" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 36, - "linearizedBaseContracts": [ - 36 - ], - "name": "Migrations", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 36, - "src": "90:20:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "90:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 5, - "name": "last_completed_migration", - "nodeType": "VariableDeclaration", - "scope": 36, - "src": "114:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "114:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 13, - "nodeType": "Block", - "src": "176:29:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "182:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "190:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "190:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "182:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12, - "nodeType": "ExpressionStatement", - "src": "182:18:0" - } - ] - }, - "documentation": null, - "id": 14, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6, - "nodeType": "ParameterList", - "parameters": [], - "src": "166:2:0" - }, - "returnParameters": { - "id": 7, - "nodeType": "ParameterList", - "parameters": [], - "src": "176:0:0" - }, - "scope": 36, - "src": "155:50:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 22, - "nodeType": "Block", - "src": "231:37:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "241:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "241:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "255:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "241:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 21, - "nodeType": "IfStatement", - "src": "237:26:0", - "trueBody": { - "id": 20, - "nodeType": "PlaceholderStatement", - "src": "262:1:0" - } - } - ] - }, - "documentation": null, - "id": 23, - "name": "restricted", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [], - "src": "228:2:0" - }, - "src": "209:59:0", - "visibility": "internal" - }, - { - "body": { - "id": 34, - "nodeType": "Block", - "src": "328:47:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 30, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "334:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 31, - "name": "completed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 25, - "src": "361:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "334:36:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 33, - "nodeType": "ExpressionStatement", - "src": "334:36:0" - } - ] - }, - "documentation": null, - "id": 35, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 28, - "modifierName": { - "argumentTypes": null, - "id": 27, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "317:10:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "317:10:0" - } - ], - "name": "setCompleted", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 26, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 25, - "name": "completed", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "294:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 24, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "294:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "293:16:0" - }, - "returnParameters": { - "id": 29, - "nodeType": "ParameterList", - "parameters": [], - "src": "328:0:0" - }, - "scope": 36, - "src": "272:103:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 37, - "src": "66:311:0" - } - ], - "src": "32:346:0" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": {}, - "links": {}, - "address": "0xd0dF357fcB0e8AAA2eE608F298675fFe38656F5D", - "transactionHash": "0x267f0b31c4c416c3e20b706caa3294ee683769577eee39edae3942b1c80262cf" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.765Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Ownable.json b/build/contracts/Ownable.json deleted file mode 100644 index 43e44f4..0000000 --- a/build/contracts/Ownable.json +++ /dev/null @@ -1,39835 +0,0 @@ -{ - "contractName": "Ownable", - "abi": [ - { - "inputs": [], - "payable": false, - "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" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"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\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. * This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the deployer as the initial owner.\"},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":\"Ownable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":{\"keccak256\":\"0xa8918e83ad8afd1ce8589d00dce386d2ee6a380f1bdafdd583db6f5b990e24c5\",\"urls\":[\"bzz-raw://cb926895e76ea186de7c790e05578cef920c77f6f9258d41df8a844cec163c37\",\"dweb:/ipfs/QmVomvauEub1TiDCPgBS9CSuAhnafgFVWJCstYyCGH9SQK\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-27\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-26\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMIncentives.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n function mint(address account, uint amount) external;\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni_lp = IERC20(0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd);\n\n uint256 private _totalSupply;\n\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n function mint(address to, uint256 amount) external;\n}\n\ncontract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000;\n\n uint256 public initreward = 15 * 10**5 * 10**18; // 1.5m\n uint256 public starttime = 1597931200 + 24 hours; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkhalve checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n modifier checkhalve() {\n if (block.timestamp >= periodFinish) {\n initreward = initreward.mul(50).div(100);\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 newRewards = initreward.mul(scalingFactor).div(10**18);\n yam.mint(address(this), newRewards);\n\n rewardRate = initreward.div(DURATION);\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(initreward);\n }\n _;\n }\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n require(yam.balanceOf(address(this)) == 0, \"already initialized\");\n yam.mint(address(this), initreward);\n rewardRate = initreward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n\n\n // This function allows governance to take unsupported tokens out of the\n // contract, since this one exists longer than the other pools.\n // This is in an effort to make someone whole, should they seriously\n // mess up. There is no guarantee governance will vote to return these.\n // It also allows for removal of airdropped tokens.\n function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to)\n external\n {\n // only gov\n require(msg.sender == owner(), \"!governance\");\n // cant take staked asset\n require(_token != uni_lp, \"uni_lp\");\n // cant take reward asset\n require(_token != yam, \"yam\");\n\n // transfer to\n _token.safeTransfer(to, amount);\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.271Z", - "devdoc": { - "details": "Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. * This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.", - "methods": { - "constructor": { - "details": "Initializes the contract setting the deployer as the initial owner." - }, - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Rebaser.json b/build/contracts/Rebaser.json deleted file mode 100644 index a05e43f..0000000 --- a/build/contracts/Rebaser.json +++ /dev/null @@ -1,46752 +0,0 @@ -{ - "contractName": "Rebaser", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "yamAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "reserveToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "uniswap_factory", - "type": "address" - }, - { - "internalType": "address", - "name": "reservesContract_", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldDeviationThreshold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newDeviationThreshold", - "type": "uint256" - } - ], - "name": "NewDeviationThreshold", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldSlippageFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newSlippageFactor", - "type": "uint256" - } - ], - "name": "NewMaxSlippageFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldRebaseMintPerc", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newRebaseMintPerc", - "type": "uint256" - } - ], - "name": "NewRebaseMintPercent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldReserveContract", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newReserveContract", - "type": "address" - } - ], - "name": "NewReserveContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "TransactionFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reservesAdded", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsSold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsFromReserves", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsToReserves", - "type": "uint256" - } - ], - "name": "TreasuryIncreased", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "deviationThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "epoch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isToken0", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastRebaseTimestampSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxSlippageFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "minRebaseTimeIntervalSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "priceCumulativeLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseLag", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseMintPerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseWindowLengthSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseWindowOffsetSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebasingActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reservesContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "targetRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "timeOfTWAPInit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "transactions", - "outputs": [ - { - "internalType": "bool", - "name": "enabled", - "type": "bool" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "uniswap_pair", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "maxSlippageFactor_", - "type": "uint256" - } - ], - "name": "setMaxSlippageFactor", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "rebaseMintPerc_", - "type": "uint256" - } - ], - "name": "setRebaseMintPerc", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "reservesContract_", - "type": "address" - } - ], - "name": "setReserveContract", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "init_twap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "activate_rebasing", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "rebase", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "uniswapV2Call", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "deviationThreshold_", - "type": "uint256" - } - ], - "name": "setDeviationThreshold", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "rebaseLag_", - "type": "uint256" - } - ], - "name": "setRebaseLag", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "targetRate_", - "type": "uint256" - } - ], - "name": "setTargetRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "minRebaseTimeIntervalSec_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rebaseWindowOffsetSec_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rebaseWindowLengthSec_", - "type": "uint256" - } - ], - "name": "setRebaseTimingParameters", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "inRebaseWindow", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "addTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "removeTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "enabled", - "type": "bool" - } - ], - "name": "setTransactionEnabled", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yamAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reserveToken_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uniswap_factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reservesContract_\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldDeviationThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDeviationThreshold\",\"type\":\"uint256\"}],\"name\":\"NewDeviationThreshold\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSlippageFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSlippageFactor\",\"type\":\"uint256\"}],\"name\":\"NewMaxSlippageFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldRebaseMintPerc\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRebaseMintPerc\",\"type\":\"uint256\"}],\"name\":\"NewRebaseMintPercent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldReserveContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newReserveContract\",\"type\":\"address\"}],\"name\":\"NewReserveContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"TransactionFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reservesAdded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"yamsSold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"yamsFromReserves\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"yamsToReserves\",\"type\":\"uint256\"}],\"name\":\"TreasuryIncreased\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"activate_rebasing\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"addTransaction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"deviationThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"inRebaseWindow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"init_twap\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isToken0\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastRebaseTimestampSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxSlippageFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minRebaseTimeIntervalSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"priceCumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rebase\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseLag\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseMintPerc\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseWindowLengthSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseWindowOffsetSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebasingActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"removeTransaction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reservesContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deviationThreshold_\",\"type\":\"uint256\"}],\"name\":\"setDeviationThreshold\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSlippageFactor_\",\"type\":\"uint256\"}],\"name\":\"setMaxSlippageFactor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rebaseLag_\",\"type\":\"uint256\"}],\"name\":\"setRebaseLag\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rebaseMintPerc_\",\"type\":\"uint256\"}],\"name\":\"setRebaseMintPerc\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minRebaseTimeIntervalSec_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rebaseWindowOffsetSec_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rebaseWindowLengthSec_\",\"type\":\"uint256\"}],\"name\":\"setRebaseTimingParameters\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"reservesContract_\",\"type\":\"address\"}],\"name\":\"setReserveContract\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetRate_\",\"type\":\"uint256\"}],\"name\":\"setTargetRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setTransactionEnabled\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"targetRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"timeOfTWAPInit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"uniswap_pair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_setPendingGov(address)\":{\"params\":{\"pendingGov_\":\"The address of the rebaser contract to use for authentication.\"}},\"activate_rebasing()\":{\"details\":\"One way function, cannot be undone, callable by anyone\"},\"addTransaction(address,bytes)\":{\"params\":{\"data\":\"Transaction data payload\",\"destination\":\"Address of contract destination\"}},\"inRebaseWindow()\":{\"return\":\"If the latest block timestamp is within the rebase time window it, returns true. Otherwise, returns false.\"},\"rebase()\":{\"details\":\"The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi\"},\"removeTransaction(uint256)\":{\"params\":{\"index\":\"Index of transaction to remove. Transaction ordering may have changed since adding.\"}},\"setDeviationThreshold(uint256)\":{\"params\":{\"deviationThreshold_\":\"The new exchange rate threshold fraction.\"}},\"setRebaseLag(uint256)\":{\"params\":{\"rebaseLag_\":\"The new rebase lag parameter.\"}},\"setRebaseTimingParameters(uint256,uint256,uint256)\":{\"params\":{\"minRebaseTimeIntervalSec_\":\"More than this much time must pass between rebase operations, in seconds.\",\"rebaseWindowLengthSec_\":\"The length of the rebase window in seconds.\",\"rebaseWindowOffsetSec_\":\"The number of seconds from the beginning of the rebase interval, where the rebase window begins.\"}},\"setTargetRate(uint256)\":{\"params\":{\"targetRate_\":\"The new target rate parameter.\"}},\"setTransactionEnabled(uint256,bool)\":{\"params\":{\"enabled\":\"True for enabled, false for disabled.\",\"index\":\"Index of transaction. Transaction ordering may have changed since adding.\"}}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"lets msg.sender accept governance \"},\"_setPendingGov(address)\":{\"notice\":\"sets the pendingGov\"},\"activate_rebasing()\":{\"notice\":\"Activates rebasing\"},\"addTransaction(address,bytes)\":{\"notice\":\"Adds a transaction that gets called for a downstream receiver of rebases\"},\"init_twap()\":{\"notice\":\"Initializes TWAP start point, starts countdown to first rebase \"},\"rebase()\":{\"notice\":\"Initiates a new rebase operation, provided the minimum time period has elapsed.\"},\"setDeviationThreshold(uint256)\":{\"notice\":\"Sets the deviation threshold fraction. If the exchange rate given by the market oracle is within this fractional distance from the targetRate, then no supply modifications are made. DECIMALS fixed point number.\"},\"setMaxSlippageFactor(uint256)\":{\"notice\":\"Updates slippage factor \"},\"setRebaseLag(uint256)\":{\"notice\":\"Sets the rebase lag parameter. It is used to dampen the applied supply adjustment by 1 / rebaseLag If the rebase lag R, equals 1, the smallest value for R, then the full supply correction is applied on each rebase cycle. If it is greater than 1, then a correction of 1/R of is applied on each rebase.\"},\"setRebaseMintPerc(uint256)\":{\"notice\":\"Updates slippage factor \"},\"setRebaseTimingParameters(uint256,uint256,uint256)\":{\"notice\":\"Sets the parameters which control the timing and frequency of rebase operations. a) the minimum time period that must elapse between rebase cycles. b) the rebase window offset parameter. c) the rebase window length parameter.\"},\"setReserveContract(address)\":{\"notice\":\"Updates reserve contract \"},\"setTargetRate(uint256)\":{\"notice\":\"Sets the targetRate parameter.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol\":\"Rebaser\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Address.sol\":{\"keccak256\":\"0xfcf985fe775d3891eb6f1df2b0926b13392f7411550fbddbb2a51e2dfb4c328f\",\"urls\":[\"bzz-raw://557db9c06dce45db040c1a8a87cc2100cbaa86b3fd7cbdf49acf983e110673df\",\"dweb:/ipfs/QmVRxJhBro2YT42FkofepMfseF4rxbDFNXySA2doFSf2Lq\"]},\"/Users/brockelmore/YAM/contracts/lib/Babylonian.sol\":{\"keccak256\":\"0xad37a774ad6a438432acb1a475b71b2991a41ba98f1cd814c6d78f9109370a38\",\"urls\":[\"bzz-raw://0f1fbfda71c124ef0436d4e0fe1d0ee9440e2d169ba5ecb890d3d5089ccdd185\",\"dweb:/ipfs/QmXvHC7AfnhNoXEi2tCDRVgHcWuADfHToyCUYZ2tG5Pgen\"]},\"/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol\":{\"keccak256\":\"0x589aacdc69a24cc0500bc13581b34d4431ee972333fa288a9b42a4d14707e003\",\"urls\":[\"bzz-raw://965edb53f5f0d9e23f7878ae95809239b26604420b0111f7b9cb199d21b84afe\",\"dweb:/ipfs/QmYkGQ6xPsNFfdkJr76vGoCehffXspqKyoGZ5utGJoWNuc\"]},\"/Users/brockelmore/YAM/contracts/lib/IERC20.sol\":{\"keccak256\":\"0xb654abe85060b241b440e22ead01dabb724dda69034d49b483e5e3e55ee64400\",\"urls\":[\"bzz-raw://53f67e469e2c4dfc10411d72f465a3c5b85939f1df4b2b26f12deb729f260b04\",\"dweb:/ipfs/QmSNUGpXPcmWNDczauAmUgZsypdcAB2pZNi3B2RGpYVyp2\"]},\"/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol\":{\"keccak256\":\"0x311645a7312f2ef6eaf48ef2837e7f0cf9310ecb99d6400a1a31021c44e0f027\",\"urls\":[\"bzz-raw://99307e4540dbcf1cbdf07f0e25d063d2cdc97890e92b31b555fef7d114eea4e5\",\"dweb:/ipfs/QmYUoD5sGSUTBZWRbDEBpjfWP1VcGp9m3semMf3oGFQHJt\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol\":{\"keccak256\":\"0x00c7887d6e2af7d5971473efbd93d312374d6e8478a6f435d7ec3b62fe62a523\",\"urls\":[\"bzz-raw://787539dc1ebb71a219dee830f1d71188d0b13c2d5f7e7bfd08a3cafa8ec9333c\",\"dweb:/ipfs/QmfFwH2Wt17vqVaeoCMpdXbRUFa3e2Kbm1i6HTybGFXv8h\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol\":{\"keccak256\":\"0x3627b23a33510ccbdf47a9bc92528a78cd58b4ee7732e9a3f2563990ec652da9\",\"urls\":[\"bzz-raw://4d314b46efcc60cca53b1a9f4379d9aeccb744a9911ae5296c17d9cf284b8524\",\"dweb:/ipfs/QmZnSs4mQQw56DKpmnsPfd6PwgMQQHfT8wbyp6smT4pEL5\"]},\"/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol\":{\"keccak256\":\"0x6fec004cc193b217cf3123433952346721668df7d36a3e2aa97b3167c5887586\",\"urls\":[\"bzz-raw://09edf87e3437cf0e75b229af26bf2850b16defc2d37ab10713670b445ad12141\",\"dweb:/ipfs/QmTPSf78B32EAd8CnvhaisvyPwt8EdtfMFaZnBjJQasE7T\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x1bd8b4cca7e27e739d0e8d0f8b6fa3568db8c496b65e5d324fa0dacdc2384fce\",\"urls\":[\"bzz-raw://45b14e97497ee1d3a0863bfb667fbc683039f4363c6e8295b9971fbbcacd8ca5\",\"dweb:/ipfs/QmQccvMGmZrtkk4s2VH2ZWBLKR54eH9Q6Z7DEEw1iVpwYG\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x89371a921d6f19be9f74ea6a6b7f21f7255577ec606b5c98b806b50d5a46791f\",\"urls\":[\"bzz-raw://cf00aa028948b0b1745ff4b874fa686b4f3cf0a2a88ee6ef7dc271d74d4f8c5b\",\"dweb:/ipfs/QmSM13qFuv6KCzveJonR4vwQLvMSXSZyRsPJFRphTTn8mA\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620044093803806200440983398101604081905262000034916200026c565b61a8c0600755618ca0600955601080546001600160a01b0319166001600160a01b0383161790556000806200006a86866200015d565b91509150856001600160a01b0316826001600160a01b031614156200009c576014805460ff19166001179055620000a7565b6014805460ff191690555b620000bd8483836001600160e01b03620001f816565b601180546001600160a01b03199081166001600160a01b039384161790915560108054821695831695909517909455600f80548516968216969096179095555050600e8054821694909316939093179091555066c02cea37e26800601355670de0b6b3a7640000600455600a600381905567016345785d8a000060055566b1a2bc2ec50000600655610384905560018054339216919091179055620004ec565b600080826001600160a01b0316846001600160a01b031614156200019e5760405162461bcd60e51b8152600401620001959062000470565b60405180910390fd5b826001600160a01b0316846001600160a01b031610620001c0578284620001c3565b83835b90925090506001600160a01b038216620001f15760405162461bcd60e51b8152600401620001959062000482565b9250929050565b60008383836040516020016200021092919062000400565b60405160208183030381529060405280519060200120604051602001620002399291906200042a565b60408051601f198184030181529190528051602090910120949350505050565b80516200026681620004d2565b92915050565b600080600080608085870312156200028357600080fd5b600062000291878762000259565b9450506020620002a48782880162000259565b9350506040620002b78782880162000259565b9250506060620002ca8782880162000259565b91505092959194509250565b620002eb620002e582620004a2565b620004be565b82525050565b620002eb6200030082620004af565b620004af565b60006200031560258362000494565b7f556e697377617056324c6962726172793a204944454e544943414c5f41444452815264455353455360d81b602082015260400192915050565b60006200035e6020836200049d565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f815260200192915050565b6000620003996001836200049d565b7fff00000000000000000000000000000000000000000000000000000000000000815260010192915050565b6000620003d4601e8362000494565b7f556e697377617056324c6962726172793a205a45524f5f414444524553530000815260200192915050565b60006200040e8285620002d6565b601482019150620004208284620002d6565b5060140192915050565b600062000437826200038a565b9150620004458285620002d6565b601482019150620004578284620002f1565b60208201915062000468826200034f565b949350505050565b60208082528101620002668162000306565b602080825281016200026681620003c5565b90815260200190565b919050565b60006200026682620004b2565b90565b6001600160a01b031690565b600062000266826000620002668260601b90565b620004dd81620004a2565b8114620004e957600080fd5b50565b613f0d80620004fc6000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c806363f6d4c81161017b578063b60e1e3e116100d8578063cf1b927e1161008c578063d94ad83711610071578063d94ad837146104a2578063dcf93f32146104aa578063f4325d67146104b2576102ad565b8063cf1b927e14610492578063d72cdafc1461049a576102ad565b8063cc8fd393116100bd578063cc8fd3931461046f578063cd87782614610477578063cdabdaac1461047f576102ad565b8063b60e1e3e14610454578063c4c6eaad14610467576102ad565b806373f03dff1161012f5780639466120f116101145780639466120f146104225780639ace38c21461042a578063af14052c1461044c576102ad565b806373f03dff14610407578063900cf0cf1461041a576102ad565b80636bf9ace7116101605780636bf9ace7146103d95780636e9dde99146103ec5780637052b902146103ff576102ad565b806363f6d4c8146103c95780636406ca5f146103d1576102ad565b80632f43c1bc116102295780634dc95de1116101dd578063527a52c8116101c2578063527a52c81461039b57806353a15edc146103ae57806357466c8b146103c1576102ad565b80634dc95de11461038b5780634e66f8ae14610393576102ad565b80633a93069b1161020e5780633a93069b1461036857806346c3bd1f146103705780634bda2e2014610383576102ad565b80632f43c1bc146103585780633a68eaf614610360576102ad565b806312d43a51116102805780631cab801c116102655780631cab801c1461033557806320ce83891461033d5780632524081014610350576102ad565b806312d43a511461030d57806316250fd414610322576102ad565b806302101899146102b257806310d1e85c146102d0578063111d0498146102e5578063126e19be146102fa575b600080fd5b6102ba6104ba565b6040516102c79190613ca3565b60405180910390f35b6102e36102de36600461324d565b6104c0565b005b6102ed610924565b6040516102c79190613adc565b6102e36103083660046131f7565b61098a565b610315610acc565b6040516102c79190613a70565b6102e36103303660046133c5565b610ae8565b6102ba610b33565b6102e361034b36600461334f565b610b39565b610315610b6f565b6102ba610b8b565b610315610b91565b6102ba610bad565b6102e361037e36600461334f565b610bb3565b6102e3610d94565b6102ed610e77565b6102e3610e80565b6102e36103a93660046131d9565b611003565b6102e36103bc36600461334f565b6110ab565b6102e3611118565b6102ba61121a565b6102ba611220565b6102e36103e736600461334f565b611226565b6102e36103fa36600461338b565b611283565b6102ba611331565b6102e36104153660046131d9565b611337565b6102ba6113d3565b6102ba6113d9565b61043d61043836600461334f565b6113df565b6040516102c793929190613aea565b6102e36114cf565b6102e361046236600461334f565b611a62565b610315611abf565b6102ba611adb565b6102ba611ae1565b6102e361048d36600461334f565b611ae7565b6102ba611b1d565b610315611b23565b6102ba611b3f565b6102ed611b45565b610315611b4e565b60075481565b60115473ffffffffffffffffffffffffffffffffffffffff16331461051a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c25565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84163014610569576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c85565b610571612e95565b8180602001905161058591908101906132e4565b600e54602082015191925073ffffffffffffffffffffffffffffffffffffffff1690156106fc5760105460115460208401516040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616946323b872dd9461060f9491831693921691600401613a99565b602060405180830381600087803b15801561062957600080fd5b505af115801561063d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061066191908101906132c6565b50601154602083015183516040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116946340c10f19946106c5949290911692910390600401613ac1565b600060405180830381600087803b1580156106df57600080fd5b505af11580156106f3573d6000803e3d6000fd5b5050505061078a565b60115482516040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f1993610757939290911691600401613ac1565b600060405180830381600087803b15801561077157600080fd5b505af1158015610785573d6000803e3d6000fd5b505050505b6040820151156108255760105460408381015190517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f19936107f2939290911691600401613ac1565b600060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505050505b60145460ff16156108a857600f5460105461085a9173ffffffffffffffffffffffffffffffffffffffff908116911686611b6a565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd8478391438723508483600001518460200151856040015160405161089b9493929190613d22565b60405180910390a161091c565b600f546010546108d29173ffffffffffffffffffffffffffffffffffffffff908116911687611b6a565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350858360000151846020015185604001516040516109139493929190613d22565b60405180910390a15b505050505050565b600c5460009060ff1661093957506000610987565b60095460075461095090429063ffffffff611c2c16565b101580156109845750600a5460095461096e9163ffffffff611c7716565b60075461098290429063ffffffff611c2c16565b105b90505b90565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109ae57600080fd5b600060405180606001604052806001151581526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505083546001818101808755958352602092839020855160029093020180548487015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9415157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179390931692909217825560408501518051929450610ac39391850192910190612eb6565b50505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b0c57600080fd5b60008311610b1957600080fd5b828210610b2557600080fd5b600792909255600955600a55565b60055481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b5d57600080fd5b60008111610b6a57600080fd5b600355565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60125481565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610bd757600080fd5b6000548110610c12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c55565b6000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01811015610d5f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610c6e57fe5b906000526020600020906002020160008281548110610c8957fe5b600091825260209091208254600292830290910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921615159190911780825583547fffffffffffffffffffffff0000000000000000000000000000000000000000ff9091166101009182900473ffffffffffffffffffffffffffffffffffffffff168202178255600180850180549394610d5b948387019492938116159092027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190911604612f34565b5050505b6000805490610d90907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301612fa9565b5050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610de5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bf5565b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff83811691909117958690559116909155604051918116927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d552392610e6c9285921690613a7e565b60405180910390a150565b600c5460ff1681565b6000600d5411610ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613b75565b61a8c0600d5401421015610efc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bb5565b601154604080517f5909c0d5000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff1691635909c0d5916004808301926020929190829003018186803b158015610f6757600080fd5b505afa158015610f7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f9f919081019061336d565b11610fd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bd5565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461102757600080fd5b6010805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907fce840d2205f08f33375689943da5da9fdfde146fcbb5553b17910a60c8284a209061109f9083908590613a7e565b60405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146110cf57600080fd5b6000600654116110de57600080fd5b60068054908290556040517f2a5cda4d16fba415b52d90b59ee30d4cb16494da9fd1ee51c4d5bac4a1f75bbe9061109f9083908590613cec565b600d5415611152576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c45565b60115460145460009182916111809173ffffffffffffffffffffffffffffffffffffffff169060ff16611cb6565b9150915060008163ffffffff16116111c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613ba5565b601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff93909316928302179055601291909155600d55565b60035481565b61a8c081565b60015473ffffffffffffffffffffffffffffffffffffffff16331461124a57600080fd5b600581905560405181907f59b3ffce759ec92c629beee27554d8fbc2ca1a05020fa0cf500c890c172094be9061109f9083908190613cec565b60015473ffffffffffffffffffffffffffffffffffffffff1633146112a757600080fd5b60005482106112e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613b95565b80600083815481106112f057fe5b6000918252602090912060029091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555050565b60095481565b60015473ffffffffffffffffffffffffffffffffffffffff16331461135b57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e9061109f9083908590613a7e565b600b5481565b600a5481565b600081815481106113ec57fe5b6000918252602091829020600291820201805460018083018054604080516101009483161585027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921696909604601f810188900488028201880190965285815260ff841697509190920473ffffffffffffffffffffffffffffffffffffffff1694929390928301828280156114c55780601f1061149a576101008083540402835291602001916114c5565b820191906000526020600020905b8154815290600101906020018083116114a857829003601f168201915b5050505050905083565b6114d7610924565b6114e057600080fd5b426114f8600754600854611c7790919063ffffffff16565b1061150257600080fd5b61153960095461152d61152060075442611c2c90919063ffffffff16565b429063ffffffff611efd16565b9063ffffffff611c7716565b600855600b5461155090600163ffffffff611c7716565b600b55600061155d611f3f565b905060008061156b83612050565b6003549193509150829061158690829063ffffffff6120df16565b600e5490915073ffffffffffffffffffffffffffffffffffffffff168280156116aa57508073ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b1580156115f057600080fd5b505afa158015611604573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611628919081019061336d565b828273ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b15801561166f57600080fd5b505afa158015611683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116a7919081019061336d565b01105b156117af578073ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b1580156116f557600080fd5b505afa158015611709573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061172d919081019061336d565b8173ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561177357600080fd5b505afa158015611787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117ab919081019061336d565b0391505b60008173ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117f757600080fd5b505afa15801561180b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061182f919081019061336d565b90506000841561189c576000611868670de0b6b3a764000061185c6005548861212190919063ffffffff16565b9063ffffffff6120df16565b905061187a858263ffffffff611efd16565b9450611898670de0b6b3a764000061185c858463ffffffff61212116565b9150505b600b546040517f7af548c100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff861691637af548c1916118f69189908b90600401613cfa565b602060405180830381600087803b15801561191057600080fd5b505af1158015611924573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611948919081019061336d565b90508373ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561199057600080fd5b505afa1580156119a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119c8919081019061336d565b8473ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b158015611a0e57600080fd5b505afa158015611a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611a46919081019061336d565b1115611a4e57fe5b611a588288612175565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611a8657600080fd5b601381905560405181907fe21b25c4eda0340cd924f3247795d0acde6c304b68ae77657bb2d4e840198bf89061109f9083908190613cec565b60115473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b600d5481565b60015473ffffffffffffffffffffffffffffffffffffffff163314611b0b57600080fd5b60008111611b1857600080fd5b600455565b60135481565b600e5473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60145460ff1681565b600f5473ffffffffffffffffffffffffffffffffffffffff1681565b604051611c279084907fa9059cbb0000000000000000000000000000000000000000000000000000000090611ba59086908690602401613ac1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612333565b505050565b6000611c6e83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506123e9565b90505b92915050565b600082820183811015611c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613b85565b600080611cc1612439565b905060008060008673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611d0e57600080fd5b505afa158015611d22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d469190810190613302565b9250925092508515611e25578673ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9857600080fd5b505afa158015611dac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dd0919081019061336d565b94508363ffffffff168163ffffffff1614611e205780840363ffffffff8116611df98486612443565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b611ef3565b8673ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6b57600080fd5b505afa158015611e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ea3919081019061336d565b94508363ffffffff168163ffffffff1614611ef35780840363ffffffff8116611ecc8486612443565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509250929050565b6000611c6e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612506565b60115460145460009182918291611f719173ffffffffffffffffffffffffffffffffffffffff9091169060ff16611cb6565b601154919350915074010000000000000000000000000000000000000000900463ffffffff168103611fa1612fd5565b60405180602001604052808363ffffffff16601254870381611fbf57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690526012859055601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff87160217905590506120378161254c565b6dffffffffffffffffffffffffffff1694505050505090565b60008061205c83612563565b1561206c575060009050806120da565b6004548311156120b0576004546120a59061185c670de0b6b3a7640000612099878463ffffffff611efd16565b9063ffffffff61212116565b6001915091506120da565b6004546120d39061185c670de0b6b3a7640000612099838863ffffffff611efd16565b6000915091505b915091565b6000611c6e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506125df565b60008261213057506000611c71565b8282028284828161213d57fe5b0414611c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613be5565b8115612185576121858282612630565b60005b600054811015611c275760008082815481106121a057fe5b60009182526020909120600290910201805490915060ff161561232a5780546001808301805460408051602060026101009685161587027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815260009561229395900473ffffffffffffffffffffffffffffffffffffffff169390929091908301828280156122895780601f1061225e57610100808354040283529160200191612289565b820191906000526020600020905b81548152906001019060200180831161226c57829003601f168201915b5050505050612bd9565b90508061232857815460405161010090910473ffffffffffffffffffffffffffffffffffffffff16907f8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c263906122ee9086906001870190613cb1565b60405180910390a26040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c65565b505b50600101612188565b6060612395826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612bfc9092919063ffffffff16565b805190915015611c2757808060200190516123b391908101906132c6565b611c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c15565b60008183612424576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b5082848161242e57fe5b0690505b9392505050565b63ffffffff421690565b61244b612fd5565b6000826dffffffffffffffffffffffffffff1611612495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c75565b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b16816124dc57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b60008184841115612544576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b505050900390565b5160701c6dffffffffffffffffffffffffffff1690565b600080612589670de0b6b3a764000061185c60065460045461212190919063ffffffff16565b905060045483101580156125b05750806125ae60045485611efd90919063ffffffff16565b105b80612432575060045483108015612432575060045481906125d7908563ffffffff611efd16565b109392505050565b6000818361261a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b50600083858161262657fe5b0495945050505050565b601154604080517ffff6cae9000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921691829163fff6cae991600480830192600092919082900301818387803b15801561269d57600080fd5b505af11580156126b1573d6000803e3d6000fd5b505050506000600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000808373ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561272557600080fd5b505afa158015612739573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061275d9190810190613302565b506010546040517f70a082310000000000000000000000000000000000000000000000000000000081526dffffffffffffffffffffffffffff938416955091909216925060009173ffffffffffffffffffffffffffffffffffffffff808716926370a08231926127d1921690600401613a70565b60206040518083038186803b1580156127e957600080fd5b505afa1580156127fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612821919081019061336d565b90506000612830848489612c13565b905061283a612e95565b50604080516060810182528281526020810184905260009181019190915260145460ff1615612a375782890182111561292657600061287c848b018787612cb0565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f91600091859130916128c091899101613c95565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016128ee9493929190613b20565b600060405180830381600087803b15801561290857600080fd5b505af115801561291c573d6000803e3d6000fd5b5050505050612a32565b8282111561297c57600061293b838787612cb0565b90508383038a038260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008330866040516020016128c09190613c95565b6000612989838787612cb0565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008330866040516020016129d09190613c95565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016129fe9493929190613b20565b600060405180830381600087803b158015612a1857600080fd5b505af1158015612a2c573d6000803e3d6000fd5b50505050505b612bce565b828901821115612ac2576000612a50848b018688612cb0565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f9184916000913091612a9491899101613c95565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016129fe9493929190613cd1565b82821115612b18576000612ad7838688612cb0565b90508383038a038260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612a949190613c95565b6000612b25838688612cb0565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612b6c9190613c95565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612b9a9493929190613cd1565b600060405180830381600087803b158015612bb457600080fd5b505af1158015612bc8573d6000803e3d6000fd5b50505050505b505050505050505050565b6000806040516020840160008286518360008a6187965a03f19695505050505050565b6060612c0b8484600085612d8a565b949350505050565b60145460009060ff1615612c6c57601354821115612c5357612c4c670de0b6b3a764000061185c6013548761212190919063ffffffff16565b9050612432565b612c4c670de0b6b3a764000061185c8660038604612121565b601354821115612c9757612c4c670de0b6b3a764000061185c6013548661212190919063ffffffff16565b612c4c670de0b6b3a764000061185c8560038604612121565b6000808411612ceb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c35565b600083118015612cfb5750600082115b612d31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bc5565b6000612d45856103e563ffffffff61212116565b90506000612d59828563ffffffff61212116565b90506000612d738361152d886103e863ffffffff61212116565b9050808281612d7e57fe5b04979650505050505050565b6060612d9585612e8f565b612dcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c05565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612df59190613a64565b60006040518083038185875af1925050503d8060008114612e32576040519150601f19603f3d011682016040523d82523d6000602084013e612e37565b606091505b50915091508115612e4b579150612c0b9050565b805115612e5b5780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b3b151590565b60405180606001604052806000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612ef757805160ff1916838001178555612f24565b82800160010185558215612f24579182015b82811115612f24578251825591602001919060010190612f09565b50612f30929150612fe7565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f6d5780548555612f24565b82800160010185558215612f2457600052602060002091601f016020900482015b82811115612f24578254825591600101919060010190612f8e565b815481835581811115611c2757600202816002028360005260206000209182019101611c279190613001565b60408051602081019091526000815290565b61098791905b80821115612f305760008155600101612fed565b61098791905b80821115612f305780547fffffffffffffffffffffff0000000000000000000000000000000000000000001681556000613044600183018261304d565b50600201613007565b50805460018160011615610100020316600290046000825580601f106130735750613091565b601f0160209004906000526020600020908101906130919190612fe7565b50565b8035611c7181613e92565b8035611c7181613ea6565b8051611c7181613ea6565b60008083601f8401126130c757600080fd5b50813567ffffffffffffffff8111156130df57600080fd5b6020830191508360018202830111156130f757600080fd5b9250929050565b600082601f83011261310f57600080fd5b813561312261311d82613d7e565b613d57565b9150808252602083016020830185838301111561313e57600080fd5b613149838284613e32565b50505092915050565b60006060828403121561316457600080fd5b61316e6060613d57565b9050600061317c84846131c3565b825250602061318d848483016131c3565b60208301525060406131a1848285016131c3565b60408301525092915050565b8051611c7181613eaf565b8035611c7181613eb8565b8051611c7181613eb8565b8051611c7181613ec1565b6000602082840312156131eb57600080fd5b6000612c0b8484613094565b60008060006040848603121561320c57600080fd5b60006132188686613094565b935050602084013567ffffffffffffffff81111561323557600080fd5b613241868287016130b5565b92509250509250925092565b6000806000806080858703121561326357600080fd5b600061326f8787613094565b9450506020613280878288016131b8565b9350506040613291878288016131b8565b925050606085013567ffffffffffffffff8111156132ae57600080fd5b6132ba878288016130fe565b91505092959194509250565b6000602082840312156132d857600080fd5b6000612c0b84846130aa565b6000606082840312156132f657600080fd5b6000612c0b8484613152565b60008060006060848603121561331757600080fd5b600061332386866131ad565b9350506020613334868287016131ad565b9250506040613345868287016131ce565b9150509250925092565b60006020828403121561336157600080fd5b6000612c0b84846131b8565b60006020828403121561337f57600080fd5b6000612c0b84846131c3565b6000806040838503121561339e57600080fd5b60006133aa85856131b8565b92505060206133bb8582860161309f565b9150509250929050565b6000806000606084860312156133da57600080fd5b60006133e686866131b8565b93505060206133f7868287016131b8565b9250506040613345868287016131b8565b61341181613de2565b82525050565b61341181613ded565b600061342b82613dd0565b6134358185613dd4565b9350613445818560208601613e3e565b61344e81613e6a565b9093019392505050565b600061346382613dd0565b61346d8185613ddd565b935061347d818560208601613e3e565b9290920192915050565b6000815460018116600081146134a457600181146134e857613527565b607f60028304166134b58187613dd4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168152955050602085019250613527565b600282046134f68187613dd4565b955061350185613dc4565b60005b8281101561352057815488820152600190910190602001613504565b8701945050505b505092915050565b61341181613e27565b6000613545602783613dd4565b7f74776170207761736e7420696e74697469617465642c2063616c6c20696e697481527f5f74776170282900000000000000000000000000000000000000000000000000602082015260400192915050565b60006135a4601b83613dd4565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006135dd602883613dd4565b7f696e646578206d75737420626520696e2072616e6765206f662073746f72656481527f207478206c697374000000000000000000000000000000000000000000000000602082015260400192915050565b600061363c600983613dd4565b7f6e6f207472616465730000000000000000000000000000000000000000000000815260200192915050565b6000613675600a83613dd4565b7f21656e645f64656c617900000000000000000000000000000000000000000000815260200192915050565b60006136ae602883613dd4565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4c81527f4951554944495459000000000000000000000000000000000000000000000000602082015260400192915050565b600061370d600783613dd4565b7f216c697175696400000000000000000000000000000000000000000000000000815260200192915050565b6000613746602183613dd4565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f81527f7700000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b60006137a5600883613dd4565b7f2170656e64696e67000000000000000000000000000000000000000000000000815260200192915050565b60006137de601d83613dd4565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815260200192915050565b6000613817602a83613dd4565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e81527f6f74207375636365656400000000000000000000000000000000000000000000602082015260400192915050565b6000613876600e83613dd4565b7f626164206d73672e73656e646572000000000000000000000000000000000000815260200192915050565b60006138af602b83613dd4565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4981527f4e5055545f414d4f554e54000000000000000000000000000000000000000000602082015260400192915050565b600061390e601183613dd4565b7f616c726561647920616374697661746564000000000000000000000000000000815260200192915050565b6000613947601383613dd4565b7f696e646578206f7574206f6620626f756e647300000000000000000000000000815260200192915050565b6000613980601283613dd4565b7f5472616e73616374696f6e204661696c65640000000000000000000000000000815260200192915050565b60006139b9601783613dd4565b7f4669786564506f696e743a204449565f42595f5a45524f000000000000000000815260200192915050565b60006139f2600a83613dd4565b7f626164206f726967696e00000000000000000000000000000000000000000000815260200192915050565b80516060830190613a2f8482613a5b565b506020820151613a426020850182613a5b565b506040820151613a556040850182613a5b565b50505050565b61341181610987565b60006124328284613458565b60208101611c718284613408565b60408101613a8c8285613408565b6124326020830184613408565b60608101613aa78286613408565b613ab46020830185613408565b612c0b6040830184613a5b565b60408101613acf8285613408565b6124326020830184613a5b565b60208101611c718284613417565b60608101613af88286613417565b613b056020830185613408565b8181036040830152613b178184613420565b95945050505050565b60808101613b2e828761352f565b613b3b6020830186613a5b565b613b486040830185613408565b8181036060830152613b5a8184613420565b9695505050505050565b60208082528101611c6e8184613420565b60208082528101611c7181613538565b60208082528101611c7181613597565b60208082528101611c71816135d0565b60208082528101611c718161362f565b60208082528101611c7181613668565b60208082528101611c71816136a1565b60208082528101611c7181613700565b60208082528101611c7181613739565b60208082528101611c7181613798565b60208082528101611c71816137d1565b60208082528101611c718161380a565b60208082528101611c7181613869565b60208082528101611c71816138a2565b60208082528101611c7181613901565b60208082528101611c718161393a565b60208082528101611c7181613973565b60208082528101611c71816139ac565b60208082528101611c71816139e5565b60608101611c718284613a1e565b60208101611c718284613a5b565b60408101613cbf8285613a5b565b8181036020830152612c0b8184613487565b60808101613cdf8287613a5b565b613b3b602083018661352f565b60408101613acf8285613a5b565b60608101613d088286613a5b565b613d156020830185613a5b565b612c0b6040830184613417565b60808101613d308287613a5b565b613d3d6020830186613a5b565b613d4a6040830185613a5b565b613b176060830184613a5b565b60405181810167ffffffffffffffff81118282101715613d7657600080fd5b604052919050565b600067ffffffffffffffff821115613d9557600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60009081526020902090565b5190565b90815260200190565b919050565b6000611c7182613e05565b151590565b6dffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b63ffffffff1690565b6000611c7182610987565b82818337506000910152565b60005b83811015613e59578181015183820152602001613e41565b83811115613a555750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b613e9b81613de2565b811461309157600080fd5b613e9b81613ded565b613e9b81613df2565b613e9b81610987565b613e9b81613e1e56fea365627a7a7231582016e0874b3ff2c2b697bbce5e679147b4726cf3edbdf53f851f6cecf4e3ca95876c6578706572696d656e74616cf564736f6c63430005110040", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c806363f6d4c81161017b578063b60e1e3e116100d8578063cf1b927e1161008c578063d94ad83711610071578063d94ad837146104a2578063dcf93f32146104aa578063f4325d67146104b2576102ad565b8063cf1b927e14610492578063d72cdafc1461049a576102ad565b8063cc8fd393116100bd578063cc8fd3931461046f578063cd87782614610477578063cdabdaac1461047f576102ad565b8063b60e1e3e14610454578063c4c6eaad14610467576102ad565b806373f03dff1161012f5780639466120f116101145780639466120f146104225780639ace38c21461042a578063af14052c1461044c576102ad565b806373f03dff14610407578063900cf0cf1461041a576102ad565b80636bf9ace7116101605780636bf9ace7146103d95780636e9dde99146103ec5780637052b902146103ff576102ad565b806363f6d4c8146103c95780636406ca5f146103d1576102ad565b80632f43c1bc116102295780634dc95de1116101dd578063527a52c8116101c2578063527a52c81461039b57806353a15edc146103ae57806357466c8b146103c1576102ad565b80634dc95de11461038b5780634e66f8ae14610393576102ad565b80633a93069b1161020e5780633a93069b1461036857806346c3bd1f146103705780634bda2e2014610383576102ad565b80632f43c1bc146103585780633a68eaf614610360576102ad565b806312d43a51116102805780631cab801c116102655780631cab801c1461033557806320ce83891461033d5780632524081014610350576102ad565b806312d43a511461030d57806316250fd414610322576102ad565b806302101899146102b257806310d1e85c146102d0578063111d0498146102e5578063126e19be146102fa575b600080fd5b6102ba6104ba565b6040516102c79190613ca3565b60405180910390f35b6102e36102de36600461324d565b6104c0565b005b6102ed610924565b6040516102c79190613adc565b6102e36103083660046131f7565b61098a565b610315610acc565b6040516102c79190613a70565b6102e36103303660046133c5565b610ae8565b6102ba610b33565b6102e361034b36600461334f565b610b39565b610315610b6f565b6102ba610b8b565b610315610b91565b6102ba610bad565b6102e361037e36600461334f565b610bb3565b6102e3610d94565b6102ed610e77565b6102e3610e80565b6102e36103a93660046131d9565b611003565b6102e36103bc36600461334f565b6110ab565b6102e3611118565b6102ba61121a565b6102ba611220565b6102e36103e736600461334f565b611226565b6102e36103fa36600461338b565b611283565b6102ba611331565b6102e36104153660046131d9565b611337565b6102ba6113d3565b6102ba6113d9565b61043d61043836600461334f565b6113df565b6040516102c793929190613aea565b6102e36114cf565b6102e361046236600461334f565b611a62565b610315611abf565b6102ba611adb565b6102ba611ae1565b6102e361048d36600461334f565b611ae7565b6102ba611b1d565b610315611b23565b6102ba611b3f565b6102ed611b45565b610315611b4e565b60075481565b60115473ffffffffffffffffffffffffffffffffffffffff16331461051a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c25565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84163014610569576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c85565b610571612e95565b8180602001905161058591908101906132e4565b600e54602082015191925073ffffffffffffffffffffffffffffffffffffffff1690156106fc5760105460115460208401516040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616946323b872dd9461060f9491831693921691600401613a99565b602060405180830381600087803b15801561062957600080fd5b505af115801561063d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061066191908101906132c6565b50601154602083015183516040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116946340c10f19946106c5949290911692910390600401613ac1565b600060405180830381600087803b1580156106df57600080fd5b505af11580156106f3573d6000803e3d6000fd5b5050505061078a565b60115482516040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f1993610757939290911691600401613ac1565b600060405180830381600087803b15801561077157600080fd5b505af1158015610785573d6000803e3d6000fd5b505050505b6040820151156108255760105460408381015190517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f19936107f2939290911691600401613ac1565b600060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505050505b60145460ff16156108a857600f5460105461085a9173ffffffffffffffffffffffffffffffffffffffff908116911686611b6a565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd8478391438723508483600001518460200151856040015160405161089b9493929190613d22565b60405180910390a161091c565b600f546010546108d29173ffffffffffffffffffffffffffffffffffffffff908116911687611b6a565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350858360000151846020015185604001516040516109139493929190613d22565b60405180910390a15b505050505050565b600c5460009060ff1661093957506000610987565b60095460075461095090429063ffffffff611c2c16565b101580156109845750600a5460095461096e9163ffffffff611c7716565b60075461098290429063ffffffff611c2c16565b105b90505b90565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109ae57600080fd5b600060405180606001604052806001151581526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505083546001818101808755958352602092839020855160029093020180548487015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9415157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179390931692909217825560408501518051929450610ac39391850192910190612eb6565b50505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b0c57600080fd5b60008311610b1957600080fd5b828210610b2557600080fd5b600792909255600955600a55565b60055481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b5d57600080fd5b60008111610b6a57600080fd5b600355565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60125481565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610bd757600080fd5b6000548110610c12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c55565b6000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01811015610d5f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610c6e57fe5b906000526020600020906002020160008281548110610c8957fe5b600091825260209091208254600292830290910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921615159190911780825583547fffffffffffffffffffffff0000000000000000000000000000000000000000ff9091166101009182900473ffffffffffffffffffffffffffffffffffffffff168202178255600180850180549394610d5b948387019492938116159092027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190911604612f34565b5050505b6000805490610d90907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301612fa9565b5050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610de5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bf5565b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff83811691909117958690559116909155604051918116927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d552392610e6c9285921690613a7e565b60405180910390a150565b600c5460ff1681565b6000600d5411610ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613b75565b61a8c0600d5401421015610efc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bb5565b601154604080517f5909c0d5000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff1691635909c0d5916004808301926020929190829003018186803b158015610f6757600080fd5b505afa158015610f7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f9f919081019061336d565b11610fd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bd5565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60015473ffffffffffffffffffffffffffffffffffffffff16331461102757600080fd5b6010805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907fce840d2205f08f33375689943da5da9fdfde146fcbb5553b17910a60c8284a209061109f9083908590613a7e565b60405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146110cf57600080fd5b6000600654116110de57600080fd5b60068054908290556040517f2a5cda4d16fba415b52d90b59ee30d4cb16494da9fd1ee51c4d5bac4a1f75bbe9061109f9083908590613cec565b600d5415611152576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c45565b60115460145460009182916111809173ffffffffffffffffffffffffffffffffffffffff169060ff16611cb6565b9150915060008163ffffffff16116111c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613ba5565b601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff93909316928302179055601291909155600d55565b60035481565b61a8c081565b60015473ffffffffffffffffffffffffffffffffffffffff16331461124a57600080fd5b600581905560405181907f59b3ffce759ec92c629beee27554d8fbc2ca1a05020fa0cf500c890c172094be9061109f9083908190613cec565b60015473ffffffffffffffffffffffffffffffffffffffff1633146112a757600080fd5b60005482106112e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613b95565b80600083815481106112f057fe5b6000918252602090912060029091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555050565b60095481565b60015473ffffffffffffffffffffffffffffffffffffffff16331461135b57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e9061109f9083908590613a7e565b600b5481565b600a5481565b600081815481106113ec57fe5b6000918252602091829020600291820201805460018083018054604080516101009483161585027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921696909604601f810188900488028201880190965285815260ff841697509190920473ffffffffffffffffffffffffffffffffffffffff1694929390928301828280156114c55780601f1061149a576101008083540402835291602001916114c5565b820191906000526020600020905b8154815290600101906020018083116114a857829003601f168201915b5050505050905083565b6114d7610924565b6114e057600080fd5b426114f8600754600854611c7790919063ffffffff16565b1061150257600080fd5b61153960095461152d61152060075442611c2c90919063ffffffff16565b429063ffffffff611efd16565b9063ffffffff611c7716565b600855600b5461155090600163ffffffff611c7716565b600b55600061155d611f3f565b905060008061156b83612050565b6003549193509150829061158690829063ffffffff6120df16565b600e5490915073ffffffffffffffffffffffffffffffffffffffff168280156116aa57508073ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b1580156115f057600080fd5b505afa158015611604573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611628919081019061336d565b828273ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b15801561166f57600080fd5b505afa158015611683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116a7919081019061336d565b01105b156117af578073ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b1580156116f557600080fd5b505afa158015611709573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061172d919081019061336d565b8173ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561177357600080fd5b505afa158015611787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117ab919081019061336d565b0391505b60008173ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117f757600080fd5b505afa15801561180b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061182f919081019061336d565b90506000841561189c576000611868670de0b6b3a764000061185c6005548861212190919063ffffffff16565b9063ffffffff6120df16565b905061187a858263ffffffff611efd16565b9450611898670de0b6b3a764000061185c858463ffffffff61212116565b9150505b600b546040517f7af548c100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff861691637af548c1916118f69189908b90600401613cfa565b602060405180830381600087803b15801561191057600080fd5b505af1158015611924573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611948919081019061336d565b90508373ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561199057600080fd5b505afa1580156119a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119c8919081019061336d565b8473ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b158015611a0e57600080fd5b505afa158015611a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611a46919081019061336d565b1115611a4e57fe5b611a588288612175565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611a8657600080fd5b601381905560405181907fe21b25c4eda0340cd924f3247795d0acde6c304b68ae77657bb2d4e840198bf89061109f9083908190613cec565b60115473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b600d5481565b60015473ffffffffffffffffffffffffffffffffffffffff163314611b0b57600080fd5b60008111611b1857600080fd5b600455565b60135481565b600e5473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60145460ff1681565b600f5473ffffffffffffffffffffffffffffffffffffffff1681565b604051611c279084907fa9059cbb0000000000000000000000000000000000000000000000000000000090611ba59086908690602401613ac1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612333565b505050565b6000611c6e83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506123e9565b90505b92915050565b600082820183811015611c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613b85565b600080611cc1612439565b905060008060008673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611d0e57600080fd5b505afa158015611d22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d469190810190613302565b9250925092508515611e25578673ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9857600080fd5b505afa158015611dac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dd0919081019061336d565b94508363ffffffff168163ffffffff1614611e205780840363ffffffff8116611df98486612443565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b611ef3565b8673ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6b57600080fd5b505afa158015611e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ea3919081019061336d565b94508363ffffffff168163ffffffff1614611ef35780840363ffffffff8116611ecc8486612443565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509250929050565b6000611c6e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612506565b60115460145460009182918291611f719173ffffffffffffffffffffffffffffffffffffffff9091169060ff16611cb6565b601154919350915074010000000000000000000000000000000000000000900463ffffffff168103611fa1612fd5565b60405180602001604052808363ffffffff16601254870381611fbf57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690526012859055601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff87160217905590506120378161254c565b6dffffffffffffffffffffffffffff1694505050505090565b60008061205c83612563565b1561206c575060009050806120da565b6004548311156120b0576004546120a59061185c670de0b6b3a7640000612099878463ffffffff611efd16565b9063ffffffff61212116565b6001915091506120da565b6004546120d39061185c670de0b6b3a7640000612099838863ffffffff611efd16565b6000915091505b915091565b6000611c6e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506125df565b60008261213057506000611c71565b8282028284828161213d57fe5b0414611c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613be5565b8115612185576121858282612630565b60005b600054811015611c275760008082815481106121a057fe5b60009182526020909120600290910201805490915060ff161561232a5780546001808301805460408051602060026101009685161587027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815260009561229395900473ffffffffffffffffffffffffffffffffffffffff169390929091908301828280156122895780601f1061225e57610100808354040283529160200191612289565b820191906000526020600020905b81548152906001019060200180831161226c57829003601f168201915b5050505050612bd9565b90508061232857815460405161010090910473ffffffffffffffffffffffffffffffffffffffff16907f8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c263906122ee9086906001870190613cb1565b60405180910390a26040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c65565b505b50600101612188565b6060612395826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612bfc9092919063ffffffff16565b805190915015611c2757808060200190516123b391908101906132c6565b611c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c15565b60008183612424576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b5082848161242e57fe5b0690505b9392505050565b63ffffffff421690565b61244b612fd5565b6000826dffffffffffffffffffffffffffff1611612495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c75565b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b16816124dc57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b60008184841115612544576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b505050900390565b5160701c6dffffffffffffffffffffffffffff1690565b600080612589670de0b6b3a764000061185c60065460045461212190919063ffffffff16565b905060045483101580156125b05750806125ae60045485611efd90919063ffffffff16565b105b80612432575060045483108015612432575060045481906125d7908563ffffffff611efd16565b109392505050565b6000818361261a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b50600083858161262657fe5b0495945050505050565b601154604080517ffff6cae9000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921691829163fff6cae991600480830192600092919082900301818387803b15801561269d57600080fd5b505af11580156126b1573d6000803e3d6000fd5b505050506000600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000808373ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561272557600080fd5b505afa158015612739573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061275d9190810190613302565b506010546040517f70a082310000000000000000000000000000000000000000000000000000000081526dffffffffffffffffffffffffffff938416955091909216925060009173ffffffffffffffffffffffffffffffffffffffff808716926370a08231926127d1921690600401613a70565b60206040518083038186803b1580156127e957600080fd5b505afa1580156127fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612821919081019061336d565b90506000612830848489612c13565b905061283a612e95565b50604080516060810182528281526020810184905260009181019190915260145460ff1615612a375782890182111561292657600061287c848b018787612cb0565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f91600091859130916128c091899101613c95565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016128ee9493929190613b20565b600060405180830381600087803b15801561290857600080fd5b505af115801561291c573d6000803e3d6000fd5b5050505050612a32565b8282111561297c57600061293b838787612cb0565b90508383038a038260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008330866040516020016128c09190613c95565b6000612989838787612cb0565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008330866040516020016129d09190613c95565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016129fe9493929190613b20565b600060405180830381600087803b158015612a1857600080fd5b505af1158015612a2c573d6000803e3d6000fd5b50505050505b612bce565b828901821115612ac2576000612a50848b018688612cb0565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f9184916000913091612a9491899101613c95565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016129fe9493929190613cd1565b82821115612b18576000612ad7838688612cb0565b90508383038a038260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612a949190613c95565b6000612b25838688612cb0565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612b6c9190613c95565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612b9a9493929190613cd1565b600060405180830381600087803b158015612bb457600080fd5b505af1158015612bc8573d6000803e3d6000fd5b50505050505b505050505050505050565b6000806040516020840160008286518360008a6187965a03f19695505050505050565b6060612c0b8484600085612d8a565b949350505050565b60145460009060ff1615612c6c57601354821115612c5357612c4c670de0b6b3a764000061185c6013548761212190919063ffffffff16565b9050612432565b612c4c670de0b6b3a764000061185c8660038604612121565b601354821115612c9757612c4c670de0b6b3a764000061185c6013548661212190919063ffffffff16565b612c4c670de0b6b3a764000061185c8560038604612121565b6000808411612ceb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c35565b600083118015612cfb5750600082115b612d31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613bc5565b6000612d45856103e563ffffffff61212116565b90506000612d59828563ffffffff61212116565b90506000612d738361152d886103e863ffffffff61212116565b9050808281612d7e57fe5b04979650505050505050565b6060612d9585612e8f565b612dcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051190613c05565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612df59190613a64565b60006040518083038185875af1925050503d8060008114612e32576040519150601f19603f3d011682016040523d82523d6000602084013e612e37565b606091505b50915091508115612e4b579150612c0b9050565b805115612e5b5780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105119190613b64565b3b151590565b60405180606001604052806000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612ef757805160ff1916838001178555612f24565b82800160010185558215612f24579182015b82811115612f24578251825591602001919060010190612f09565b50612f30929150612fe7565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f6d5780548555612f24565b82800160010185558215612f2457600052602060002091601f016020900482015b82811115612f24578254825591600101919060010190612f8e565b815481835581811115611c2757600202816002028360005260206000209182019101611c279190613001565b60408051602081019091526000815290565b61098791905b80821115612f305760008155600101612fed565b61098791905b80821115612f305780547fffffffffffffffffffffff0000000000000000000000000000000000000000001681556000613044600183018261304d565b50600201613007565b50805460018160011615610100020316600290046000825580601f106130735750613091565b601f0160209004906000526020600020908101906130919190612fe7565b50565b8035611c7181613e92565b8035611c7181613ea6565b8051611c7181613ea6565b60008083601f8401126130c757600080fd5b50813567ffffffffffffffff8111156130df57600080fd5b6020830191508360018202830111156130f757600080fd5b9250929050565b600082601f83011261310f57600080fd5b813561312261311d82613d7e565b613d57565b9150808252602083016020830185838301111561313e57600080fd5b613149838284613e32565b50505092915050565b60006060828403121561316457600080fd5b61316e6060613d57565b9050600061317c84846131c3565b825250602061318d848483016131c3565b60208301525060406131a1848285016131c3565b60408301525092915050565b8051611c7181613eaf565b8035611c7181613eb8565b8051611c7181613eb8565b8051611c7181613ec1565b6000602082840312156131eb57600080fd5b6000612c0b8484613094565b60008060006040848603121561320c57600080fd5b60006132188686613094565b935050602084013567ffffffffffffffff81111561323557600080fd5b613241868287016130b5565b92509250509250925092565b6000806000806080858703121561326357600080fd5b600061326f8787613094565b9450506020613280878288016131b8565b9350506040613291878288016131b8565b925050606085013567ffffffffffffffff8111156132ae57600080fd5b6132ba878288016130fe565b91505092959194509250565b6000602082840312156132d857600080fd5b6000612c0b84846130aa565b6000606082840312156132f657600080fd5b6000612c0b8484613152565b60008060006060848603121561331757600080fd5b600061332386866131ad565b9350506020613334868287016131ad565b9250506040613345868287016131ce565b9150509250925092565b60006020828403121561336157600080fd5b6000612c0b84846131b8565b60006020828403121561337f57600080fd5b6000612c0b84846131c3565b6000806040838503121561339e57600080fd5b60006133aa85856131b8565b92505060206133bb8582860161309f565b9150509250929050565b6000806000606084860312156133da57600080fd5b60006133e686866131b8565b93505060206133f7868287016131b8565b9250506040613345868287016131b8565b61341181613de2565b82525050565b61341181613ded565b600061342b82613dd0565b6134358185613dd4565b9350613445818560208601613e3e565b61344e81613e6a565b9093019392505050565b600061346382613dd0565b61346d8185613ddd565b935061347d818560208601613e3e565b9290920192915050565b6000815460018116600081146134a457600181146134e857613527565b607f60028304166134b58187613dd4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168152955050602085019250613527565b600282046134f68187613dd4565b955061350185613dc4565b60005b8281101561352057815488820152600190910190602001613504565b8701945050505b505092915050565b61341181613e27565b6000613545602783613dd4565b7f74776170207761736e7420696e74697469617465642c2063616c6c20696e697481527f5f74776170282900000000000000000000000000000000000000000000000000602082015260400192915050565b60006135a4601b83613dd4565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006135dd602883613dd4565b7f696e646578206d75737420626520696e2072616e6765206f662073746f72656481527f207478206c697374000000000000000000000000000000000000000000000000602082015260400192915050565b600061363c600983613dd4565b7f6e6f207472616465730000000000000000000000000000000000000000000000815260200192915050565b6000613675600a83613dd4565b7f21656e645f64656c617900000000000000000000000000000000000000000000815260200192915050565b60006136ae602883613dd4565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4c81527f4951554944495459000000000000000000000000000000000000000000000000602082015260400192915050565b600061370d600783613dd4565b7f216c697175696400000000000000000000000000000000000000000000000000815260200192915050565b6000613746602183613dd4565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f81527f7700000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b60006137a5600883613dd4565b7f2170656e64696e67000000000000000000000000000000000000000000000000815260200192915050565b60006137de601d83613dd4565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815260200192915050565b6000613817602a83613dd4565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e81527f6f74207375636365656400000000000000000000000000000000000000000000602082015260400192915050565b6000613876600e83613dd4565b7f626164206d73672e73656e646572000000000000000000000000000000000000815260200192915050565b60006138af602b83613dd4565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4981527f4e5055545f414d4f554e54000000000000000000000000000000000000000000602082015260400192915050565b600061390e601183613dd4565b7f616c726561647920616374697661746564000000000000000000000000000000815260200192915050565b6000613947601383613dd4565b7f696e646578206f7574206f6620626f756e647300000000000000000000000000815260200192915050565b6000613980601283613dd4565b7f5472616e73616374696f6e204661696c65640000000000000000000000000000815260200192915050565b60006139b9601783613dd4565b7f4669786564506f696e743a204449565f42595f5a45524f000000000000000000815260200192915050565b60006139f2600a83613dd4565b7f626164206f726967696e00000000000000000000000000000000000000000000815260200192915050565b80516060830190613a2f8482613a5b565b506020820151613a426020850182613a5b565b506040820151613a556040850182613a5b565b50505050565b61341181610987565b60006124328284613458565b60208101611c718284613408565b60408101613a8c8285613408565b6124326020830184613408565b60608101613aa78286613408565b613ab46020830185613408565b612c0b6040830184613a5b565b60408101613acf8285613408565b6124326020830184613a5b565b60208101611c718284613417565b60608101613af88286613417565b613b056020830185613408565b8181036040830152613b178184613420565b95945050505050565b60808101613b2e828761352f565b613b3b6020830186613a5b565b613b486040830185613408565b8181036060830152613b5a8184613420565b9695505050505050565b60208082528101611c6e8184613420565b60208082528101611c7181613538565b60208082528101611c7181613597565b60208082528101611c71816135d0565b60208082528101611c718161362f565b60208082528101611c7181613668565b60208082528101611c71816136a1565b60208082528101611c7181613700565b60208082528101611c7181613739565b60208082528101611c7181613798565b60208082528101611c71816137d1565b60208082528101611c718161380a565b60208082528101611c7181613869565b60208082528101611c71816138a2565b60208082528101611c7181613901565b60208082528101611c718161393a565b60208082528101611c7181613973565b60208082528101611c71816139ac565b60208082528101611c71816139e5565b60608101611c718284613a1e565b60208101611c718284613a5b565b60408101613cbf8285613a5b565b8181036020830152612c0b8184613487565b60808101613cdf8287613a5b565b613b3b602083018661352f565b60408101613acf8285613a5b565b60608101613d088286613a5b565b613d156020830185613a5b565b612c0b6040830184613417565b60808101613d308287613a5b565b613d3d6020830186613a5b565b613d4a6040830185613a5b565b613b176060830184613a5b565b60405181810167ffffffffffffffff81118282101715613d7657600080fd5b604052919050565b600067ffffffffffffffff821115613d9557600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60009081526020902090565b5190565b90815260200190565b919050565b6000611c7182613e05565b151590565b6dffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b63ffffffff1690565b6000611c7182610987565b82818337506000910152565b60005b83811015613e59578181015183820152602001613e41565b83811115613a555750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b613e9b81613de2565b811461309157600080fd5b613e9b81613ded565b613e9b81613df2565b613e9b81610987565b613e9b81613e1e56fea365627a7a7231582016e0874b3ff2c2b697bbce5e679147b4726cf3edbdf53f851f6cecf4e3ca95876c6578706572696d656e74616cf564736f6c63430005110040", - "sourceMap": "243:27951:14:-;;;4198:1410;8:9:-1;5:2;;;30:1;27;20:12;5:2;4198:1410:14;;;;;;;;;;;;;;;;;;;;;4402:8;4375:24;:35;4446:5;4422:21;:29;4463:16;:36;;-1:-1:-1;;;;;;4463:36:14;-1:-1:-1;;;;;4463:36:14;;;;;-1:-1:-1;;4546:38:14;4557:11;4570:13;4546:10;:38::i;:::-;4511:73;;;;4658:11;-1:-1:-1;;;;;4648:21:14;:6;-1:-1:-1;;;;;4648:21:14;;4644:122;;;4687:8;:15;;-1:-1:-1;;4687:15:14;4698:4;4687:15;;;4644:122;;;4737:8;:16;;-1:-1:-1;;4737:16:14;;;4644:122;4831:40;4839:15;4856:6;4864;-1:-1:-1;;;;;4831:7:14;:40;:::i;:::-;4816:12;:55;;-1:-1:-1;;;;;;4816:55:14;;;-1:-1:-1;;;;;4816:55:14;;;;;;;4926:16;:36;;;;;;;;;;;;;;5057:12;:28;;;;;;;;;;;;;;-1:-1:-1;;5098:10:14;:24;;;;;;;;;;;;;;;-1:-1:-1;5224:16:14;5204:17;:36;5286:6;5273:10;:19;-1:-1:-1;;5376:14:14;;;5437:6;5420:14;:23;5493:10;5472:18;:31;5564:7;5540:31;;-1:-1:-1;5584:16:14;;5590:10;5584:16;;;;;;;;243:27951;;24973:395;25094:14;25110;25158:6;-1:-1:-1;;;;;25148:16:14;:6;-1:-1:-1;;;;;25148:16:14;;;25140:66;;;;-1:-1:-1;;;25140:66:14;;;;;;;;;;;;;;;;;25244:6;-1:-1:-1;;;;;25235:15:14;:6;-1:-1:-1;;;;;25235:15:14;;:53;;25273:6;25281;25235:53;;;25254:6;25262;25235:53;25216:72;;-1:-1:-1;25216:72:14;-1:-1:-1;;;;;;25306:20:14;;25298:63;;;;-1:-1:-1;;;25298:63:14;;;;;;;;;24973:395;;;;;:::o;24410:457::-;24553:12;24670:7;24722:6;24730;24705:32;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;24705:32:14;;;24695:43;;;;;;24611:246;;;;;;;;;;;;;;-1:-1:-1;;26:21;;;22:32;6:49;;24611:246:14;;;24601:257;;49:4:-1;24601:257:14;;;;;24410:457;-1:-1:-1;;;;24410:457:14:o;5:134:-1:-;83:13;;101:33;83:13;101:33;;;68:71;;;;;146:672;;;;;312:3;300:9;291:7;287:23;283:33;280:2;;;329:1;326;319:12;280:2;364:1;381:64;437:7;417:9;381:64;;;371:74;;343:108;482:2;500:64;556:7;547:6;536:9;532:22;500:64;;;490:74;;461:109;601:2;619:64;675:7;666:6;655:9;651:22;619:64;;;609:74;;580:109;720:2;738:64;794:7;785:6;774:9;770:22;738:64;;;728:74;;699:109;274:544;;;;;;;;825:152;926:45;946:24;964:5;946:24;;;926:45;;;921:3;914:58;908:69;;;984:152;1085:45;1105:24;1123:5;1105:24;;;1085:45;;1144:374;;1304:67;1368:2;1363:3;1304:67;;;1404:34;1384:55;;-1:-1;;;1468:2;1459:12;;1452:29;1509:2;1500:12;;1290:228;-1:-1;;1290:228;1527:400;;1705:85;1787:2;1782:3;1705:85;;;1823:66;1803:87;;1918:2;1909:12;;1691:236;-1:-1;;1691:236;1936:398;;2114:84;2196:1;2191:3;2114:84;;;2231:66;2211:87;;2326:1;2317:11;;2100:234;-1:-1;;2100:234;2343:330;;2503:67;2567:2;2562:3;2503:67;;;2603:32;2583:53;;2664:2;2655:12;;2489:184;-1:-1;;2489:184;2681:383;;2828:75;2899:3;2890:6;2828:75;;;2925:2;2920:3;2916:12;2909:19;;2939:75;3010:3;3001:6;2939:75;;;-1:-1;3036:2;3027:12;;2816:248;-1:-1;;2816:248;3071:917;;3427:148;3571:3;3427:148;;;3420:155;;3586:75;3657:3;3648:6;3586:75;;;3683:2;3678:3;3674:12;3667:19;;3697:75;3768:3;3759:6;3697:75;;;3794:2;3789:3;3785:12;3778:19;;3815:148;3959:3;3815:148;;;3808:155;3408:580;-1:-1;;;;3408:580;3995:407;4186:2;4200:47;;;4171:18;;4261:131;4171:18;4261:131;;4409:407;4600:2;4614:47;;;4585:18;;4675:131;4585:18;4675:131;;4824:163;4927:19;;;4976:4;4967:14;;4920:67;4996:145;5132:3;5110:31;-1:-1;5110:31;5149:91;;5211:24;5229:5;5211:24;;5247:72;5309:5;5292:27;5326:121;-1:-1;;;;;5388:54;;5371:76;5454:95;;5518:26;5538:5;5637:89;5701:20;5715:5;5807:2;5803:14;;5775:52;5835:117;5904:24;5922:5;5904:24;;;5897:5;5894:35;5884:2;;5943:1;5940;5933:12;5884:2;5878:74;;;243:27951:14;;;;;;", - "deployedSourceMap": "243:27951:14:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;243:27951:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2470:39;;;:::i;:::-;;;;;;;;;;;;;;;;10346:1552;;;;;;;;;:::i;:::-;;22699:393;;;:::i;:::-;;;;;;;;25612:251;;;;;;;;;:::i;1729:18::-;;;:::i;:::-;;;;;;;;22045:495;;;;;;;;;:::i;2025:29::-;;;:::i;20933:151::-;;;;;;;;;:::i;1797:25::-;;;:::i;3727:34::-;;;:::i;3515:31::-;;;:::i;2564:37::-;;;:::i;26010:315::-;;;;;;;;;:::i;7011:228::-;;;:::i;3157:26::-;;;:::i;7881:462::-;;;:::i;6305:272::-;;;;;;;;;:::i;20145:335::-;;;;;;;;;:::i;7337:428::-;;;:::i;1876:24::-;;;:::i;3248:46::-;;;:::i;6004:240::-;;;;;;;;;:::i;26501:238::-;;;;;;;;;:::i;2793:36::-;;;:::i;6717:223::-;;;;;;;;;:::i;3027:20::-;;;:::i;2933:36::-;;;:::i;1653:33::-;;;;;;;;;:::i;:::-;;;;;;;;;;8705:1634;;;:::i;5667:278::-;;;;;;;;;:::i;3589:27::-;;;:::i;1925:25::-;;;:::i;3336:29::-;;;:::i;21209:156::-;;;;;;;;;:::i;4076:32::-;;;:::i;3397:25::-;;;:::i;2361:33::-;;;:::i;4171:20::-;;;:::i;3450:27::-;;;:::i;2470:39::-;;;;:::o;10346:1552::-;10577:12;;;;10563:10;:26;10555:53;;;;;;;;;;;;;;;;;;;;;;10679:23;;;10697:4;10679:23;10671:46;;;;;;;;;;;;;;10728:22;;:::i;:::-;10765:4;10754:27;;;;;;;;;;;;;;10834:10;;10860:26;;;;10727:54;;-1:-1:-1;10834:10:14;;;10860:30;10856:382;;10981:16;;10999:12;;11013:26;;;;10964:76;;;;;:16;;;;;;;:76;;10981:16;;;;10999:12;;;10964:76;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10964:76:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10964:76:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10964:76:14;;;;;;;;;-1:-1:-1;11063:12:14;;11097:26;;;;11077:17;;11054:70;;;;;:8;;;;;;;:70;;11063:12;;;;;11077:46;;;11054:70;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11054:70:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11054:70:14;;;;10856:382;;;11195:12;;11209:17;;11186:41;;;;;:8;;;;;;;:41;;11195:12;;;;;11186:41;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11186:41:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11186:41:14;;;;10856:382;11287:22;;;;:26;11283:107;;11338:16;;11356:22;;;;;11329:50;;;;;:8;;;;;;;:50;;11338:16;;;;;11329:50;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11329:50:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11329:50:14;;;;11283:107;11450:8;;;;11446:444;;;11504:12;;11519:16;;11474:71;;11504:12;;;;;11519:16;11537:7;11474:22;:71::i;:::-;11564:97;11582:7;11591;:17;;;11610:7;:26;;;11638:7;:22;;;11564:97;;;;;;;;;;;;;;;;;;11446:444;;;11722:12;;11737:16;;11692:71;;11722:12;;;;;11737:16;11755:7;11692:22;:71::i;:::-;11782:97;11800:7;11809;:17;;;11828:7;:26;;;11856:7;:22;;;11782:97;;;;;;;;;;;;;;;;;;11446:444;10346:1552;;;;;;:::o;22699:393::-;22830:14;;22746:4;;22830:14;;22825:56;;-1:-1:-1;22865:5:14;22858:12;;22825:56;22950:21;;22921:24;;22913:33;;:3;;:33;:7;:33;:::i;:::-;:58;;:161;;;;-1:-1:-1;23051:21:14;;23025;;:48;;;:25;:48;:::i;:::-;22996:24;;22988:33;;:3;;:33;:7;:33;:::i;:::-;:86;22913:161;22891:194;;22699:393;;:::o;25612:251::-;351:3;;;;337:10;:17;329:26;;;;;;25725:12;25743:112;;;;;;;;25778:4;25743:112;;;;;;25809:11;25743:112;;;;;;25840:4;;25743:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;-1:-1;25743:112:14;;;;-1:-1:-1;;27:10;;39:1;23:18;;;45:23;;;25725:131:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25725:131:14;;;;;;;;;;:::i;:::-;;;;;25612:251;;;:::o;1729:18::-;;;;;;:::o;22045:495::-;351:3;;;;337:10;:17;329:26;;;;;;22287:1;22259:25;:29;22251:38;;;;;;22332:25;22307:22;:50;22299:59;;;;;;22369:24;:52;;;;22431:21;:46;22487:21;:46;22045:495::o;2025:29::-;;;;:::o;20933:151::-;351:3;;;;337:10;:17;329:26;;;;;;21043:1;21030:10;:14;21022:23;;;;;;21055:9;:22;20933:151::o;1797:25::-;;;;;;:::o;3727:34::-;;;;:::o;3515:31::-;;;;;;:::o;2564:37::-;;;;:::o;26010:315::-;351:3;;;;337:10;:17;329:26;;;;;;26112:12;:19;26104:27;;26096:59;;;;;;;;;;;;;;26178:12;:19;:23;;26170:31;;26166:121;;;26239:12;26252:19;;:23;;;;26239:37;;;;;;;;;;;;;;;;26217:12;26230:5;26217:19;;;;;;;;;;;;;;;;:59;;:19;;;;;;;:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26217:59:14;;;;;:19;;:59;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;26166:121:14;26297:12;:21;;;;;;;;;:::i;:::-;;26010:315;:::o;7011:228::-;7086:10;;;;7072;:24;7064:45;;;;;;;;;;;;;;7136:3;;;7155:10;;;7149:16;;;;7136:3;7155:10;;;7149:16;;;;;;;;7175:23;;;;;7213:19;;7136:3;;;;7213:19;;;;7136:3;;7228;;7213:19;;;;;;;;;;7011:228;:::o;3157:26::-;;;;;;:::o;7881:462::-;7964:1;7947:14;;:18;7939:70;;;;;;;;;;;;;;3286:8;8087:14;;:28;8080:3;:35;;8072:58;;;;;;;;;;;;;;8230:12;;8218:48;;;;;;;;8269:1;;8230:12;;;8218:46;;:48;;;;;;;;;;;;;;8230:12;8218:48;;;5:2:-1;;;;30:1;27;20:12;5:2;8218:48:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8218:48:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;8218:48:14;;;;;;;;;:52;8210:72;;;;;;;;;;;;;;8315:14;:21;;;;8332:4;8315:21;;;7881:462::o;6305:272::-;351:3;;;;337:10;:17;329:26;;;;;;6435:16;;;;6461:36;;;;;;;;;;6512:58;;6435:16;;;6512:58;;;;6435:16;;6480:17;;6512:58;;;;;;;;;;365:1;6305:272;:::o;20145:335::-;351:3;;;;337:10;:17;329:26;;;;;;20281:1;20260:18;;:22;20252:31;;;;;;20325:18;;;20353:40;;;;20408:65;;;;;;20325:18;;20374:19;;20408:65;;7337:428;7395:14;;:19;7387:49;;;;;;;;;;;;;;7552:12;;7566:8;;7447:20;;;;7505:70;;7552:12;;;7566:8;;7505:46;:70::i;:::-;7446:129;;;;7610:1;7593:14;:18;;;7585:40;;;;;;;;;;;;;;7635:18;:35;;;;;;;;;;;;;;;;7680:19;:37;;;;7727:14;:31;7337:428::o;1876:24::-;;;;:::o;3248:46::-;3286:8;3248:46;:::o;6004:240::-;351:3;;;;337:10;:17;329:26;;;;;;6144:14;:32;;;6191:46;;6119:15;;6191:46;;;;6119:15;;;;6191:46;;26501:238;351:3;;;;337:10;:17;329:26;;;;;;26621:12;:19;26613:27;;26605:80;;;;;;;;;;;;;;26725:7;26695:12;26708:5;26695:19;;;;;;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;-1:-1:-1;;26501:238:14:o;2793:36::-;;;;:::o;6717:223::-;351:3;;;;337:10;:17;329:26;;;;;;6833:10;;;;6853:24;;;;;;;;;;6892:41;;6833:10;;;6892:41;;;;6833:10;;6866:11;;6892:41;;3027:20;;;;:::o;2933:36::-;;;;:::o;1653:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1653:33:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;8705:1634::-;8760:16;:14;:16::i;:::-;8752:25;;;;;;8915:3;8860:52;8887:24;;8860:22;;:26;;:52;;;;:::i;:::-;:58;8852:67;;;;;;9016:82;9076:21;;9016:55;9037:33;9045:24;;9037:3;:7;;:33;;;;:::i;:::-;9016:3;;:55;:7;:55;:::i;:::-;:59;:82;:59;:82;:::i;:::-;8991:22;:107;9117:5;;:12;;9127:1;9117:12;:9;:12;:::i;:::-;9109:5;:20;9177;9200:9;:7;:9::i;:::-;9177:32;;9262:18;9282:13;9299:31;9317:12;9299:17;:31::i;:::-;9449:9;;9261:69;;-1:-1:-1;9261:69:14;-1:-1:-1;9261:69:14;;9434:25;;9261:69;;9434:25;:14;:25;:::i;:::-;9512:10;;9421:38;;-1:-1:-1;9512:10:14;;9568:8;:73;;;;;9619:3;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9619:22:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9619:22:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9619:22:14;;;;;;;;;9606:10;9580:3;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9580:23:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9580:23:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9580:23:14;;;;;;;;;:36;:61;9568:73;9564:165;;;9695:3;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9695:23:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9695:23:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9695:23:14;;;;;;;;;9670:3;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9670:22:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9670:22:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9670:22:14;;;;;;;;;:48;9657:61;;9564:165;9740:18;9761:3;:15;;;:17;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9761:17:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9761:17:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9761:17:14;;;;;;;;;9740:38;;9789:18;9873:8;9869:214;;;9897:16;9916:42;9951:6;9916:30;9931:14;;9916:10;:14;;:30;;;;:::i;:::-;:34;:42;:34;:42;:::i;:::-;9897:61;-1:-1:-1;9985:24:14;:10;9897:61;9985:24;:14;:24;:::i;:::-;9972:37;-1:-1:-1;10036:36:14;10065:6;10036:24;:10;10051:8;10036:24;:14;:24;:::i;:36::-;10023:49;;9869:214;;10151:5;;10140:39;;;;;10112:25;;10140:10;;;;;;:39;;10158:10;;10170:8;;10140:39;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10140:39:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10140:39:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10140:39:14;;;;;;;;;10112:67;;10223:3;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10223:22:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10223:22:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10223:22:14;;;;;;;;;10196:3;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10196:23:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10196:23:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10196:23:14;;;;;;;;;:49;;10189:57;;;;10297:35;10309:10;10321;10297:11;:35::i;:::-;8705:1634;;;;;;;;:::o;5667:278::-;351:3;;;;337:10;:17;329:26;;;;;;5826:17;:38;;;5879:59;;5798:18;;5879:59;;;;5798:18;;;;5879:59;;3589:27;;;;;;:::o;1925:25::-;;;;:::o;3336:29::-;;;;:::o;21209:156::-;351:3;;;;337:10;:17;329:26;;;;;;21322:1;21308:11;:15;21300:24;;;;;;21334:10;:24;21209:156::o;4076:32::-;;;;:::o;3397:25::-;;;;;;:::o;2361:33::-;;;;:::o;4171:20::-;;;;;;:::o;3450:27::-;;;;;;:::o;678:175:11:-;787:58;;760:86;;780:5;;810:23;;787:58;;835:2;;839:5;;787:58;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;787:58:11;;;49:4:-1;25:18;;61:17;;787:58:11;182:15:-1;787:58:11;;;;179:29:-1;;;;160:49;;;760:19:11;:86::i;:::-;678:175;;;:::o;4437:128:12:-;4495:7;4521:37;4525:1;4528;4521:37;;;;;;;;;;;;;;;;;:3;:37::i;:::-;4514:44;;4437:128;;;;;:::o;875:176::-;933:7;964:5;;;987:6;;;;979:46;;;;;;;;;;;;;579:1437:13;686:20;708:21;758:23;:21;:23::i;:::-;741:40;;792:16;810;828:25;869:4;857:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;857:31:13;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;857:31:13;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;857:31:13;;;;;;;;;791:97;;;;;;902:8;898:1111;;;954:4;942:38;;;:40;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;942:40:13;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;942:40:13;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;942:40:13;;;;;;;;;924:58;;1123:14;1101:36;;:18;:36;;;1097:351;;1225:35;;;1373:62;;;1378:39;1398:8;1408;1378:19;:39::i;:::-;:42;1373:48;;:62;1354:81;;;;;-1:-1:-1;1097:351:13;898:1111;;;1506:4;1494:38;;;:40;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1494:40:13;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1494:40:13;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1494:40:13;;;;;;;;;1476:58;;1674:14;1652:36;;:18;:36;;;1648:351;;1776:35;;;1924:62;;;1929:39;1949:8;1959;1929:19;:39::i;:::-;:42;1924:48;;:62;1905:81;;;;;-1:-1:-1;1648:351:13;579:1437;;;;;;;;:::o;1322:134:12:-;1380:7;1406:43;1410:1;1413;1406:43;;;;;;;;;;;;;;;;;:3;:43::i;18984:807:14:-;19162:12;;19176:8;;19037:7;;;;;;19115:70;;19162:12;;;;;19176:8;;19115:46;:70::i;:::-;19232:18;;19058:127;;-1:-1:-1;19058:127:14;-1:-1:-1;19232:18:14;;;;;19215:35;;19515:40;;:::i;:::-;19558:84;;;;;;;;19629:11;19587:53;;19606:19;;19588:15;:37;19587:53;;;;;;19558:84;;;;19653:19;:37;;;19700:18;:35;;;;;;;;;;;;19515:127;-1:-1:-1;19753:31:14;19515:127;19753:17;:31::i;:::-;19746:38;;;;;;;;18984:807;:::o;23174:474::-;23261:7;23270:4;23294:30;23319:4;23294:24;:30::i;:::-;23290:78;;;-1:-1:-1;23348:1:14;;-1:-1:-1;23348:1:14;23340:17;;23290:78;23447:10;;23440:4;:17;23436:206;;;23518:10;;23481:48;;:32;23506:6;23481:20;:4;23518:10;23481:20;:8;:20;:::i;:::-;:24;:32;:24;:32;:::i;:48::-;23531:4;23473:63;;;;;;23436:206;23612:10;;23575:48;;:32;23600:6;23575:20;23612:10;23590:4;23575:20;:14;:20;:::i;:48::-;23625:5;23567:64;;;;23436:206;23174:474;;;:::o;3102:130:12:-;3160:7;3186:39;3190:1;3193;3186:39;;;;;;;;;;;;;;;;;:3;:39::i;2181:459::-;2239:7;2480:6;2476:45;;-1:-1:-1;2509:1:12;2502:8;;2476:45;2543:5;;;2547:1;2543;:5;:1;2566:5;;;;;:10;2558:56;;;;;;;;;;;;;17887:676:14;18005:14;;18001:136;;18035:91;18074:10;18102;18035:21;:91::i;:::-;18152:6;18147:410;18168:12;:19;18164:23;;18147:410;;;18208:21;18232:12;18245:1;18232:15;;;;;;;;;;;;;;;;;;;;;18265:9;;18232:15;;-1:-1:-1;18265:9:14;;18261:286;;;18341:13;;;18356:6;;;18328:35;;;;;;;18341:13;18328:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;18328:35:14;;18341:13;;;;;18328:35;;18356:6;;18328:35;;;18356:6;18328:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:12;:35::i;:::-;18294:69;;18386:6;18381:152;;18439:13;;18421:43;;18439:13;;;;;;;18421:43;;;;18454:1;;18439:13;18457:6;;;18421:43;;;;;;;;;;18486:28;;;;;;;;;;;18381:152;18261:286;;-1:-1:-1;18189:3:14;;18147:410;;2941:751:11;3360:23;3386:69;3414:4;3386:69;;;;;;;;;;;;;;;;;3394:5;3386:27;;;;:69;;;;;:::i;:::-;3469:17;;3360:95;;-1:-1:-1;3469:21:11;3465:221;;3609:10;3598:30;;;;;;;;;;;;;;3590:85;;;;;;;;;;;;;5036:163:12;5122:7;5157:12;5149:6;5141:29;;;;;;;;;;;;;;;;5191:1;5187;:5;;;;;;5180:12;;5036:163;;;;;;:::o;355:121:13:-;443:25;:15;:25;;355:121::o;1700:243:8:-;1781:16;;:::i;:::-;1831:1;1817:11;:15;;;1809:51;;;;;;;;;;;;;;1877:59;;;;;;;;;;1887:48;;;1888:32;481:3;1888:32;;;;1887:48;;;;;;1877:59;;;;;1870:66;;1700:243;;;;:::o;1747:187:12:-;1833:7;1868:12;1860:6;;;;1852:29;;;;;;;;;;;;;;;-1:-1:-1;;;1903:5:12;;;1747:187::o;2026:125:8:-;2122:7;481:3;2122:21;;;;2026:125::o;23888:398:14:-;23982:4;24002:34;24039:61;24091:8;24039:34;24054:18;;24039:10;;:14;;:34;;;;:::i;:61::-;24002:98;;24127:10;;24119:4;:18;;:71;;;;;24164:26;24141:20;24150:10;;24141:4;:8;;:20;;;;:::i;:::-;:49;24119:71;24118:161;;;;24215:10;;24208:4;:17;:70;;;;-1:-1:-1;24229:10:14;;24252:26;;24229:20;;24244:4;24229:20;:14;:20;:::i;:::-;:49;24111:168;23888:398;-1:-1:-1;;;23888:398:14:o;3714:272:12:-;3800:7;3834:12;3827:5;3819:28;;;;;;;;;;;;;;;;3857:9;3873:1;3869;:5;;;;;;;3714:272;-1:-1:-1;;;;;3714:272:12:o;11904:4273:14:-;12059:12;;12083:11;;;;;;;;12059:12;;;;;;;12083:9;;:11;;;;;12028:16;;12083:11;;;;;;;12028:16;12059:12;12083:11;;;5:2:-1;;;;30:1;27;20:12;5:2;12083:11:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12083:11:14;;;;12105:21;12147:10;;;;;;;;;;;12105:53;;12194:22;12218;12246:4;:16;;;:18;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12246:18:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12246:18:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;12246:18:14;;;;;;;;;-1:-1:-1;12365:16:14;;12351:31;;;;;12193:71;;;;;-1:-1:-1;12193:71:14;;;;;-1:-1:-1;12334:14:14;;12351:13;;;;;;;:31;;12365:16;;12351:31;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12351:31:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12351:31:14;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;12351:31:14;;;;;;;;;12334:48;;12394:30;12427:62;12446:14;12462;12478:10;12427:18;:62::i;:::-;12394:95;;12500:22;;:::i;:::-;-1:-1:-1;12525:131:14;;;;;;;;;;;;;;;;;-1:-1:-1;12525:131:14;;;;;;;12813:8;;;;12809:3362;;;12879:6;12866:10;:19;12841:22;:44;12837:1595;;;12960:17;12980:65;13006:6;12993:10;:19;13014:14;13030;12980:12;:65::i;:::-;13083:19;;;13063:39;;13120:26;;;;:35;;;13297:19;;12960:85;;-1:-1:-1;13258:9:14;;;;;;13063:17;;12960:85;;13290:4;;13297:19;;13063:7;;13297:19;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13297:19:14;;;13258:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13258:59:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13258:59:14;;;;12837:1595;;;;13385:6;13360:22;:31;13356:1062;;;13473:17;13493:68;13506:22;13530:14;13546;13493:12;:68::i;:::-;13473:88;;13752:6;13727:22;:31;13713:10;:46;13688:7;:22;;:71;;;;;13781:4;:9;;;13791:1;13794:9;13813:4;13831:7;13820:19;;;;;;;;;13356:1062;13944:17;13964:68;13977:22;14001:14;14017;13964:12;:68::i;:::-;13944:88;;14083:22;14054:7;:26;;:51;;;;;14152:10;14127:7;:22;;:35;;;;;14340:4;:9;;;14350:1;14353:9;14372:4;14390:7;14379:19;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;14379:19:14;;;14340:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14340:59:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14340:59:14;;;;13356:1062;;12809:3362;;;14504:6;14491:10;:19;14466:22;:44;14462:1699;;;14585:17;14605:65;14631:6;14618:10;:19;14639:14;14655;14605:12;:65::i;:::-;14708:19;;;14688:39;;14745:26;;;;:35;;;14922:19;;14585:85;;-1:-1:-1;14883:9:14;;;;;;14585:85;;14688:17;;14915:4;;14922:19;;14688:7;;14922:19;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;14922:19:14;;;14883:59;;;;;;;;;;;;;;;;;;;14462:1699;15010:6;14985:22;:31;14981:1166;;;15098:17;15118:68;15131:22;15155:14;15171;15118:12;:68::i;:::-;15098:88;;15376:6;15351:22;:31;15337:10;:46;15312:7;:22;;:71;;;;;15510:4;:9;;;15520;15531:1;15542:4;15560:7;15549:19;;;;;;;;;14981:1166;15673:17;15693:68;15706:22;15730:14;15746;15693:12;:68::i;:::-;15673:88;;15812:22;15783:7;:26;;:51;;;;;15881:10;15856:7;:22;;:35;;;;;16069:4;:9;;;16079;16090:1;16101:4;16119:7;16108:19;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16108:19:14;;;16069:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;16069:59:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16069:59:14;;;;14981:1166;;11904:4273;;;;;;;;;:::o;26974:1218::-;27070:4;27090:11;27326:4;27320:11;27451:2;27445:4;27441:13;28081:1;28050:13;27959:4;27953:11;27924;27880:1;27851:11;27825:5;27820:3;27816:15;27478:675;27468:685;26974:1218;-1:-1:-1;;;;;;26974:1218:14:o;3571:194:6:-;3674:12;3705:53;3728:6;3736:4;3742:1;3745:12;3705:22;:53::i;:::-;3698:60;3571:194;-1:-1:-1;;;;3571:194:6:o;16183:1018:14:-;16350:8;;16323:7;;16350:8;;16346:849;;;16389:17;;16376:10;:30;16372:582;;;16461:41;16495:6;16461:29;16472:17;;16461:6;:10;;:29;;;;:::i;:41::-;16454:48;;;;16372:582;16903:38;16934:6;16903:26;:6;16927:1;16914:14;;16903:10;:26::i;16346:849::-;17001:17;;16988:10;:30;16984:201;;;17045:41;17079:6;17045:29;17056:17;;17045:6;:10;;:29;;;;:::i;16984:201::-;17132:38;17163:6;17132:26;:6;17156:1;17143:14;;17132:10;:26::i;17319:561::-;17466:14;17514:1;17503:8;:12;17495:68;;;;;;;;;;;;;;17592:1;17580:9;:13;:31;;;;;17610:1;17597:10;:14;17580:31;17572:84;;;;;;;;;;;;;;17665:20;17688:17;:8;17701:3;17688:17;:12;:17;:::i;:::-;17665:40;-1:-1:-1;17714:14:14;17731:31;17665:40;17751:10;17731:31;:19;:31;:::i;:::-;17714:48;-1:-1:-1;17771:16:14;17790:40;17814:15;17790:19;:9;17804:4;17790:19;:13;:19;:::i;:40::-;17771:59;;17863:11;17851:9;:23;;;;;;;17319:561;-1:-1:-1;;;;;;;17319:561:14:o;4918:955:6:-;5048:12;5080:18;5091:6;5080:10;:18::i;:::-;5072:60;;;;;;;;;;;;;;5203:12;5217:23;5244:6;:11;;5262:8;5272:4;5244:33;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;5202:75:6;;;;5291:7;5287:580;;;5321:10;-1:-1:-1;5314:17:6;;-1:-1:-1;5314:17:6;5287:580;5432:17;;:21;5428:429;;5690:10;5684:17;5750:15;5737:10;5733:2;5729:19;5722:44;5639:145;5829:12;5822:20;;;;;;;;;;;;719:413;1079:20;1117:8;;;719:413::o;243:27951:14:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;243:27951:14;;;-1:-1:-1;243:27951:14;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;243:27951:14;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;142:124;206:20;;231:30;206:20;231:30;;273:128;348:13;;366:30;348:13;366:30;;422:336;;;536:3;529:4;521:6;517:17;513:27;503:2;;554:1;551;544:12;503:2;-1:-1;574:20;;614:18;603:30;;600:2;;;646:1;643;636:12;600:2;680:4;672:6;668:17;656:29;;731:3;723:4;715:6;711:17;701:8;697:32;694:41;691:2;;;748:1;745;738:12;691:2;496:262;;;;;;767:440;;868:3;861:4;853:6;849:17;845:27;835:2;;886:1;883;876:12;835:2;923:6;910:20;945:64;960:48;1001:6;960:48;;;945:64;;;936:73;;1029:6;1022:5;1015:21;1065:4;1057:6;1053:17;1098:4;1091:5;1087:16;1133:3;1124:6;1119:3;1115:16;1112:25;1109:2;;;1150:1;1147;1140:12;1109:2;1160:41;1194:6;1189:3;1184;1160:41;;;828:379;;;;;;;;1244:680;;1365:4;1353:9;1348:3;1344:19;1340:30;1337:2;;;1383:1;1380;1373:12;1337:2;1401:20;1416:4;1401:20;;;1392:29;-1:-1;1476:1;1508:60;1564:3;1544:9;1508:60;;;1483:86;;-1:-1;1644:2;1677:60;1733:3;1709:22;;;1677:60;;;1670:4;1663:5;1659:16;1652:86;1590:159;1809:2;1842:60;1898:3;1889:6;1878:9;1874:22;1842:60;;;1835:4;1828:5;1824:16;1817:86;1759:155;1331:593;;;;;1931:134;2009:13;;2027:33;2009:13;2027:33;;2072:130;2139:20;;2164:33;2139:20;2164:33;;2209:134;2287:13;;2305:33;2287:13;2305:33;;2350:132;2427:13;;2445:32;2427:13;2445:32;;2489:241;;2593:2;2581:9;2572:7;2568:23;2564:32;2561:2;;;2609:1;2606;2599:12;2561:2;2644:1;2661:53;2706:7;2686:9;2661:53;;2737:490;;;;2877:2;2865:9;2856:7;2852:23;2848:32;2845:2;;;2893:1;2890;2883:12;2845:2;2928:1;2945:53;2990:7;2970:9;2945:53;;;2935:63;;2907:97;3063:2;3052:9;3048:18;3035:32;3087:18;3079:6;3076:30;3073:2;;;3119:1;3116;3109:12;3073:2;3147:64;3203:7;3194:6;3183:9;3179:22;3147:64;;;3137:74;;;;3014:203;2839:388;;;;;;3234:721;;;;;3398:3;3386:9;3377:7;3373:23;3369:33;3366:2;;;3415:1;3412;3405:12;3366:2;3450:1;3467:53;3512:7;3492:9;3467:53;;;3457:63;;3429:97;3557:2;3575:53;3620:7;3611:6;3600:9;3596:22;3575:53;;;3565:63;;3536:98;3665:2;3683:53;3728:7;3719:6;3708:9;3704:22;3683:53;;;3673:63;;3644:98;3801:2;3790:9;3786:18;3773:32;3825:18;3817:6;3814:30;3811:2;;;3857:1;3854;3847:12;3811:2;3877:62;3931:7;3922:6;3911:9;3907:22;3877:62;;;3867:72;;3752:193;3360:595;;;;;;;;3962:257;;4074:2;4062:9;4053:7;4049:23;4045:32;4042:2;;;4090:1;4087;4080:12;4042:2;4125:1;4142:61;4195:7;4175:9;4142:61;;4226:305;;4362:2;4350:9;4341:7;4337:23;4333:32;4330:2;;;4378:1;4375;4368:12;4330:2;4413:1;4430:85;4507:7;4487:9;4430:85;;4538:533;;;;4686:2;4674:9;4665:7;4661:23;4657:32;4654:2;;;4702:1;4699;4692:12;4654:2;4737:1;4754:64;4810:7;4790:9;4754:64;;;4744:74;;4716:108;4855:2;4873:64;4929:7;4920:6;4909:9;4905:22;4873:64;;;4863:74;;4834:109;4974:2;4992:63;5047:7;5038:6;5027:9;5023:22;4992:63;;;4982:73;;4953:108;4648:423;;;;;;5078:241;;5182:2;5170:9;5161:7;5157:23;5153:32;5150:2;;;5198:1;5195;5188:12;5150:2;5233:1;5250:53;5295:7;5275:9;5250:53;;5326:263;;5441:2;5429:9;5420:7;5416:23;5412:32;5409:2;;;5457:1;5454;5447:12;5409:2;5492:1;5509:64;5565:7;5545:9;5509:64;;5596:360;;;5714:2;5702:9;5693:7;5689:23;5685:32;5682:2;;;5730:1;5727;5720:12;5682:2;5765:1;5782:53;5827:7;5807:9;5782:53;;;5772:63;;5744:97;5872:2;5890:50;5932:7;5923:6;5912:9;5908:22;5890:50;;;5880:60;;5851:95;5676:280;;;;;;5963:491;;;;6101:2;6089:9;6080:7;6076:23;6072:32;6069:2;;;6117:1;6114;6107:12;6069:2;6152:1;6169:53;6214:7;6194:9;6169:53;;;6159:63;;6131:97;6259:2;6277:53;6322:7;6313:6;6302:9;6298:22;6277:53;;;6267:63;;6238:98;6367:2;6385:53;6430:7;6421:6;6410:9;6406:22;6385:53;;6461:113;6544:24;6562:5;6544:24;;;6539:3;6532:37;6526:48;;;6581:104;6658:21;6673:5;6658:21;;6692:343;;6802:38;6834:5;6802:38;;;6852:70;6915:6;6910:3;6852:70;;;6845:77;;6927:52;6972:6;6967:3;6960:4;6953:5;6949:16;6927:52;;;7000:29;7022:6;7000:29;;;6991:39;;;;6782:253;-1:-1;;;6782:253;7042:356;;7170:38;7202:5;7170:38;;;7220:88;7301:6;7296:3;7220:88;;;7213:95;;7313:52;7358:6;7353:3;7346:4;7339:5;7335:16;7313:52;;;7377:16;;;;;7150:248;-1:-1;;7150:248;7770:818;;7887:5;7881:12;7921:1;7910:9;7906:17;7934:1;7929:247;;;;8187:1;8182:400;;;;7899:683;;7929:247;8007:4;8003:1;7992:9;7988:17;7984:28;8026:70;8089:6;8084:3;8026:70;;;8130:9;8115:25;;8103:38;;8019:77;-1:-1;;8164:4;8155:14;;;-1:-1;7929:247;;8182:400;8251:1;8240:9;8236:17;8267:70;8330:6;8325:3;8267:70;;;8260:77;;8359:37;8390:5;8359:37;;;8412:1;8420:130;8434:6;8431:1;8428:13;8420:130;;;8493:14;;8480:11;;;8473:35;8540:1;8527:15;;;;8456:4;8449:12;8420:130;;;8564:11;;;-1:-1;;;7899:683;;7857:731;;;;;;8596:142;8687:45;8726:5;8687:45;;9100:376;;9260:67;9324:2;9319:3;9260:67;;;9360:34;9340:55;;9429:9;9424:2;9415:12;;9408:31;9467:2;9458:12;;9246:230;-1:-1;;9246:230;9485:327;;9645:67;9709:2;9704:3;9645:67;;;9745:29;9725:50;;9803:2;9794:12;;9631:181;-1:-1;;9631:181;9821:377;;9981:67;10045:2;10040:3;9981:67;;;10081:34;10061:55;;10150:10;10145:2;10136:12;;10129:32;10189:2;10180:12;;9967:231;-1:-1;;9967:231;10207:308;;10367:66;10431:1;10426:3;10367:66;;;10466:11;10446:32;;10506:2;10497:12;;10353:162;-1:-1;;10353:162;10524:310;;10684:67;10748:2;10743:3;10684:67;;;10784:12;10764:33;;10825:2;10816:12;;10670:164;-1:-1;;10670:164;10843:377;;11003:67;11067:2;11062:3;11003:67;;;11103:34;11083:55;;11172:10;11167:2;11158:12;;11151:32;11211:2;11202:12;;10989:231;-1:-1;;10989:231;11229:306;;11389:66;11453:1;11448:3;11389:66;;;11488:9;11468:30;;11526:2;11517:12;;11375:160;-1:-1;;11375:160;11544:370;;11704:67;11768:2;11763:3;11704:67;;;11804:34;11784:55;;11873:3;11868:2;11859:12;;11852:25;11905:2;11896:12;;11690:224;-1:-1;;11690:224;11923:307;;12083:66;12147:1;12142:3;12083:66;;;12182:10;12162:31;;12221:2;12212:12;;12069:161;-1:-1;;12069:161;12239:329;;12399:67;12463:2;12458:3;12399:67;;;12499:31;12479:52;;12559:2;12550:12;;12385:183;-1:-1;;12385:183;12577:379;;12737:67;12801:2;12796:3;12737:67;;;12837:34;12817:55;;12906:12;12901:2;12892:12;;12885:34;12947:2;12938:12;;12723:233;-1:-1;;12723:233;12965:314;;13125:67;13189:2;13184:3;13125:67;;;13225:16;13205:37;;13270:2;13261:12;;13111:168;-1:-1;;13111:168;13288:380;;13448:67;13512:2;13507:3;13448:67;;;13548:34;13528:55;;13617:13;13612:2;13603:12;;13596:35;13659:2;13650:12;;13434:234;-1:-1;;13434:234;13677:317;;13837:67;13901:2;13896:3;13837:67;;;13937:19;13917:40;;13985:2;13976:12;;13823:171;-1:-1;;13823:171;14003:319;;14163:67;14227:2;14222:3;14163:67;;;14263:21;14243:42;;14313:2;14304:12;;14149:173;-1:-1;;14149:173;14331:318;;14491:67;14555:2;14550:3;14491:67;;;14591:20;14571:41;;14640:2;14631:12;;14477:172;-1:-1;;14477:172;14658:323;;14818:67;14882:2;14877:3;14818:67;;;14918:25;14898:46;;14972:2;14963:12;;14804:177;-1:-1;;14804:177;14990:310;;15150:67;15214:2;15209:3;15150:67;;;15250:12;15230:33;;15291:2;15282:12;;15136:164;-1:-1;;15136:164;15363:659;15577:23;;15506:4;15497:14;;;15606:63;15501:3;15577:23;15606:63;;;15526:149;15762:4;15755:5;15751:16;15745:23;15774:63;15831:4;15826:3;15822:14;15808:12;15774:63;;;15685:158;15926:4;15919:5;15915:16;15909:23;15938:63;15995:4;15990:3;15986:14;15972:12;15938:63;;;15853:154;15479:543;;;;16029:103;16102:24;16120:5;16102:24;;16259:262;;16403:93;16492:3;16483:6;16403:93;;16528:213;16646:2;16631:18;;16660:71;16635:9;16704:6;16660:71;;16748:324;16894:2;16879:18;;16908:71;16883:9;16952:6;16908:71;;;16990:72;17058:2;17047:9;17043:18;17034:6;16990:72;;17079:435;17253:2;17238:18;;17267:71;17242:9;17311:6;17267:71;;;17349:72;17417:2;17406:9;17402:18;17393:6;17349:72;;;17432;17500:2;17489:9;17485:18;17476:6;17432:72;;17521:324;17667:2;17652:18;;17681:71;17656:9;17725:6;17681:71;;;17763:72;17831:2;17820:9;17816:18;17807:6;17763:72;;17852:201;17964:2;17949:18;;17978:65;17953:9;18016:6;17978:65;;18060:499;18242:2;18227:18;;18256:65;18231:9;18294:6;18256:65;;;18332:72;18400:2;18389:9;18385:18;18376:6;18332:72;;;18452:9;18446:4;18442:20;18437:2;18426:9;18422:18;18415:48;18477:72;18544:4;18535:6;18477:72;;;18469:80;18213:346;-1:-1;;;;;18213:346;18566:647;18794:3;18779:19;;18809:79;18783:9;18861:6;18809:79;;;18899:72;18967:2;18956:9;18952:18;18943:6;18899:72;;;18982;19050:2;19039:9;19035:18;19026:6;18982:72;;;19102:9;19096:4;19092:20;19087:2;19076:9;19072:18;19065:48;19127:76;19198:4;19189:6;19127:76;;;19119:84;18765:448;-1:-1;;;;;;18765:448;19220:301;19358:2;19372:47;;;19343:18;;19433:78;19343:18;19497:6;19433:78;;19528:407;19719:2;19733:47;;;19704:18;;19794:131;19704:18;19794:131;;19942:407;20133:2;20147:47;;;20118:18;;20208:131;20118:18;20208:131;;20356:407;20547:2;20561:47;;;20532:18;;20622:131;20532:18;20622:131;;20770:407;20961:2;20975:47;;;20946:18;;21036:131;20946:18;21036:131;;21184:407;21375:2;21389:47;;;21360:18;;21450:131;21360:18;21450:131;;21598:407;21789:2;21803:47;;;21774:18;;21864:131;21774:18;21864:131;;22012:407;22203:2;22217:47;;;22188:18;;22278:131;22188:18;22278:131;;22426:407;22617:2;22631:47;;;22602:18;;22692:131;22602:18;22692:131;;22840:407;23031:2;23045:47;;;23016:18;;23106:131;23016:18;23106:131;;23254:407;23445:2;23459:47;;;23430:18;;23520:131;23430:18;23520:131;;23668:407;23859:2;23873:47;;;23844:18;;23934:131;23844:18;23934:131;;24082:407;24273:2;24287:47;;;24258:18;;24348:131;24258:18;24348:131;;24496:407;24687:2;24701:47;;;24672:18;;24762:131;24672:18;24762:131;;24910:407;25101:2;25115:47;;;25086:18;;25176:131;25086:18;25176:131;;25324:407;25515:2;25529:47;;;25500:18;;25590:131;25500:18;25590:131;;25738:407;25929:2;25943:47;;;25914:18;;26004:131;25914:18;26004:131;;26152:407;26343:2;26357:47;;;26328:18;;26418:131;26328:18;26418:131;;26566:407;26757:2;26771:47;;;26742:18;;26832:131;26742:18;26832:131;;26980:313;27148:2;27133:18;;27162:121;27137:9;27256:6;27162:121;;27300:213;27418:2;27403:18;;27432:71;27407:9;27476:6;27432:71;;27520:402;27681:2;27666:18;;27695:71;27670:9;27739:6;27695:71;;;27814:9;27808:4;27804:20;27799:2;27788:9;27784:18;27777:48;27839:73;27907:4;27898:6;27839:73;;27929:647;28157:3;28142:19;;28172:71;28146:9;28216:6;28172:71;;;28254:80;28330:2;28319:9;28315:18;28306:6;28254:80;;28583:324;28729:2;28714:18;;28743:71;28718:9;28787:6;28743:71;;28914:423;29082:2;29067:18;;29096:71;29071:9;29140:6;29096:71;;;29178:72;29246:2;29235:9;29231:18;29222:6;29178:72;;;29261:66;29323:2;29312:9;29308:18;29299:6;29261:66;;29344:547;29546:3;29531:19;;29561:71;29535:9;29605:6;29561:71;;;29643:72;29711:2;29700:9;29696:18;29687:6;29643:72;;;29726;29794:2;29783:9;29779:18;29770:6;29726:72;;;29809;29877:2;29866:9;29862:18;29853:6;29809:72;;29898:256;29960:2;29954:9;29986:17;;;30061:18;30046:34;;30082:22;;;30043:62;30040:2;;;30118:1;30115;30108:12;30040:2;30134;30127:22;29938:216;;-1:-1;29938:216;30161:321;;30304:18;30296:6;30293:30;30290:2;;;30336:1;30333;30326:12;30290:2;-1:-1;30467:4;30403;30380:17;;;;30399:9;30376:33;30457:15;;30227:255;30489:157;;30583:14;;;30625:4;30612:18;;;30542:104;30653:117;30736:12;;30707:63;31035:162;31137:19;;;31186:4;31177:14;;31130:67;31206:144;31341:3;31319:31;-1:-1;31319:31;31530:91;;31592:24;31610:5;31592:24;;31628:85;31694:13;31687:21;;31670:43;31720:109;31793:30;31782:42;;31765:64;31836:121;31909:42;31898:54;;31881:76;32043:88;32115:10;32104:22;;32087:44;32138:116;;32225:24;32243:5;32225:24;;32262:145;32343:6;32338:3;32333;32320:30;-1:-1;32399:1;32381:16;;32374:27;32313:94;32416:268;32481:1;32488:101;32502:6;32499:1;32496:13;32488:101;;;32569:11;;;32563:18;32550:11;;;32543:39;32524:2;32517:10;32488:101;;;32604:6;32601:1;32598:13;32595:2;;;-1:-1;;32669:1;32651:16;;32644:27;32465:219;32692:97;32780:2;32760:14;32776:7;32756:28;;32740:49;32797:117;32866:24;32884:5;32866:24;;;32859:5;32856:35;32846:2;;32905:1;32902;32895:12;32921:111;32987:21;33002:5;32987:21;;33039:117;33108:24;33126:5;33108:24;;33163:117;33232:24;33250:5;33232:24;;33287:115;33355:23;33372:5;33355:23;", - "source": "pragma solidity 0.5.17;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/SafeERC20.sol\";\nimport \"../lib/SafeMath.sol\";\nimport '../lib/IUniswapV2Pair.sol';\nimport \"../lib/UniswapV2OracleLibrary.sol\";\nimport \"../token/YAMTokenInterface.sol\";\n\n\ncontract Rebaser {\n\n using SafeMath for uint256;\n\n modifier onlyGov() {\n require(msg.sender == gov);\n _;\n }\n\n struct Transaction {\n bool enabled;\n address destination;\n bytes data;\n }\n\n struct UniVars {\n uint256 yamsToUni;\n uint256 amountFromReserves;\n uint256 mintToReserves;\n }\n\n event TransactionFailed(address indexed destination, uint index, bytes data);\n\n event NewMaxSlippageFactor(uint256 oldSlippageFactor, uint256 newSlippageFactor);\n\n event NewDeviationThreshold(uint256 oldDeviationThreshold, uint256 newDeviationThreshold);\n\n /**\n * @notice Sets the treasury mint percentage of rebase\n */\n event NewRebaseMintPercent(uint256 oldRebaseMintPerc, uint256 newRebaseMintPerc);\n\n\n /**\n * @notice Sets the reserve contract\n */\n event NewReserveContract(address oldReserveContract, address newReserveContract);\n\n /**\n * @notice Sets the reserve contract\n */\n event TreasuryIncreased(uint256 reservesAdded, uint256 yamsSold, uint256 yamsFromReserves, uint256 yamsToReserves);\n\n\n /**\n * @notice Event emitted when pendingGov is changed\n */\n event NewPendingGov(address oldPendingGov, address newPendingGov);\n\n /**\n * @notice Event emitted when gov is changed\n */\n event NewGov(address oldGov, address newGov);\n\n // Stable ordering is not guaranteed.\n Transaction[] public transactions;\n\n\n /// @notice Governance address\n address public gov;\n\n /// @notice Pending Governance address\n address public pendingGov;\n\n // Spreads out getting to the target price\n uint256 public rebaseLag;\n\n // Peg target\n uint256 public targetRate;\n\n // Percent of rebase that goes to minting for treasury building\n uint256 public rebaseMintPerc;\n\n // If the current exchange rate is within this fractional distance from the target, no supply\n // update is performed. Fixed point number--same format as the rate.\n // (ie) abs(rate - targetRate) / targetRate < deviationThreshold, then no supply change.\n // DECIMALS Fixed point number.\n uint256 public deviationThreshold;\n\n // More than this much time must pass between rebase operations.\n uint256 public minRebaseTimeIntervalSec;\n\n // Block timestamp of last rebase operation\n uint256 public lastRebaseTimestampSec;\n\n // The rebase window begins this many seconds into the minRebaseTimeInterval period.\n // For example if minRebaseTimeInterval is 24hrs, it represents the time of day in seconds.\n uint256 public rebaseWindowOffsetSec;\n\n // The length of the time window where a rebase operation is allowed to execute, in seconds.\n uint256 public rebaseWindowLengthSec;\n\n // The number of rebase cycles since inception\n uint256 public epoch;\n\n // rebasing is not active initially. It can be activated at T+12 hours from\n // deployment time\n bool public rebasingActive;\n\n // delays rebasing activation to facilitate liquidity\n uint256 public constant rebaseDelay = 12 hours;\n\n // Time of TWAP initialization\n uint256 public timeOfTWAPInit;\n\n // YAM token address\n address public yamAddress;\n\n // reserve token\n address public reserveToken;\n\n // Reserves vault contract\n address public reservesContract;\n\n // pair for reserveToken <> YAM\n address public uniswap_pair;\n\n // last TWAP update time\n uint32 private blockTimestampLast;\n\n // last TWAP cumulative price;\n uint256 public priceCumulativeLast;\n\n // Max slippage factor when buying reserve token. Magic number based on\n // the fact that uniswap is a constant product. Therefore,\n // targeting a % max slippage can be achieved by using a single precomputed\n // number. i.e. 2.5% slippage is always equal to some f(maxSlippageFactor, reserves)\n uint256 public maxSlippageFactor;\n\n // This token is first in uniswap YAM<>Reserve pair\n bool public isToken0;\n\n constructor(\n address yamAddress_,\n address reserveToken_,\n address uniswap_factory,\n address reservesContract_\n )\n public\n {\n minRebaseTimeIntervalSec = 12 hours;\n rebaseWindowOffsetSec = 36000;\n reservesContract = reservesContract_;\n (address token0, address token1) = sortTokens(yamAddress_, reserveToken_);\n\n // used for interacting with uniswap\n if (token0 == yamAddress_) {\n isToken0 = true;\n } else {\n isToken0 = false;\n }\n // uniswap YAM<>Reserve pair\n uniswap_pair = pairFor(uniswap_factory, token0, token1);\n\n // Reserves contract is mutable\n reservesContract = reservesContract_;\n\n // Reserve token is not mutable. Must deploy a new rebaser to update it\n reserveToken = reserveToken_;\n\n yamAddress = yamAddress_;\n\n /* pendingGov = gov_; */\n\n // target 10% slippage\n maxSlippageFactor = 5409258 * 10**10;\n\n // 1 YCRV\n targetRate = 10**18;\n\n // twice daily rebase, with targeting reaching peg in 5 days\n rebaseLag = 10;\n\n // 10%\n rebaseMintPerc = 10**17;\n\n // 5%\n deviationThreshold = 5 * 10**16;\n\n // 15 minutes\n rebaseWindowLengthSec = 60 * 15;\n\n gov = msg.sender;\n\n }\n\n /** @notice Updates slippage factor\n *\n */\n function setMaxSlippageFactor(uint256 maxSlippageFactor_)\n public\n onlyGov\n {\n uint256 oldSlippageFactor = maxSlippageFactor_;\n maxSlippageFactor = maxSlippageFactor_;\n emit NewMaxSlippageFactor(oldSlippageFactor, maxSlippageFactor_);\n }\n\n /** @notice Updates slippage factor\n *\n */\n function setRebaseMintPerc(uint256 rebaseMintPerc_)\n public\n onlyGov\n {\n uint256 oldPerc = rebaseMintPerc_;\n rebaseMintPerc = rebaseMintPerc_;\n emit NewRebaseMintPercent(oldPerc, rebaseMintPerc_);\n }\n\n\n /** @notice Updates reserve contract\n *\n */\n function setReserveContract(address reservesContract_)\n public\n onlyGov\n {\n address oldReservesContract = reservesContract;\n reservesContract = reservesContract_;\n emit NewReserveContract(oldReservesContract, reservesContract_);\n }\n\n\n /** @notice sets the pendingGov\n * @param pendingGov_ The address of the rebaser contract to use for authentication.\n */\n function _setPendingGov(address pendingGov_)\n external\n onlyGov\n {\n address oldPendingGov = pendingGov;\n pendingGov = pendingGov_;\n emit NewPendingGov(oldPendingGov, pendingGov_);\n }\n\n /** @notice lets msg.sender accept governance\n *\n */\n function _acceptGov()\n external\n {\n require(msg.sender == pendingGov, \"!pending\");\n address oldGov = gov;\n gov = pendingGov;\n pendingGov = address(0);\n emit NewGov(oldGov, gov);\n }\n\n /** @notice Initializes TWAP start point, starts countdown to first rebase\n *\n */\n function init_twap()\n public\n {\n require(timeOfTWAPInit == 0, \"already activated\");\n (uint priceCumulative, uint32 blockTimestamp) =\n UniswapV2OracleLibrary.currentCumulativePrices(uniswap_pair, isToken0);\n require(blockTimestamp > 0, \"no trades\");\n blockTimestampLast = blockTimestamp;\n priceCumulativeLast = priceCumulative;\n timeOfTWAPInit = blockTimestamp;\n }\n\n /** @notice Activates rebasing\n * @dev One way function, cannot be undone, callable by anyone\n */\n function activate_rebasing()\n public\n {\n require(timeOfTWAPInit > 0, \"twap wasnt intitiated, call init_twap()\");\n // cannot enable prior to end of rebaseDelay\n require(now >= timeOfTWAPInit + rebaseDelay, \"!end_delay\");\n // sanity check in case liquidity hasn't entered or no trades\n require(UniswapPair(uniswap_pair).price0CumulativeLast() > 0, \"!liquid\");\n // init price\n\n rebasingActive = true;\n }\n\n /**\n * @notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n *\n * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag\n * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n * and targetRate is CpiOracleRate / baseCpi\n */\n function rebase()\n public\n {\n require(inRebaseWindow());\n\n // This comparison also ensures there is no reentrancy.\n require(lastRebaseTimestampSec.add(minRebaseTimeIntervalSec) < now);\n\n // Snap the rebase time to the start of this window.\n lastRebaseTimestampSec = now.sub(\n now.mod(minRebaseTimeIntervalSec)).add(rebaseWindowOffsetSec);\n\n epoch = epoch.add(1);\n\n // get twap from uniswap v2;\n uint256 exchangeRate = getTWAP();\n\n // calculates % change to supply\n (uint256 offPegPerc, bool positive) = computeOffPegPerc(exchangeRate);\n\n uint256 indexDelta = offPegPerc;\n // Apply the Dampening factor.\n indexDelta = indexDelta.div(rebaseLag);\n\n YAMTokenInterface yam = YAMTokenInterface(yamAddress);\n\n // cap to max scaling\n if (positive && yam.yamsScalingFactor() + indexDelta < yam.maxScalingFactor()) {\n indexDelta = yam.maxScalingFactor() - yam.yamsScalingFactor();\n }\n\n\n uint256 currSupply = yam.totalSupply();\n\n uint256 mintAmount;\n // reduce indexDelta to account for minting\n if (positive) {\n uint256 mintPerc = indexDelta.mul(rebaseMintPerc).div(10**18);\n indexDelta = indexDelta.sub(mintPerc);\n mintAmount = currSupply.mul(mintPerc).div(10**18);\n }\n\n\n // rebase\n uint256 supplyAfterRebase = yam.rebase(epoch, indexDelta, positive);\n assert(yam.yamsScalingFactor() <= yam.maxScalingFactor());\n\n // perform actions after rebase\n afterRebase(mintAmount, offPegPerc);\n }\n\n\n function uniswapV2Call(\n address sender,\n uint256 amount0,\n uint256 amount1,\n bytes memory data\n )\n public\n {\n // enforce that it is coming from uniswap\n require(msg.sender == uniswap_pair, \"bad msg.sender\");\n // enforce that this contract called uniswap\n require(sender == address(this), \"bad origin\");\n (UniVars memory uniVars) = abi.decode(data, (UniVars));\n\n YAMTokenInterface yam = YAMTokenInterface(yamAddress);\n\n if (uniVars.amountFromReserves > 0) {\n // transfer from reserves and mint to uniswap\n yam.transferFrom(reservesContract, uniswap_pair, uniVars.amountFromReserves);\n yam.mint(uniswap_pair, uniVars.yamsToUni - uniVars.amountFromReserves);\n } else {\n // mint to uniswap\n yam.mint(uniswap_pair, uniVars.yamsToUni);\n }\n\n // mint unsold to reserves\n if (uniVars.mintToReserves > 0) {\n yam.mint(reservesContract, uniVars.mintToReserves);\n }\n\n // transfer reserve token to reserves\n if (isToken0) {\n SafeERC20.safeTransfer(IERC20(reserveToken), reservesContract, amount1);\n emit TreasuryIncreased(amount1, uniVars.yamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves);\n } else {\n SafeERC20.safeTransfer(IERC20(reserveToken), reservesContract, amount0);\n emit TreasuryIncreased(amount0, uniVars.yamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves);\n }\n\n\n }\n\n function buyReserveAndTransfer(\n uint256 mintAmount,\n uint256 offPegPerc\n )\n internal\n {\n UniswapPair pair = UniswapPair(uniswap_pair);\n\n pair.sync();\n\n YAMTokenInterface yam = YAMTokenInterface(yamAddress);\n\n // get reserves\n (uint256 token0Reserves, uint256 token1Reserves, ) = pair.getReserves();\n\n // check if protocol has excess yam in the reserve\n uint256 excess = yam.balanceOf(reservesContract);\n\n\n uint256 tokens_to_max_slippage = uniswapMaxSlippage(token0Reserves, token1Reserves, offPegPerc);\n\n UniVars memory uniVars = UniVars({\n yamsToUni: tokens_to_max_slippage,\n amountFromReserves: excess,\n mintToReserves: 0\n });\n\n // tries to sell all mint + excess\n // falls back to selling some of mint and all of excess\n // sells portion of excess\n if (isToken0) {\n if (tokens_to_max_slippage > mintAmount + excess) {\n // can handle all of reserves and mint\n uint256 buyTokens = getAmountOut(mintAmount + excess, token0Reserves, token1Reserves);\n uniVars.yamsToUni = mintAmount + excess;\n uniVars.amountFromReserves = excess;\n // call swap using entire mint amount and excess; mint 0 to reserves\n pair.swap(0, buyTokens, address(this), abi.encode(uniVars));\n } else {\n if (tokens_to_max_slippage > excess) {\n // uniswap can handle entire reserves\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token0Reserves, token1Reserves);\n\n // swap up to slippage limit, taking entire yam reserves, and minting part of total\n uniVars.mintToReserves = mintAmount - (tokens_to_max_slippage - excess);\n pair.swap(0, buyTokens, address(this), abi.encode(uniVars));\n } else {\n // uniswap cant handle all of excess\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token0Reserves, token1Reserves);\n uniVars.amountFromReserves = tokens_to_max_slippage;\n uniVars.mintToReserves = mintAmount;\n // swap up to slippage limit, taking excess - remainingExcess from reserves, and minting full amount\n // to reserves\n pair.swap(0, buyTokens, address(this), abi.encode(uniVars));\n }\n }\n } else {\n if (tokens_to_max_slippage > mintAmount + excess) {\n // can handle all of reserves and mint\n uint256 buyTokens = getAmountOut(mintAmount + excess, token1Reserves, token0Reserves);\n uniVars.yamsToUni = mintAmount + excess;\n uniVars.amountFromReserves = excess;\n // call swap using entire mint amount and excess; mint 0 to reserves\n pair.swap(buyTokens, 0, address(this), abi.encode(uniVars));\n } else {\n if (tokens_to_max_slippage > excess) {\n // uniswap can handle entire reserves\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token1Reserves, token0Reserves);\n // swap up to slippage limit, taking entire yam reserves, and minting part of total\n uniVars.mintToReserves = mintAmount - (tokens_to_max_slippage - excess);\n\n // swap up to slippage limit, taking entire yam reserves, and minting part of total\n pair.swap(buyTokens, 0, address(this), abi.encode(uniVars));\n } else {\n // uniswap cant handle all of excess\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token1Reserves, token0Reserves);\n uniVars.amountFromReserves = tokens_to_max_slippage;\n uniVars.mintToReserves = mintAmount;\n // swap up to slippage limit, taking excess - remainingExcess from reserves, and minting full amount\n // to reserves\n pair.swap(buyTokens, 0, address(this), abi.encode(uniVars));\n }\n }\n }\n }\n\n function uniswapMaxSlippage(\n uint256 token0,\n uint256 token1,\n uint256 offPegPerc\n )\n internal\n returns (uint256)\n {\n if (isToken0) {\n if (offPegPerc > maxSlippageFactor) {\n // cap slippage\n return token0.mul(maxSlippageFactor).div(10**18);\n } else {\n // in the 5-10% off peg range, slippage is essentially 2*x (where x is percentage of pool to buy).\n // all we care about is not pushing below the peg, so underestimate\n // the amount we can sell by dividing by 3. resulting price impact\n // should be ~= offPegPerc * 2 / 3, which will keep us above the peg\n return token0.mul(offPegPerc / 3).div(10**18);\n }\n } else {\n if (offPegPerc > maxSlippageFactor) {\n return token1.mul(maxSlippageFactor).div(10**18);\n } else {\n return token1.mul(offPegPerc / 3).div(10**18);\n }\n }\n }\n\n // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n function getAmountOut(\n uint amountIn,\n uint reserveIn,\n uint reserveOut\n )\n internal\n pure\n returns (uint amountOut)\n {\n require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\n uint amountInWithFee = amountIn.mul(997);\n uint numerator = amountInWithFee.mul(reserveOut);\n uint denominator = reserveIn.mul(1000).add(amountInWithFee);\n amountOut = numerator / denominator;\n }\n\n\n function afterRebase(\n uint256 mintAmount,\n uint256 indexDelta\n )\n internal\n {\n if (mintAmount > 0) {\n buyReserveAndTransfer(\n mintAmount,\n indexDelta\n );\n }\n\n for (uint i = 0; i < transactions.length; i++) {\n Transaction storage t = transactions[i];\n if (t.enabled) {\n bool result =\n externalCall(t.destination, t.data);\n if (!result) {\n emit TransactionFailed(t.destination, i, t.data);\n revert(\"Transaction Failed\");\n }\n }\n }\n }\n\n\n /**\n * @notice Calculates TWAP from uniswap\n *\n * @dev When liquidity is low, this can be manipulated by an end of block -> next block\n * attack. We delay the activation of rebases 12 hours after liquidity incentives\n * to reduce this attack vector. Additional there is very little supply\n * to be able to manipulate this during that time period of highest vuln.\n */\n function getTWAP()\n internal\n returns (uint256)\n {\n (uint priceCumulative, uint32 blockTimestamp) =\n UniswapV2OracleLibrary.currentCumulativePrices(uniswap_pair, isToken0);\n uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired\n\n // no period check as is done in isRebaseWindow\n\n // overflow is desired, casting never truncates\n // cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed\n FixedPoint.uq112x112 memory priceAverage = FixedPoint.uq112x112(uint224((priceCumulative - priceCumulativeLast) / timeElapsed));\n\n priceCumulativeLast = priceCumulative;\n blockTimestampLast = blockTimestamp;\n\n return FixedPoint.decode(priceAverage);\n }\n\n /**\n * @notice Sets the deviation threshold fraction. If the exchange rate given by the market\n * oracle is within this fractional distance from the targetRate, then no supply\n * modifications are made. DECIMALS fixed point number.\n * @param deviationThreshold_ The new exchange rate threshold fraction.\n */\n function setDeviationThreshold(uint256 deviationThreshold_)\n external\n onlyGov\n {\n require(deviationThreshold > 0);\n uint256 oldDeviationThreshold = deviationThreshold;\n deviationThreshold = deviationThreshold_;\n emit NewDeviationThreshold(oldDeviationThreshold, deviationThreshold_);\n }\n\n /**\n * @notice Sets the rebase lag parameter.\n It is used to dampen the applied supply adjustment by 1 / rebaseLag\n If the rebase lag R, equals 1, the smallest value for R, then the full supply\n correction is applied on each rebase cycle.\n If it is greater than 1, then a correction of 1/R of is applied on each rebase.\n * @param rebaseLag_ The new rebase lag parameter.\n */\n function setRebaseLag(uint256 rebaseLag_)\n external\n onlyGov\n {\n require(rebaseLag_ > 0);\n rebaseLag = rebaseLag_;\n }\n\n /**\n * @notice Sets the targetRate parameter.\n * @param targetRate_ The new target rate parameter.\n */\n function setTargetRate(uint256 targetRate_)\n external\n onlyGov\n {\n require(targetRate_ > 0);\n targetRate = targetRate_;\n }\n\n /**\n * @notice Sets the parameters which control the timing and frequency of\n * rebase operations.\n * a) the minimum time period that must elapse between rebase cycles.\n * b) the rebase window offset parameter.\n * c) the rebase window length parameter.\n * @param minRebaseTimeIntervalSec_ More than this much time must pass between rebase\n * operations, in seconds.\n * @param rebaseWindowOffsetSec_ The number of seconds from the beginning of\n the rebase interval, where the rebase window begins.\n * @param rebaseWindowLengthSec_ The length of the rebase window in seconds.\n */\n function setRebaseTimingParameters(\n uint256 minRebaseTimeIntervalSec_,\n uint256 rebaseWindowOffsetSec_,\n uint256 rebaseWindowLengthSec_)\n external\n onlyGov\n {\n require(minRebaseTimeIntervalSec_ > 0);\n require(rebaseWindowOffsetSec_ < minRebaseTimeIntervalSec_);\n\n minRebaseTimeIntervalSec = minRebaseTimeIntervalSec_;\n rebaseWindowOffsetSec = rebaseWindowOffsetSec_;\n rebaseWindowLengthSec = rebaseWindowLengthSec_;\n }\n\n /**\n * @return If the latest block timestamp is within the rebase time window it, returns true.\n * Otherwise, returns false.\n */\n function inRebaseWindow() public view returns (bool) {\n\n // rebasing is delayed until there is a liquid market\n if (!rebasingActive) {\n return false;\n }\n\n return (\n now.mod(minRebaseTimeIntervalSec) >= rebaseWindowOffsetSec\n && now.mod(minRebaseTimeIntervalSec) < (rebaseWindowOffsetSec.add(rebaseWindowLengthSec))\n\n );\n }\n\n /**\n * @return Computes in % how far off market is from peg\n */\n function computeOffPegPerc(uint256 rate)\n private\n view\n returns (uint256, bool)\n {\n if (withinDeviationThreshold(rate)) {\n return (0, false);\n }\n\n // indexDelta = (rate - targetRate) / targetRate\n if (rate > targetRate) {\n return (rate.sub(targetRate).mul(10**18).div(targetRate), true);\n } else {\n return (targetRate.sub(rate).mul(10**18).div(targetRate), false);\n }\n }\n\n /**\n * @param rate The current exchange rate, an 18 decimal fixed point number.\n * @return If the rate is within the deviation threshold from the target rate, returns true.\n * Otherwise, returns false.\n */\n function withinDeviationThreshold(uint256 rate)\n private\n view\n returns (bool)\n {\n uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold)\n .div(10 ** 18);\n\n return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold)\n || (rate < targetRate && targetRate.sub(rate) < absoluteDeviationThreshold);\n }\n\n /* - Constructor Helpers - */\n\n // calculates the CREATE2 address for a pair without making any external calls\n function pairFor(\n address factory,\n address token0,\n address token1\n )\n internal\n pure\n returns (address pair)\n {\n pair = address(uint(keccak256(abi.encodePacked(\n hex'ff',\n factory,\n keccak256(abi.encodePacked(token0, token1)),\n hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash\n ))));\n }\n\n // returns sorted token addresses, used to handle return values from pairs sorted in this order\n function sortTokens(\n address tokenA,\n address tokenB\n )\n internal\n pure\n returns (address token0, address token1)\n {\n require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');\n }\n\n /* -- Rebase helpers -- */\n\n /**\n * @notice Adds a transaction that gets called for a downstream receiver of rebases\n * @param destination Address of contract destination\n * @param data Transaction data payload\n */\n function addTransaction(address destination, bytes calldata data)\n external\n onlyGov\n {\n transactions.push(Transaction({\n enabled: true,\n destination: destination,\n data: data\n }));\n }\n\n\n /**\n * @param index Index of transaction to remove.\n * Transaction ordering may have changed since adding.\n */\n function removeTransaction(uint index)\n external\n onlyGov\n {\n require(index < transactions.length, \"index out of bounds\");\n\n if (index < transactions.length - 1) {\n transactions[index] = transactions[transactions.length - 1];\n }\n\n transactions.length--;\n }\n\n /**\n * @param index Index of transaction. Transaction ordering may have changed since adding.\n * @param enabled True for enabled, false for disabled.\n */\n function setTransactionEnabled(uint index, bool enabled)\n external\n onlyGov\n {\n require(index < transactions.length, \"index must be in range of stored tx list\");\n transactions[index].enabled = enabled;\n }\n\n /**\n * @dev wrapper to call the encoded transactions on downstream consumers.\n * @param destination Address of destination contract.\n * @param data The encoded data payload.\n * @return True on success\n */\n function externalCall(address destination, bytes memory data)\n internal\n returns (bool)\n {\n bool result;\n assembly { // solhint-disable-line no-inline-assembly\n // \"Allocate\" memory for output\n // (0x40 is where \"free memory\" pointer is stored by convention)\n let outputAddress := mload(0x40)\n\n // First 32 bytes are the padded length of data, so exclude that\n let dataAddress := add(data, 32)\n\n result := call(\n // 34710 is the value that solidity is currently emitting\n // It includes callGas (700) + callVeryLow (3, to pay for SUB)\n // + callValueTransferGas (9000) + callNewAccountGas\n // (25000, in case the destination address does not exist and needs creating)\n sub(gas, 34710),\n\n\n destination,\n 0, // transfer value in wei\n dataAddress,\n mload(data), // Size of the input, in bytes. Stored in position 0 of the array.\n outputAddress,\n 0 // Output is ignored, therefore the output size is zero\n )\n }\n return result;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol", - "exportedSymbols": { - "Rebaser": [ - 8597 - ] - }, - "id": 8598, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6911, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:14" - }, - { - "id": 6912, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:14" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 6913, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6604, - "src": "59:30:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 6914, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6791, - "src": "90:29:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "file": "../lib/IUniswapV2Pair.sol", - "id": 6915, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6399, - "src": "120:35:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol", - "file": "../lib/UniswapV2OracleLibrary.sol", - "id": 6916, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6910, - "src": "156:43:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 6917, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 10714, - "src": "200:40:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8597, - "linearizedBaseContracts": [ - 8597 - ], - "name": "Rebaser", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6920, - "libraryName": { - "contractScope": null, - "id": 6918, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6790, - "src": "273:8:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$6790", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "267:27:14", - "typeName": { - "id": 6919, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "286:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "body": { - "id": 6930, - "nodeType": "Block", - "src": "319:54:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6923, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "337:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "337:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6925, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "351:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "337:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 6922, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "329:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 6927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "329:26:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6928, - "nodeType": "ExpressionStatement", - "src": "329:26:14" - }, - { - "id": 6929, - "nodeType": "PlaceholderStatement", - "src": "365:1:14" - } - ] - }, - "documentation": null, - "id": 6931, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6921, - "nodeType": "ParameterList", - "parameters": [], - "src": "316:2:14" - }, - "src": "300:73:14", - "visibility": "internal" - }, - { - "canonicalName": "Rebaser.Transaction", - "id": 6938, - "members": [ - { - "constant": false, - "id": 6933, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 6938, - "src": "408:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6932, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "408:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6935, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 6938, - "src": "430:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6934, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "430:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6937, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6938, - "src": "459:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6936, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "459:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Transaction", - "nodeType": "StructDefinition", - "scope": 8597, - "src": "379:97:14", - "visibility": "public" - }, - { - "canonicalName": "Rebaser.UniVars", - "id": 6945, - "members": [ - { - "constant": false, - "id": 6940, - "name": "yamsToUni", - "nodeType": "VariableDeclaration", - "scope": 6945, - "src": "505:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6939, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "505:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6942, - "name": "amountFromReserves", - "nodeType": "VariableDeclaration", - "scope": 6945, - "src": "530:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6941, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "530:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6944, - "name": "mintToReserves", - "nodeType": "VariableDeclaration", - "scope": 6945, - "src": "564:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "564:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "UniVars", - "nodeType": "StructDefinition", - "scope": 8597, - "src": "482:111:14", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6953, - "name": "TransactionFailed", - "nodeType": "EventDefinition", - "parameters": { - "id": 6952, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6947, - "indexed": true, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 6953, - "src": "623:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6946, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "623:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6949, - "indexed": false, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 6953, - "src": "652:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6948, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "652:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6951, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6953, - "src": "664:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6950, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "664:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "622:53:14" - }, - "src": "599:77:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 6959, - "name": "NewMaxSlippageFactor", - "nodeType": "EventDefinition", - "parameters": { - "id": 6958, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6955, - "indexed": false, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 6959, - "src": "709:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6954, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "709:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6957, - "indexed": false, - "name": "newSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 6959, - "src": "736:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6956, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "736:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "708:54:14" - }, - "src": "682:81:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 6965, - "name": "NewDeviationThreshold", - "nodeType": "EventDefinition", - "parameters": { - "id": 6964, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6961, - "indexed": false, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 6965, - "src": "797:29:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6960, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "797:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6963, - "indexed": false, - "name": "newDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 6965, - "src": "828:29:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6962, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "828:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "796:62:14" - }, - "src": "769:90:14" - }, - { - "anonymous": false, - "documentation": "@notice Sets the treasury mint percentage of rebase", - "id": 6971, - "name": "NewRebaseMintPercent", - "nodeType": "EventDefinition", - "parameters": { - "id": 6970, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6967, - "indexed": false, - "name": "oldRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 6971, - "src": "967:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6966, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "967:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6969, - "indexed": false, - "name": "newRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 6971, - "src": "994:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6968, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "994:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "966:54:14" - }, - "src": "940:81:14" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 6977, - "name": "NewReserveContract", - "nodeType": "EventDefinition", - "parameters": { - "id": 6976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6973, - "indexed": false, - "name": "oldReserveContract", - "nodeType": "VariableDeclaration", - "scope": 6977, - "src": "1110:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1110:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6975, - "indexed": false, - "name": "newReserveContract", - "nodeType": "VariableDeclaration", - "scope": 6977, - "src": "1138:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6974, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1138:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1109:56:14" - }, - "src": "1085:81:14" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 6987, - "name": "TreasuryIncreased", - "nodeType": "EventDefinition", - "parameters": { - "id": 6986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6979, - "indexed": false, - "name": "reservesAdded", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1253:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1253:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6981, - "indexed": false, - "name": "yamsSold", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1276:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6980, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1276:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6983, - "indexed": false, - "name": "yamsFromReserves", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1294:24:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6982, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1294:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6985, - "indexed": false, - "name": "yamsToReserves", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1320:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6984, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1320:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1252:91:14" - }, - "src": "1229:115:14" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 6993, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 6992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6989, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 6993, - "src": "1443:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1443:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6991, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 6993, - "src": "1466:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1466:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1442:46:14" - }, - "src": "1423:66:14" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 6999, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 6998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6995, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 6999, - "src": "1573:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6994, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1573:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6997, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 6999, - "src": "1589:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1589:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1572:32:14" - }, - "src": "1560:45:14" - }, - { - "constant": false, - "id": 7002, - "name": "transactions", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1653:33:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction[]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 7000, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6938, - "src": "1653:11:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction" - } - }, - "id": 7001, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1653:13:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage_ptr", - "typeString": "struct Rebaser.Transaction[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7004, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1729:18:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7003, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1729:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7006, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1797:25:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7005, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1797:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7008, - "name": "rebaseLag", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1876:24:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7007, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1876:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7010, - "name": "targetRate", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1925:25:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1925:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7012, - "name": "rebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2025:29:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7011, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2025:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7014, - "name": "deviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2361:33:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2361:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7016, - "name": "minRebaseTimeIntervalSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2470:39:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7015, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2470:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7018, - "name": "lastRebaseTimestampSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2564:37:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7017, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2564:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7020, - "name": "rebaseWindowOffsetSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2793:36:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7019, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2793:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7022, - "name": "rebaseWindowLengthSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2933:36:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7021, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2933:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7024, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3027:20:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7023, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3027:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7026, - "name": "rebasingActive", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3157:26:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7025, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3157:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 7029, - "name": "rebaseDelay", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3248:46:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7027, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3248:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3132", - "id": 7028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3286:8:14", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7031, - "name": "timeOfTWAPInit", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3336:29:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7030, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3336:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7033, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3397:25:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3397:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7035, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3450:27:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7034, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3450:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7037, - "name": "reservesContract", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3515:31:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7036, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3515:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7039, - "name": "uniswap_pair", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3589:27:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3589:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7041, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3652:33:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 7040, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3652:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 7043, - "name": "priceCumulativeLast", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3727:34:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7042, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3727:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7045, - "name": "maxSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "4076:32:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4076:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7047, - "name": "isToken0", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "4171:20:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7046, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4171:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 7156, - "nodeType": "Block", - "src": "4363:1245:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7058, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "4375:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3132", - "id": 7059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4402:8:14", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "src": "4375:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7061, - "nodeType": "ExpressionStatement", - "src": "4375:35:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7062, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "4422:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3336303030", - "id": 7063, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4446:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_36000_by_1", - "typeString": "int_const 36000" - }, - "value": "36000" - }, - "src": "4422:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7065, - "nodeType": "ExpressionStatement", - "src": "4422:29:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7066, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "4463:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7067, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7055, - "src": "4482:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4463:36:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7069, - "nodeType": "ExpressionStatement", - "src": "4463:36:14" - }, - { - "assignments": [ - 7071, - 7073 - ], - "declarations": [ - { - "constant": false, - "id": 7071, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 7156, - "src": "4512:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7070, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4512:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7073, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 7156, - "src": "4528:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7072, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4528:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7078, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7075, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7049, - "src": "4557:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7076, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7051, - "src": "4570:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7074, - "name": "sortTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8495, - "src": "4546:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$_t_address_$_t_address_$", - "typeString": "function (address,address) pure returns (address,address)" - } - }, - "id": 7077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4546:38:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4511:73:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7079, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7071, - "src": "4648:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7080, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7049, - "src": "4658:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4648:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7091, - "nodeType": "Block", - "src": "4721:45:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7087, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "4737:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 7088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4748:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4737:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7090, - "nodeType": "ExpressionStatement", - "src": "4737:16:14" - } - ] - }, - "id": 7092, - "nodeType": "IfStatement", - "src": "4644:122:14", - "trueBody": { - "id": 7086, - "nodeType": "Block", - "src": "4671:44:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7082, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "4687:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 7083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4698:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "4687:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7085, - "nodeType": "ExpressionStatement", - "src": "4687:15:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 7099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7093, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "4816:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7095, - "name": "uniswap_factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7053, - "src": "4839:15:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7096, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7071, - "src": "4856:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7097, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7073, - "src": "4864:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7094, - "name": "pairFor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8452, - "src": "4831:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_address_$returns$_t_address_$", - "typeString": "function (address,address,address) pure returns (address)" - } - }, - "id": 7098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4831:40:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4816:55:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7100, - "nodeType": "ExpressionStatement", - "src": "4816:55:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7101, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "4926:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7102, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7055, - "src": "4945:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4926:36:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7104, - "nodeType": "ExpressionStatement", - "src": "4926:36:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7105, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7035, - "src": "5057:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7106, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7051, - "src": "5072:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5057:28:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7108, - "nodeType": "ExpressionStatement", - "src": "5057:28:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7109, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "5098:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7110, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7049, - "src": "5111:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5098:24:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7112, - "nodeType": "ExpressionStatement", - "src": "5098:24:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7113, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "5204:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - }, - "id": 7118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35343039323538", - "id": 7114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5224:7:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5409258_by_1", - "typeString": "int_const 5409258" - }, - "value": "5409258" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - }, - "id": 7117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5234:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5238:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5234:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - } - }, - "src": "5224:16:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - } - }, - "src": "5204:36:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7120, - "nodeType": "ExpressionStatement", - "src": "5204:36:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7121, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "5273:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5286:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5290:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "5286:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "5273:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7126, - "nodeType": "ExpressionStatement", - "src": "5273:19:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7127, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7008, - "src": "5376:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5388:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5376:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7130, - "nodeType": "ExpressionStatement", - "src": "5376:14:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7131, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7012, - "src": "5420:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 7134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5437:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 7133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5441:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "5437:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "5420:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7136, - "nodeType": "ExpressionStatement", - "src": "5420:23:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7137, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "5472:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - }, - "id": 7142, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 7138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5493:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - }, - "id": 7141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5497:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3136", - "id": 7140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5501:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_16_by_1", - "typeString": "int_const 16" - }, - "value": "16" - }, - "src": "5497:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - } - }, - "src": "5493:10:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - } - }, - "src": "5472:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7144, - "nodeType": "ExpressionStatement", - "src": "5472:31:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7145, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7022, - "src": "5540:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_900_by_1", - "typeString": "int_const 900" - }, - "id": 7148, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 7146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5564:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 7147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5569:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "src": "5564:7:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_900_by_1", - "typeString": "int_const 900" - } - }, - "src": "5540:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7150, - "nodeType": "ExpressionStatement", - "src": "5540:31:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7151, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "5584:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7152, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "5590:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5590:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5584:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7155, - "nodeType": "ExpressionStatement", - "src": "5584:16:14" - } - ] - }, - "documentation": null, - "id": 7157, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7056, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7049, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4219:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7048, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4219:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7051, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4248:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7050, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4248:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7053, - "name": "uniswap_factory", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4279:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7052, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4279:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7055, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4312:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7054, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4312:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4209:134:14" - }, - "returnParameters": { - "id": 7057, - "nodeType": "ParameterList", - "parameters": [], - "src": "4363:0:14" - }, - "scope": 8597, - "src": "4198:1410:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7177, - "nodeType": "Block", - "src": "5760:185:14", - "statements": [ - { - "assignments": [ - 7165 - ], - "declarations": [ - { - "constant": false, - "id": 7165, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 7177, - "src": "5770:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5770:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7167, - "initialValue": { - "argumentTypes": null, - "id": 7166, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7159, - "src": "5798:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5770:46:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7168, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "5826:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7169, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7159, - "src": "5846:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5826:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7171, - "nodeType": "ExpressionStatement", - "src": "5826:38:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7173, - "name": "oldSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7165, - "src": "5900:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7174, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7159, - "src": "5919:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7172, - "name": "NewMaxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6959, - "src": "5879:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 7175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5879:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7176, - "nodeType": "EmitStatement", - "src": "5874:64:14" - } - ] - }, - "documentation": "@notice Updates slippage factor\n ", - "id": 7178, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7162, - "modifierName": { - "argumentTypes": null, - "id": 7161, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "5748:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "5748:7:14" - } - ], - "name": "setMaxSlippageFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7159, - "name": "maxSlippageFactor_", - "nodeType": "VariableDeclaration", - "scope": 7178, - "src": "5697:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5697:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5696:28:14" - }, - "returnParameters": { - "id": 7163, - "nodeType": "ParameterList", - "parameters": [], - "src": "5760:0:14" - }, - "scope": 8597, - "src": "5667:278:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7198, - "nodeType": "Block", - "src": "6091:153:14", - "statements": [ - { - "assignments": [ - 7186 - ], - "declarations": [ - { - "constant": false, - "id": 7186, - "name": "oldPerc", - "nodeType": "VariableDeclaration", - "scope": 7198, - "src": "6101:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7185, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6101:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7188, - "initialValue": { - "argumentTypes": null, - "id": 7187, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7180, - "src": "6119:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6101:33:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7189, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7012, - "src": "6144:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7190, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7180, - "src": "6161:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6144:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7192, - "nodeType": "ExpressionStatement", - "src": "6144:32:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7194, - "name": "oldPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7186, - "src": "6212:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7195, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7180, - "src": "6221:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7193, - "name": "NewRebaseMintPercent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6971, - "src": "6191:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 7196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6191:46:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7197, - "nodeType": "EmitStatement", - "src": "6186:51:14" - } - ] - }, - "documentation": "@notice Updates slippage factor\n ", - "id": 7199, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7183, - "modifierName": { - "argumentTypes": null, - "id": 7182, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "6079:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6079:7:14" - } - ], - "name": "setRebaseMintPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7181, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7180, - "name": "rebaseMintPerc_", - "nodeType": "VariableDeclaration", - "scope": 7199, - "src": "6031:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6031:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6030:25:14" - }, - "returnParameters": { - "id": 7184, - "nodeType": "ParameterList", - "parameters": [], - "src": "6091:0:14" - }, - "scope": 8597, - "src": "6004:240:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7219, - "nodeType": "Block", - "src": "6395:182:14", - "statements": [ - { - "assignments": [ - 7207 - ], - "declarations": [ - { - "constant": false, - "id": 7207, - "name": "oldReservesContract", - "nodeType": "VariableDeclaration", - "scope": 7219, - "src": "6405:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7206, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6405:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7209, - "initialValue": { - "argumentTypes": null, - "id": 7208, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "6435:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6405:46:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7210, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "6461:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7211, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7201, - "src": "6480:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6461:36:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7213, - "nodeType": "ExpressionStatement", - "src": "6461:36:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7215, - "name": "oldReservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7207, - "src": "6531:19:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7216, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7201, - "src": "6552:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7214, - "name": "NewReserveContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6977, - "src": "6512:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6512:58:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7218, - "nodeType": "EmitStatement", - "src": "6507:63:14" - } - ] - }, - "documentation": "@notice Updates reserve contract\n ", - "id": 7220, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7204, - "modifierName": { - "argumentTypes": null, - "id": 7203, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "6383:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6383:7:14" - } - ], - "name": "setReserveContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7202, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7201, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 7220, - "src": "6333:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7200, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6333:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6332:27:14" - }, - "returnParameters": { - "id": 7205, - "nodeType": "ParameterList", - "parameters": [], - "src": "6395:0:14" - }, - "scope": 8597, - "src": "6305:272:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7240, - "nodeType": "Block", - "src": "6799:141:14", - "statements": [ - { - "assignments": [ - 7228 - ], - "declarations": [ - { - "constant": false, - "id": 7228, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 7240, - "src": "6809:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7227, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6809:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7230, - "initialValue": { - "argumentTypes": null, - "id": 7229, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "6833:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6809:34:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7231, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "6853:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7232, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7222, - "src": "6866:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6853:24:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7234, - "nodeType": "ExpressionStatement", - "src": "6853:24:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7236, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7228, - "src": "6906:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7237, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7222, - "src": "6921:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7235, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6993, - "src": "6892:13:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6892:41:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7239, - "nodeType": "EmitStatement", - "src": "6887:46:14" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 7241, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7225, - "modifierName": { - "argumentTypes": null, - "id": 7224, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "6787:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6787:7:14" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7223, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7222, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 7241, - "src": "6741:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6741:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6740:21:14" - }, - "returnParameters": { - "id": 7226, - "nodeType": "ParameterList", - "parameters": [], - "src": "6799:0:14" - }, - "scope": 8597, - "src": "6717:223:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7271, - "nodeType": "Block", - "src": "7054:185:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7245, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "7072:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7072:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7247, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "7086:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7072:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 7249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7098:10:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 7244, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7064:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7064:45:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7251, - "nodeType": "ExpressionStatement", - "src": "7064:45:14" - }, - { - "assignments": [ - 7253 - ], - "declarations": [ - { - "constant": false, - "id": 7253, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "7119:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7252, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7119:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7255, - "initialValue": { - "argumentTypes": null, - "id": 7254, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "7136:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7119:20:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7256, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "7149:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7257, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "7155:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7149:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7259, - "nodeType": "ExpressionStatement", - "src": "7149:16:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7260, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "7175:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7196:1:14", - "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": 7261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7188:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7188:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7175:23:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7265, - "nodeType": "ExpressionStatement", - "src": "7175:23:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7267, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7253, - "src": "7220:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7268, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "7228:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7266, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6999, - "src": "7213:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7213:19:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7270, - "nodeType": "EmitStatement", - "src": "7208:24:14" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 7272, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7242, - "nodeType": "ParameterList", - "parameters": [], - "src": "7030:2:14" - }, - "returnParameters": { - "id": 7243, - "nodeType": "ParameterList", - "parameters": [], - "src": "7054:0:14" - }, - "scope": 8597, - "src": "7011:228:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7311, - "nodeType": "Block", - "src": "7377:388:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7276, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "7395:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7277, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7413:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7395:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920616374697661746564", - "id": 7279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7416:19:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - }, - "value": "already activated" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - } - ], - "id": 7275, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7387:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7387:49:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7281, - "nodeType": "ExpressionStatement", - "src": "7387:49:14" - }, - { - "assignments": [ - 7283, - 7285 - ], - "declarations": [ - { - "constant": false, - "id": 7283, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 7311, - "src": "7447:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7282, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7447:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7285, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 7311, - "src": "7469:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 7284, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "7469:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7291, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7288, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "7552:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7289, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "7566:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 7286, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6909, - "src": "7505:22:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$6909_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 7287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 6908, - "src": "7505:46:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 7290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7505:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7446:129:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 7295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7293, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7285, - "src": "7593:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7294, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7610:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7593:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f20747261646573", - "id": 7296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7613:11:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - }, - "value": "no trades" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - } - ], - "id": 7292, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7585:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7585:40:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7298, - "nodeType": "ExpressionStatement", - "src": "7585:40:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7299, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7041, - "src": "7635:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7300, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7285, - "src": "7656:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7635:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 7302, - "nodeType": "ExpressionStatement", - "src": "7635:35:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7303, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7043, - "src": "7680:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7304, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7283, - "src": "7702:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7680:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7306, - "nodeType": "ExpressionStatement", - "src": "7680:37:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7307, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "7727:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7308, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7285, - "src": "7744:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7727:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7310, - "nodeType": "ExpressionStatement", - "src": "7727:31:14" - } - ] - }, - "documentation": "@notice Initializes TWAP start point, starts countdown to first rebase\n ", - "id": 7312, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "init_twap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7273, - "nodeType": "ParameterList", - "parameters": [], - "src": "7355:2:14" - }, - "returnParameters": { - "id": 7274, - "nodeType": "ParameterList", - "parameters": [], - "src": "7377:0:14" - }, - "scope": 8597, - "src": "7337:428:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7346, - "nodeType": "Block", - "src": "7929:414:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7316, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "7947:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7964:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7947:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "74776170207761736e7420696e74697469617465642c2063616c6c20696e69745f747761702829", - "id": 7319, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7967:41:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - }, - "value": "twap wasnt intitiated, call init_twap()" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - } - ], - "id": 7315, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7939:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7939:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7321, - "nodeType": "ExpressionStatement", - "src": "7939:70:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7323, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "8080:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7324, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "8087:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7325, - "name": "rebaseDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7029, - "src": "8104:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8087:28:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8080:35:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21656e645f64656c6179", - "id": 7328, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8117:12:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - }, - "value": "!end_delay" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - } - ], - "id": 7322, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "8072:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8072:58:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7330, - "nodeType": "ExpressionStatement", - "src": "8072:58:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7333, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "8230:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7332, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6398, - "src": "8218:11:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$6398_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 7334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8218:25:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "price0CumulativeLast", - "nodeType": "MemberAccess", - "referencedDeclaration": 6345, - "src": "8218:46:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8218:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8269:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8218:52:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "216c6971756964", - "id": 7339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8272:9:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_82c512820785d68b2ff3e6fc80f986822072334d156c9a0280e8a7c6fea3b323", - "typeString": "literal_string \"!liquid\"" - }, - "value": "!liquid" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_82c512820785d68b2ff3e6fc80f986822072334d156c9a0280e8a7c6fea3b323", - "typeString": "literal_string \"!liquid\"" - } - ], - "id": 7331, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "8210:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8210:72:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7341, - "nodeType": "ExpressionStatement", - "src": "8210:72:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7342, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7026, - "src": "8315:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 7343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8332:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8315:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7345, - "nodeType": "ExpressionStatement", - "src": "8315:21:14" - } - ] - }, - "documentation": "@notice Activates rebasing\n @dev One way function, cannot be undone, callable by anyone", - "id": 7347, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "activate_rebasing", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7313, - "nodeType": "ParameterList", - "parameters": [], - "src": "7907:2:14" - }, - "returnParameters": { - "id": 7314, - "nodeType": "ParameterList", - "parameters": [], - "src": "7929:0:14" - }, - "scope": 8597, - "src": "7881:462:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7504, - "nodeType": "Block", - "src": "8742:1597:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7351, - "name": "inRebaseWindow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8319, - "src": "8760:14:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 7352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8760:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 7350, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "8752:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 7353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8752:25:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7354, - "nodeType": "ExpressionStatement", - "src": "8752:25:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7358, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "8887:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7356, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7018, - "src": "8860:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "8860:26:14", - "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": 7359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8860:52:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 7360, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "8915:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8860:58:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 7355, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "8852:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 7362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8852:67:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7363, - "nodeType": "ExpressionStatement", - "src": "8852:67:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7364, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7018, - "src": "8991:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7373, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "9076:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7369, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "9045:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7367, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "9037:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 6766, - "src": "9037:7:14", - "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": 7370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9037:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7365, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "9016:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "9016:7:14", - "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": 7371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9016:55:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "9016:59:14", - "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": 7374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9016:82:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8991:107:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7376, - "nodeType": "ExpressionStatement", - "src": "8991:107:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7377, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7024, - "src": "9109:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 7380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9127:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 7378, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7024, - "src": "9117:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "9117:9:14", - "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": 7381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9117:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9109:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7383, - "nodeType": "ExpressionStatement", - "src": "9109:20:14" - }, - { - "assignments": [ - 7385 - ], - "declarations": [ - { - "constant": false, - "id": 7385, - "name": "exchangeRate", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9177:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9177:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7388, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7386, - "name": "getTWAP", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8189, - "src": "9200:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () returns (uint256)" - } - }, - "id": 7387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9200:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9177:32:14" - }, - { - "assignments": [ - 7390, - 7392 - ], - "declarations": [ - { - "constant": false, - "id": 7390, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9262:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7389, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9262:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7392, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9282:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7391, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9282:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7396, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7394, - "name": "exchangeRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7385, - "src": "9317:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7393, - "name": "computeOffPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8374, - "src": "9299:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_bool_$", - "typeString": "function (uint256) view returns (uint256,bool)" - } - }, - "id": 7395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9299:31:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9261:69:14" - }, - { - "assignments": [ - 7398 - ], - "declarations": [ - { - "constant": false, - "id": 7398, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9341:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7397, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9341:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7400, - "initialValue": { - "argumentTypes": null, - "id": 7399, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7390, - "src": "9362:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9341:31:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7401, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9421:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7404, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7008, - "src": "9449:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7402, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9434:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "9434:14:14", - "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": 7405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9434:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9421:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7407, - "nodeType": "ExpressionStatement", - "src": "9421:38:14" - }, - { - "assignments": [ - 7409 - ], - "declarations": [ - { - "constant": false, - "id": 7409, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9470:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 7408, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10713, - "src": "9470:17:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7413, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7411, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "9512:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7410, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "9494:17:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 7412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9494:29:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9470:53:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 7424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7414, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7392, - "src": "9568:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7415, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9580:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10744, - "src": "9580:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9580:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7418, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9606:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9580:36:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7420, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9619:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10676, - "src": "9619:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9619:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9580:61:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "9568:73:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7436, - "nodeType": "IfStatement", - "src": "9564:165:14", - "trueBody": { - "id": 7435, - "nodeType": "Block", - "src": "9643:86:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7425, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9657:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7426, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9670:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10676, - "src": "9670:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9670:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7429, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9695:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10744, - "src": "9695:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9670:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9657:61:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7434, - "nodeType": "ExpressionStatement", - "src": "9657:61:14" - } - ] - } - }, - { - "assignments": [ - 7438 - ], - "declarations": [ - { - "constant": false, - "id": 7438, - "name": "currSupply", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9740:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7437, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9740:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7442, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7439, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9761:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "totalSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 10737, - "src": "9761:15:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9761:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9740:38:14" - }, - { - "assignments": [ - 7444 - ], - "declarations": [ - { - "constant": false, - "id": 7444, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9789:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7443, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9789:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7445, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "9789:18:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 7446, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7392, - "src": "9873:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7479, - "nodeType": "IfStatement", - "src": "9869:214:14", - "trueBody": { - "id": 7478, - "nodeType": "Block", - "src": "9883:200:14", - "statements": [ - { - "assignments": [ - 7448 - ], - "declarations": [ - { - "constant": false, - "id": 7448, - "name": "mintPerc", - "nodeType": "VariableDeclaration", - "scope": 7478, - "src": "9897:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7447, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9897:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7458, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7456, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7454, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9951:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7455, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9955:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9951:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7451, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7012, - "src": "9931:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7449, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9916:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "9916:14:14", - "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": 7452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9916:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "9916:34:14", - "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": 7457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9916:42:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9897:61:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7459, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9972:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7462, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7448, - "src": "10000:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7460, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9985:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "9985:14:14", - "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": 7463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9985:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9972:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7465, - "nodeType": "ExpressionStatement", - "src": "9972:37:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7466, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7444, - "src": "10023:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10065:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10069:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "10065:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7469, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7448, - "src": "10051:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7467, - "name": "currSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7438, - "src": "10036:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "10036:14:14", - "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": 7470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10036:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "10036:28:14", - "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": 7475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10036:36:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10023:49:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7477, - "nodeType": "ExpressionStatement", - "src": "10023:49:14" - } - ] - } - }, - { - "assignments": [ - 7481 - ], - "declarations": [ - { - "constant": false, - "id": 7481, - "name": "supplyAfterRebase", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "10112:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7480, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10112:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7488, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7484, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7024, - "src": "10151:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7485, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "10158:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7486, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7392, - "src": "10170:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 7482, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "10140:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "rebase", - "nodeType": "MemberAccess", - "referencedDeclaration": 10694, - "src": "10140:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,bool) external returns (uint256)" - } - }, - "id": 7487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10140:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10112:67:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7490, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "10196:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10744, - "src": "10196:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10196:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7493, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "10223:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10676, - "src": "10223:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10223:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10196:49:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 7489, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10761, - "src": "10189:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 7497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10189:57:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7498, - "nodeType": "ExpressionStatement", - "src": "10189:57:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7500, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7444, - "src": "10309:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7501, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7390, - "src": "10321:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7499, - "name": "afterRebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8138, - "src": "10297:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 7502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10297:35:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7503, - "nodeType": "ExpressionStatement", - "src": "10297:35:14" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is CpiOracleRate / baseCpi", - "id": 7505, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7348, - "nodeType": "ParameterList", - "parameters": [], - "src": "8720:2:14" - }, - "returnParameters": { - "id": 7349, - "nodeType": "ParameterList", - "parameters": [], - "src": "8742:0:14" - }, - "scope": 8597, - "src": "8705:1634:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7641, - "nodeType": "Block", - "src": "10495:1403:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7517, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "10563:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10563:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7519, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "10577:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10563:26:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206d73672e73656e646572", - "id": 7521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10591:16:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - }, - "value": "bad msg.sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - } - ], - "id": 7516, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "10555:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10555:53:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7523, - "nodeType": "ExpressionStatement", - "src": "10555:53:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7525, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7507, - "src": "10679:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7527, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "10697:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7526, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10689:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10689:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10679:23:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206f726967696e", - "id": 7530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10704:12:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - }, - "value": "bad origin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - } - ], - "id": 7524, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "10671:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10671:46:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7532, - "nodeType": "ExpressionStatement", - "src": "10671:46:14" - }, - { - "assignments": [ - 7534 - ], - "declarations": [ - { - "constant": false, - "id": 7534, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 7641, - "src": "10728:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 7533, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6945, - "src": "10728:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_storage_ptr", - "typeString": "struct Rebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7541, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7537, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7513, - "src": "10765:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 7538, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6945, - "src": "10772:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - } - ], - "id": 7539, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10771:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - ], - "expression": { - "argumentTypes": null, - "id": 7535, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "10754:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10754:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 7540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10754:27:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10727:54:14" - }, - { - "assignments": [ - 7543 - ], - "declarations": [ - { - "constant": false, - "id": 7543, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7641, - "src": "10792:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 7542, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10713, - "src": "10792:17:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7547, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7545, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "10834:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7544, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "10816:17:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 7546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10816:29:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10792:53:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7548, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "10860:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7549, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "10860:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10889:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10860:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7581, - "nodeType": "Block", - "src": "11141:97:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7576, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "11195:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7577, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11209:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7578, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11209:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7573, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "11186:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 10683, - "src": "11186:8:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 7579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11186:41:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7580, - "nodeType": "ExpressionStatement", - "src": "11186:41:14" - } - ] - }, - "id": 7582, - "nodeType": "IfStatement", - "src": "10856:382:14", - "trueBody": { - "id": 7572, - "nodeType": "Block", - "src": "10892:243:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7555, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "10981:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7556, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "10999:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7557, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11013:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7558, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11013:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7552, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "10964:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 10628, - "src": "10964:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 7559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10964:76:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7560, - "nodeType": "ExpressionStatement", - "src": "10964:76:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7564, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "11063:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7565, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11077:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7566, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11077:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7567, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11097:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7568, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11097:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11077:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7561, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "11054:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 10683, - "src": "11054:8:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 7570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11054:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7571, - "nodeType": "ExpressionStatement", - "src": "11054:70:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7583, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11287:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11287:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11312:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11287:26:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7596, - "nodeType": "IfStatement", - "src": "11283:107:14", - "trueBody": { - "id": 7595, - "nodeType": "Block", - "src": "11315:75:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7590, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "11338:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7591, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11356:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7592, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11356:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7587, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "11329:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 10683, - "src": "11329:8:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 7593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11329:50:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7594, - "nodeType": "ExpressionStatement", - "src": "11329:50:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "id": 7597, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "11450:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7639, - "nodeType": "Block", - "src": "11678:212:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7623, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7035, - "src": "11722:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7622, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "11715:6:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11715:20:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 7625, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "11737:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7626, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7509, - "src": "11755:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7619, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6603, - "src": "11692:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$6603_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 7621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6431, - "src": "11692:22:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6156_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11692:71:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7628, - "nodeType": "ExpressionStatement", - "src": "11692:71:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7630, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7509, - "src": "11800:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7631, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11809:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7632, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11809:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7633, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11828:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11828:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7635, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11856:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7636, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11856:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7629, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6987, - "src": "11782:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 7637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11782:97:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7638, - "nodeType": "EmitStatement", - "src": "11777:102:14" - } - ] - }, - "id": 7640, - "nodeType": "IfStatement", - "src": "11446:444:14", - "trueBody": { - "id": 7618, - "nodeType": "Block", - "src": "11460:212:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7602, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7035, - "src": "11504:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7601, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "11497:6:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11497:20:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 7604, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "11519:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7605, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7511, - "src": "11537:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7598, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6603, - "src": "11474:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$6603_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 7600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6431, - "src": "11474:22:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6156_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11474:71:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7607, - "nodeType": "ExpressionStatement", - "src": "11474:71:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7609, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7511, - "src": "11582:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7610, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11591:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7611, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11591:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7612, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11610:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7613, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11610:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7614, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11638:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7615, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11638:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7608, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6987, - "src": "11564:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 7616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11564:97:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7617, - "nodeType": "EmitStatement", - "src": "11559:102:14" - } - ] - } - } - ] - }, - "documentation": null, - "id": 7642, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapV2Call", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7514, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7507, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10378:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7506, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10378:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7509, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10402:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7508, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10402:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7511, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10427:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10427:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7513, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10452:17:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 7512, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10452:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10368:107:14" - }, - "returnParameters": { - "id": 7515, - "nodeType": "ParameterList", - "parameters": [], - "src": "10495:0:14" - }, - "scope": 8597, - "src": "10346:1552:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7939, - "nodeType": "Block", - "src": "12018:4159:14", - "statements": [ - { - "assignments": [ - 7650 - ], - "declarations": [ - { - "constant": false, - "id": 7650, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12028:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - }, - "typeName": { - "contractScope": null, - "id": 7649, - "name": "UniswapPair", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6398, - "src": "12028:11:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7654, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7652, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "12059:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7651, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6398, - "src": "12047:11:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$6398_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 7653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12047:25:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12028:44:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7655, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "12083:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sync", - "nodeType": "MemberAccess", - "referencedDeclaration": 6390, - "src": "12083:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 7658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12083:11:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7659, - "nodeType": "ExpressionStatement", - "src": "12083:11:14" - }, - { - "assignments": [ - 7661 - ], - "declarations": [ - { - "constant": false, - "id": 7661, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12105:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 7660, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10713, - "src": "12105:17:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7665, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7663, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "12147:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7662, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "12129:17:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 7664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12129:29:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12105:53:14" - }, - { - "assignments": [ - 7667, - 7669, - null - ], - "declarations": [ - { - "constant": false, - "id": 7667, - "name": "token0Reserves", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12194:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7666, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12194:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7669, - "name": "token1Reserves", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12218:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7668, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12218:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 7673, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7670, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "12246:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6340, - "src": "12246:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "function () view external returns (uint112,uint112,uint32)" - } - }, - "id": 7672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12246:18:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "tuple(uint112,uint112,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12193:71:14" - }, - { - "assignments": [ - 7675 - ], - "declarations": [ - { - "constant": false, - "id": 7675, - "name": "excess", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12334:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7674, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12334:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7680, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7678, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "12365:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7676, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7661, - "src": "12351:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 10635, - "src": "12351:13:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 7679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12351:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12334:48:14" - }, - { - "assignments": [ - 7682 - ], - "declarations": [ - { - "constant": false, - "id": 7682, - "name": "tokens_to_max_slippage", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12394:30:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7681, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12394:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7688, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7684, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "12446:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7685, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "12462:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7686, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7646, - "src": "12478:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7683, - "name": "uniswapMaxSlippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8012, - "src": "12427:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) returns (uint256)" - } - }, - "id": 7687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12427:62:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12394:95:14" - }, - { - "assignments": [ - 7690 - ], - "declarations": [ - { - "constant": false, - "id": 7690, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12500:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 7689, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6945, - "src": "12500:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_storage_ptr", - "typeString": "struct Rebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7696, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7692, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "12556:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7693, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "12610:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12644:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 7691, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6945, - "src": "12525:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - }, - "id": 7695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "yamsToUni", - "amountFromReserves", - "mintToReserves" - ], - "nodeType": "FunctionCall", - "src": "12525:131:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12500:156:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 7697, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "12813:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7937, - "nodeType": "Block", - "src": "14448:1723:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7818, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "14466:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7819, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14491:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7820, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14504:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14491:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14466:44:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7935, - "nodeType": "Block", - "src": "14963:1198:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7862, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "14985:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7863, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "15010:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14985:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7933, - "nodeType": "Block", - "src": "15594:553:14", - "statements": [ - { - "assignments": [ - 7900 - ], - "declarations": [ - { - "constant": false, - "id": 7900, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7933, - "src": "15673:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7899, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15673:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7906, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7902, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15706:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7903, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "15730:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7904, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "15746:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7901, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "15693:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15693:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15673:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7907, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15783:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7909, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "15783:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7910, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15812:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15783:51:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7912, - "nodeType": "ExpressionStatement", - "src": "15783:51:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7913, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15856:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7915, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "15856:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7916, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "15881:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15856:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7918, - "nodeType": "ExpressionStatement", - "src": "15856:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7922, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7900, - "src": "16079:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7923, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16090:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7925, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "16101:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7924, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16093:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16093:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7929, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "16119:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7927, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "16108:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16108:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16108:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7919, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "16069:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "16069:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16069:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7932, - "nodeType": "ExpressionStatement", - "src": "16069:59:14" - } - ] - }, - "id": 7934, - "nodeType": "IfStatement", - "src": "14981:1166:14", - "trueBody": { - "id": 7898, - "nodeType": "Block", - "src": "15018:570:14", - "statements": [ - { - "assignments": [ - 7866 - ], - "declarations": [ - { - "constant": false, - "id": 7866, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7898, - "src": "15098:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7865, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15098:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7872, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7868, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15131:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7869, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "15155:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7870, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "15171:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7867, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "15118:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15118:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15098:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7873, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15312:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7875, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "15312:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7876, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "15337:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7877, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15351:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 7878, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "15376:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15351:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 7880, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15350:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15337:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15312:71:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7883, - "nodeType": "ExpressionStatement", - "src": "15312:71:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7887, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7866, - "src": "15520:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15531:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7890, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "15542:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15534:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15534:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7894, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15560:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "15549:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15549:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15549:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7884, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "15510:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "15510:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15510:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7897, - "nodeType": "ExpressionStatement", - "src": "15510:59:14" - } - ] - } - } - ] - }, - "id": 7936, - "nodeType": "IfStatement", - "src": "14462:1699:14", - "trueBody": { - "id": 7861, - "nodeType": "Block", - "src": "14512:445:14", - "statements": [ - { - "assignments": [ - 7824 - ], - "declarations": [ - { - "constant": false, - "id": 7824, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7861, - "src": "14585:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7823, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14585:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7832, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7826, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14618:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7827, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14631:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14618:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7829, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "14639:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7830, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "14655:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7825, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "14605:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14605:65:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14585:85:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7833, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14688:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7835, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "14688:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7836, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14708:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7837, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14721:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14708:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14688:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7840, - "nodeType": "ExpressionStatement", - "src": "14688:39:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7841, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14745:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7843, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "14745:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7844, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14774:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14745:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7846, - "nodeType": "ExpressionStatement", - "src": "14745:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7850, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7824, - "src": "14893:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14904:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7853, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "14915:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14907:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14907:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7857, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14933:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7855, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "14922:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7856, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14922:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14922:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7847, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "14883:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "14883:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14883:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7860, - "nodeType": "ExpressionStatement", - "src": "14883:59:14" - } - ] - } - } - ] - }, - "id": 7938, - "nodeType": "IfStatement", - "src": "12809:3362:14", - "trueBody": { - "id": 7817, - "nodeType": "Block", - "src": "12823:1619:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7698, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "12841:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7699, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "12866:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7700, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "12879:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12866:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12841:44:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7815, - "nodeType": "Block", - "src": "13338:1094:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7742, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13360:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7743, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13385:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13360:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7813, - "nodeType": "Block", - "src": "13865:553:14", - "statements": [ - { - "assignments": [ - 7780 - ], - "declarations": [ - { - "constant": false, - "id": 7780, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7813, - "src": "13944:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7779, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13944:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7786, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7782, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13977:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7783, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "14001:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7784, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "14017:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7781, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "13964:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13964:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13944:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7787, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14054:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7789, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "14054:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7790, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "14083:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14054:51:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7792, - "nodeType": "ExpressionStatement", - "src": "14054:51:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7793, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14127:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7795, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "14127:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7796, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14152:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14127:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7798, - "nodeType": "ExpressionStatement", - "src": "14127:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7802, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14350:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 7803, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7780, - "src": "14353:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7805, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "14372:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7804, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14364:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14364:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7809, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14390:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7807, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "14379:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14379:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14379:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7799, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "14340:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "14340:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14340:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7812, - "nodeType": "ExpressionStatement", - "src": "14340:59:14" - } - ] - }, - "id": 7814, - "nodeType": "IfStatement", - "src": "13356:1062:14", - "trueBody": { - "id": 7778, - "nodeType": "Block", - "src": "13393:466:14", - "statements": [ - { - "assignments": [ - 7746 - ], - "declarations": [ - { - "constant": false, - "id": 7746, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7778, - "src": "13473:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7745, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13473:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7752, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7748, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13506:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7749, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "13530:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7750, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "13546:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7747, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "13493:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13493:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13473:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7753, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13688:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7755, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "13688:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7756, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "13713:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7757, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13727:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 7758, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13752:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13727:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 7760, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "13726:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13713:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13688:71:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7763, - "nodeType": "ExpressionStatement", - "src": "13688:71:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13791:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 7768, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7746, - "src": "13794:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7770, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "13813:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7769, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13805:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13805:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7774, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13831:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7772, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "13820:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13820:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13820:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7764, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "13781:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "13781:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13781:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7777, - "nodeType": "ExpressionStatement", - "src": "13781:59:14" - } - ] - } - } - ] - }, - "id": 7816, - "nodeType": "IfStatement", - "src": "12837:1595:14", - "trueBody": { - "id": 7741, - "nodeType": "Block", - "src": "12887:445:14", - "statements": [ - { - "assignments": [ - 7704 - ], - "declarations": [ - { - "constant": false, - "id": 7704, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7741, - "src": "12960:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7703, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12960:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7712, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7706, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "12993:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7707, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13006:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12993:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7709, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "13014:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7710, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "13030:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7705, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "12980:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12980:65:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12960:85:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7713, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13063:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7715, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "13063:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7716, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "13083:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7717, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13096:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13083:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13063:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7720, - "nodeType": "ExpressionStatement", - "src": "13063:39:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7721, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13120:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7723, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "13120:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7724, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13149:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13120:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7726, - "nodeType": "ExpressionStatement", - "src": "13120:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13268:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 7731, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7704, - "src": "13271:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7733, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "13290:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7732, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13282:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13282:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7737, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13308:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7735, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "13297:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13297:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13297:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7727, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "13258:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "13258:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13258:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7740, - "nodeType": "ExpressionStatement", - "src": "13258:59:14" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 7940, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "buyReserveAndTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7644, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 7940, - "src": "11944:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7643, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11944:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7646, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 7940, - "src": "11972:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7645, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11972:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11934:62:14" - }, - "returnParameters": { - "id": 7648, - "nodeType": "ParameterList", - "parameters": [], - "src": "12018:0:14" - }, - "scope": 8597, - "src": "11904:4273:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8011, - "nodeType": "Block", - "src": "16336:865:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 7951, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "16350:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 8009, - "nodeType": "Block", - "src": "16970:225:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7981, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "16988:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7982, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "17001:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16988:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 8007, - "nodeType": "Block", - "src": "17107:78:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17163:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8003, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17167:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17163:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7997, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "17143:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 7998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17156:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "17143:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7995, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7944, - "src": "17132:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17132:10:14", - "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": 8000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17132:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "17132:30:14", - "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": 8005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17132:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 8006, - "nodeType": "Return", - "src": "17125:45:14" - } - ] - }, - "id": 8008, - "nodeType": "IfStatement", - "src": "16984:201:14", - "trueBody": { - "id": 7994, - "nodeType": "Block", - "src": "17020:81:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7991, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17079:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7990, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17083:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17079:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7986, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "17056:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7984, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7944, - "src": "17045:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17045:10:14", - "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": 7987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17045:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "17045:33:14", - "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": 7992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17045:41:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 7993, - "nodeType": "Return", - "src": "17038:48:14" - } - ] - } - } - ] - }, - "id": 8010, - "nodeType": "IfStatement", - "src": "16346:849:14", - "trueBody": { - "id": 7980, - "nodeType": "Block", - "src": "16360:604:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7952, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "16376:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7953, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "16389:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16376:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7978, - "nodeType": "Block", - "src": "16521:433:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7975, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16934:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7974, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16938:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "16934:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7968, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "16914:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 7969, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16927:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "16914:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7966, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7942, - "src": "16903:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "16903:10:14", - "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": 7971, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16903:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "16903:30:14", - "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": 7976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16903:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 7977, - "nodeType": "Return", - "src": "16896:45:14" - } - ] - }, - "id": 7979, - "nodeType": "IfStatement", - "src": "16372:582:14", - "trueBody": { - "id": 7965, - "nodeType": "Block", - "src": "16408:107:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7960, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16495:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16499:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "16495:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7957, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "16472:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7955, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7942, - "src": "16461:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "16461:10:14", - "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": 7958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16461:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "16461:33:14", - "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": 7963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16461:41:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 7964, - "nodeType": "Return", - "src": "16454:48:14" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 8012, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapMaxSlippage", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7947, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7942, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16220:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7941, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16220:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7944, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16244:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16244:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7946, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16268:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7945, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16268:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16210:82:14" - }, - "returnParameters": { - "id": 7950, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7949, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16323:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7948, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16323:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16322:9:14" - }, - "scope": 8597, - "src": "16183:1018:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8071, - "nodeType": "Block", - "src": "17486:394:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8024, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8014, - "src": "17503:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8025, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17514:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "17503:12:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54", - "id": 8027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17517:45:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - } - ], - "id": 8023, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "17495:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17495:68:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8029, - "nodeType": "ExpressionStatement", - "src": "17495:68:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8031, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8016, - "src": "17580:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17592:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "17580:13:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8034, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8018, - "src": "17597:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8035, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17610:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "17597:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17580:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459", - "id": 8038, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17613:42:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_LIQUIDITY" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - } - ], - "id": 8030, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "17572:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17572:84:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8040, - "nodeType": "ExpressionStatement", - "src": "17572:84:14" - }, - { - "assignments": [ - 8042 - ], - "declarations": [ - { - "constant": false, - "id": 8042, - "name": "amountInWithFee", - "nodeType": "VariableDeclaration", - "scope": 8071, - "src": "17665:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8041, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17665:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8047, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "393937", - "id": 8045, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17701:3:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - }, - "value": "997" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - } - ], - "expression": { - "argumentTypes": null, - "id": 8043, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8014, - "src": "17688:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17688:12:14", - "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": 8046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17688:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17665:40:14" - }, - { - "assignments": [ - 8049 - ], - "declarations": [ - { - "constant": false, - "id": 8049, - "name": "numerator", - "nodeType": "VariableDeclaration", - "scope": 8071, - "src": "17714:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8048, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17714:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8054, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8052, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8018, - "src": "17751:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8050, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "17731:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17731:19:14", - "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": 8053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17731:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17714:48:14" - }, - { - "assignments": [ - 8056 - ], - "declarations": [ - { - "constant": false, - "id": 8056, - "name": "denominator", - "nodeType": "VariableDeclaration", - "scope": 8071, - "src": "17771:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8055, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17771:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8064, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8062, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "17814:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31303030", - "id": 8059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17804:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - }, - "value": "1000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - } - ], - "expression": { - "argumentTypes": null, - "id": 8057, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8016, - "src": "17790:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17790:13:14", - "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": 8060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17790:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "17790:23:14", - "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": 8063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17790:40:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17771:59:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8065, - "name": "amountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8021, - "src": "17839:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8066, - "name": "numerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8049, - "src": "17851:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8067, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8056, - "src": "17863:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17851:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17839:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8070, - "nodeType": "ExpressionStatement", - "src": "17839:35:14" - } - ] - }, - "documentation": null, - "id": 8072, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAmountOut", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8019, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8014, - "name": "amountIn", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17350:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8013, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17350:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8016, - "name": "reserveIn", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17373:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8015, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17373:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8018, - "name": "reserveOut", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17397:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8017, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17397:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17340:78:14" - }, - "returnParameters": { - "id": 8022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8021, - "name": "amountOut", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17466:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8020, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17466:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17465:16:14" - }, - "scope": 8597, - "src": "17319:561:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8137, - "nodeType": "Block", - "src": "17991:572:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8079, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8074, - "src": "18005:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18018:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18005:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8088, - "nodeType": "IfStatement", - "src": "18001:136:14", - "trueBody": { - "id": 8087, - "nodeType": "Block", - "src": "18021:116:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8083, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8074, - "src": "18074:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8084, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8076, - "src": "18102:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8082, - "name": "buyReserveAndTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7940, - "src": "18035:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 8085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18035:91:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8086, - "nodeType": "ExpressionStatement", - "src": "18035:91:14" - } - ] - } - }, - { - "body": { - "id": 8135, - "nodeType": "Block", - "src": "18194:363:14", - "statements": [ - { - "assignments": [ - 8101 - ], - "declarations": [ - { - "constant": false, - "id": 8101, - "name": "t", - "nodeType": "VariableDeclaration", - "scope": 8135, - "src": "18208:21:14", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction" - }, - "typeName": { - "contractScope": null, - "id": 8100, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6938, - "src": "18208:11:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8105, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8102, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "18232:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8104, - "indexExpression": { - "argumentTypes": null, - "id": 8103, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18245:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18232:15:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18208:39:14" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8106, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18265:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8107, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 6933, - "src": "18265:9:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8134, - "nodeType": "IfStatement", - "src": "18261:286:14", - "trueBody": { - "id": 8133, - "nodeType": "Block", - "src": "18276:271:14", - "statements": [ - { - "assignments": [ - 8109 - ], - "declarations": [ - { - "constant": false, - "id": 8109, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 8133, - "src": "18294:11:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8108, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "18294:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8116, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8111, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18341:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8112, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 6935, - "src": "18341:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8113, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18356:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8114, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 6937, - "src": "18356:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 8110, - "name": "externalCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8596, - "src": "18328:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (address,bytes memory) returns (bool)" - } - }, - "id": 8115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18328:35:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18294:69:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 8118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "18385:7:14", - "subExpression": { - "argumentTypes": null, - "id": 8117, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8109, - "src": "18386:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8132, - "nodeType": "IfStatement", - "src": "18381:152:14", - "trueBody": { - "id": 8131, - "nodeType": "Block", - "src": "18394:139:14", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8120, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18439:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8121, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 6935, - "src": "18439:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8122, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18454:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8123, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18457:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8124, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 6937, - "src": "18457:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 8119, - "name": "TransactionFailed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6953, - "src": "18421:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,bytes memory)" - } - }, - "id": 8125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18421:43:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8126, - "nodeType": "EmitStatement", - "src": "18416:48:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5472616e73616374696f6e204661696c6564", - "id": 8128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18493:20:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - }, - "value": "Transaction Failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - } - ], - "id": 8127, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10777, - 10778 - ], - "referencedDeclaration": 10778, - "src": "18486:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 8129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18486:28:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8130, - "nodeType": "ExpressionStatement", - "src": "18486:28:14" - } - ] - } - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8093, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18164:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8094, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "18168:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8095, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18168:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18164:23:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8136, - "initializationExpression": { - "assignments": [ - 8090 - ], - "declarations": [ - { - "constant": false, - "id": 8090, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 8136, - "src": "18152:6:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8089, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18152:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8092, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 8091, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18161:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18152:10:14" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 8098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18189:3:14", - "subExpression": { - "argumentTypes": null, - "id": 8097, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18189:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8099, - "nodeType": "ExpressionStatement", - "src": "18189:3:14" - }, - "nodeType": "ForStatement", - "src": "18147:410:14" - } - ] - }, - "documentation": null, - "id": 8138, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "afterRebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8074, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 8138, - "src": "17917:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17917:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8076, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 8138, - "src": "17945:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8075, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17945:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17907:62:14" - }, - "returnParameters": { - "id": 8078, - "nodeType": "ParameterList", - "parameters": [], - "src": "17991:0:14" - }, - "scope": 8597, - "src": "17887:676:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8188, - "nodeType": "Block", - "src": "19050:741:14", - "statements": [ - { - "assignments": [ - 8144, - 8146 - ], - "declarations": [ - { - "constant": false, - "id": 8144, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19059:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8143, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19059:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8146, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19081:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 8145, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19081:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8152, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8149, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "19162:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8150, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "19176:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 8147, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6909, - "src": "19115:22:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$6909_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 8148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 6908, - "src": "19115:46:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 8151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19115:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:127:14" - }, - { - "assignments": [ - 8154 - ], - "declarations": [ - { - "constant": false, - "id": 8154, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19194:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 8153, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19194:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8158, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 8157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8155, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8146, - "src": "19215:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 8156, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7041, - "src": "19232:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19215:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19194:56:14" - }, - { - "assignments": [ - 8162 - ], - "declarations": [ - { - "constant": false, - "id": 8162, - "name": "priceAverage", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19515:40:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 8161, - "name": "FixedPoint.uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5864, - "src": "19515:20:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8174, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8166, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8144, - "src": "19588:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 8167, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7043, - "src": "19606:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19588:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8169, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "19587:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8170, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8154, - "src": "19629:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19587:53:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19579:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 8172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19579:62:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "expression": { - "argumentTypes": null, - "id": 8163, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6087, - "src": "19558:10:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$6087_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 8164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "uq112x112", - "nodeType": "MemberAccess", - "referencedDeclaration": 5864, - "src": "19558:20:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$5864_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 8173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19558:84:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19515:127:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8175, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7043, - "src": "19653:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8176, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8144, - "src": "19675:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19653:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8178, - "nodeType": "ExpressionStatement", - "src": "19653:37:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8179, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7041, - "src": "19700:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8180, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8146, - "src": "19721:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19700:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 8182, - "nodeType": "ExpressionStatement", - "src": "19700:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8185, - "name": "priceAverage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8162, - "src": "19771:12:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 8183, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6087, - "src": "19753:10:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$6087_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 8184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": 6024, - "src": "19753:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_uq112x112_$5864_memory_ptr_$returns$_t_uint112_$", - "typeString": "function (struct FixedPoint.uq112x112 memory) pure returns (uint112)" - } - }, - "id": 8186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19753:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "functionReturnParameters": 8142, - "id": 8187, - "nodeType": "Return", - "src": "19746:38:14" - } - ] - }, - "documentation": "@notice Calculates TWAP from uniswap\n * @dev When liquidity is low, this can be manipulated by an end of block -> next block\n attack. We delay the activation of rebases 12 hours after liquidity incentives\n to reduce this attack vector. Additional there is very little supply\n to be able to manipulate this during that time period of highest vuln.", - "id": 8189, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTWAP", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8139, - "nodeType": "ParameterList", - "parameters": [], - "src": "19000:2:14" - }, - "returnParameters": { - "id": 8142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8141, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8189, - "src": "19037:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19037:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19036:9:14" - }, - "scope": 8597, - "src": "18984:807:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8215, - "nodeType": "Block", - "src": "20242:238:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8197, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "20260:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20281:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20260:22:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8196, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "20252:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20252:31:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8201, - "nodeType": "ExpressionStatement", - "src": "20252:31:14" - }, - { - "assignments": [ - 8203 - ], - "declarations": [ - { - "constant": false, - "id": 8203, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 8215, - "src": "20293:29:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8202, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20293:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8205, - "initialValue": { - "argumentTypes": null, - "id": 8204, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "20325:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20293:50:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8206, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "20353:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8207, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8191, - "src": "20374:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20353:40:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8209, - "nodeType": "ExpressionStatement", - "src": "20353:40:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8211, - "name": "oldDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8203, - "src": "20430:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8212, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8191, - "src": "20453:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8210, - "name": "NewDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6965, - "src": "20408:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 8213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20408:65:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8214, - "nodeType": "EmitStatement", - "src": "20403:70:14" - } - ] - }, - "documentation": "@notice Sets the deviation threshold fraction. If the exchange rate given by the market\n oracle is within this fractional distance from the targetRate, then no supply\n modifications are made. DECIMALS fixed point number.\n@param deviationThreshold_ The new exchange rate threshold fraction.", - "id": 8216, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8194, - "modifierName": { - "argumentTypes": null, - "id": 8193, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "20230:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "20230:7:14" - } - ], - "name": "setDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8191, - "name": "deviationThreshold_", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "20176:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20176:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20175:29:14" - }, - "returnParameters": { - "id": 8195, - "nodeType": "ParameterList", - "parameters": [], - "src": "20242:0:14" - }, - "scope": 8597, - "src": "20145:335:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8233, - "nodeType": "Block", - "src": "21012:72:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8224, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8218, - "src": "21030:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8225, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21043:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21030:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8223, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "21022:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21022:23:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8228, - "nodeType": "ExpressionStatement", - "src": "21022:23:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8229, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7008, - "src": "21055:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8230, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8218, - "src": "21067:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21055:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8232, - "nodeType": "ExpressionStatement", - "src": "21055:22:14" - } - ] - }, - "documentation": "@notice Sets the rebase lag parameter.\nIt is used to dampen the applied supply adjustment by 1 / rebaseLag\nIf the rebase lag R, equals 1, the smallest value for R, then the full supply\ncorrection is applied on each rebase cycle.\nIf it is greater than 1, then a correction of 1/R of is applied on each rebase.\n@param rebaseLag_ The new rebase lag parameter.", - "id": 8234, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8221, - "modifierName": { - "argumentTypes": null, - "id": 8220, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "21000:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21000:7:14" - } - ], - "name": "setRebaseLag", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8219, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8218, - "name": "rebaseLag_", - "nodeType": "VariableDeclaration", - "scope": 8234, - "src": "20955:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20955:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20954:20:14" - }, - "returnParameters": { - "id": 8222, - "nodeType": "ParameterList", - "parameters": [], - "src": "21012:0:14" - }, - "scope": 8597, - "src": "20933:151:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8251, - "nodeType": "Block", - "src": "21290:75:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8242, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8236, - "src": "21308:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8243, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21322:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21308:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8241, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "21300:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21300:24:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8246, - "nodeType": "ExpressionStatement", - "src": "21300:24:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8247, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "21334:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8248, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8236, - "src": "21347:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21334:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8250, - "nodeType": "ExpressionStatement", - "src": "21334:24:14" - } - ] - }, - "documentation": "@notice Sets the targetRate parameter.\n@param targetRate_ The new target rate parameter.", - "id": 8252, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8239, - "modifierName": { - "argumentTypes": null, - "id": 8238, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "21278:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21278:7:14" - } - ], - "name": "setTargetRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8236, - "name": "targetRate_", - "nodeType": "VariableDeclaration", - "scope": 8252, - "src": "21232:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21232:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21231:21:14" - }, - "returnParameters": { - "id": 8240, - "nodeType": "ParameterList", - "parameters": [], - "src": "21290:0:14" - }, - "scope": 8597, - "src": "21209:156:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8287, - "nodeType": "Block", - "src": "22241:299:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8264, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "22259:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22287:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "22259:29:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8263, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "22251:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22251:38:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8268, - "nodeType": "ExpressionStatement", - "src": "22251:38:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8270, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8256, - "src": "22307:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8271, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "22332:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22307:50:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8269, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "22299:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22299:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8274, - "nodeType": "ExpressionStatement", - "src": "22299:59:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8275, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "22369:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8276, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "22396:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22369:52:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8278, - "nodeType": "ExpressionStatement", - "src": "22369:52:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8279, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "22431:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8280, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8256, - "src": "22455:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22431:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8282, - "nodeType": "ExpressionStatement", - "src": "22431:46:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8283, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7022, - "src": "22487:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8284, - "name": "rebaseWindowLengthSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8258, - "src": "22511:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22487:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8286, - "nodeType": "ExpressionStatement", - "src": "22487:46:14" - } - ] - }, - "documentation": "@notice Sets the parameters which control the timing and frequency of\n rebase operations.\n a) the minimum time period that must elapse between rebase cycles.\n b) the rebase window offset parameter.\n c) the rebase window length parameter.\n@param minRebaseTimeIntervalSec_ More than this much time must pass between rebase\n operations, in seconds.\n@param rebaseWindowOffsetSec_ The number of seconds from the beginning of\nthe rebase interval, where the rebase window begins.\n@param rebaseWindowLengthSec_ The length of the rebase window in seconds.", - "id": 8288, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8261, - "modifierName": { - "argumentTypes": null, - "id": 8260, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "22229:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "22229:7:14" - } - ], - "name": "setRebaseTimingParameters", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8254, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "VariableDeclaration", - "scope": 8288, - "src": "22089:33:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22089:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8256, - "name": "rebaseWindowOffsetSec_", - "nodeType": "VariableDeclaration", - "scope": 8288, - "src": "22132:30:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8255, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22132:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8258, - "name": "rebaseWindowLengthSec_", - "nodeType": "VariableDeclaration", - "scope": 8288, - "src": "22172:30:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22172:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22079:124:14" - }, - "returnParameters": { - "id": 8262, - "nodeType": "ParameterList", - "parameters": [], - "src": "22241:0:14" - }, - "scope": 8597, - "src": "22045:495:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8318, - "nodeType": "Block", - "src": "22752:340:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 8294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "22829:15:14", - "subExpression": { - "argumentTypes": null, - "id": 8293, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7026, - "src": "22830:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8298, - "nodeType": "IfStatement", - "src": "22825:56:14", - "trueBody": { - "id": 8297, - "nodeType": "Block", - "src": "22846:35:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 8295, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22865:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 8292, - "id": 8296, - "nodeType": "Return", - "src": "22858:12:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8301, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "22921:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8299, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "22913:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 6766, - "src": "22913:7:14", - "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": 8302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22913:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8303, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "22950:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22913:58:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8307, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "22996:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8305, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "22988:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 6766, - "src": "22988:7:14", - "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": 8308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22988:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8311, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7022, - "src": "23051:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8309, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "23025:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "23025:25:14", - "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": 8312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23025:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8313, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23024:50:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22988:86:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "22913:161:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8316, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "22898:187:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8292, - "id": 8317, - "nodeType": "Return", - "src": "22891:194:14" - } - ] - }, - "documentation": "@return If the latest block timestamp is within the rebase time window it, returns true.\n Otherwise, returns false.", - "id": 8319, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "inRebaseWindow", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8289, - "nodeType": "ParameterList", - "parameters": [], - "src": "22722:2:14" - }, - "returnParameters": { - "id": 8292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8291, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8319, - "src": "22746:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8290, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "22746:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22745:6:14" - }, - "scope": 8597, - "src": "22699:393:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8373, - "nodeType": "Block", - "src": "23280:368:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8329, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23319:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8328, - "name": "withinDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8418, - "src": "23294:24:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 8330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23294:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8336, - "nodeType": "IfStatement", - "src": "23290:78:14", - "trueBody": { - "id": 8335, - "nodeType": "Block", - "src": "23326:42:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23348:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 8332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23351:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 8333, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23347:10:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_bool_$", - "typeString": "tuple(int_const 0,bool)" - } - }, - "functionReturnParameters": 8327, - "id": 8334, - "nodeType": "Return", - "src": "23340:17:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8337, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23440:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 8338, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23447:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23440:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 8371, - "nodeType": "Block", - "src": "23553:89:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8366, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23612:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8363, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23600:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23604:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "23600:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8358, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23590:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8356, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23575:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "23575:14:14", - "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": 8359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23575:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "23575:24:14", - "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": 8364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23575:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "23575:36:14", - "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": 8367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23575:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 8368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23625:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 8369, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23574:57:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 8327, - "id": 8370, - "nodeType": "Return", - "src": "23567:64:14" - } - ] - }, - "id": 8372, - "nodeType": "IfStatement", - "src": "23436:206:14", - "trueBody": { - "id": 8355, - "nodeType": "Block", - "src": "23459:88:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8350, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23518:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8345, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23506:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23510:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "23506:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8342, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23490:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8340, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23481:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "23481:8:14", - "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": 8343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23481:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "23481:24:14", - "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": 8348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23481:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "23481:36:14", - "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": 8351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23481:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 8352, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23531:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "id": 8353, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23480:56:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 8327, - "id": 8354, - "nodeType": "Return", - "src": "23473:63:14" - } - ] - } - } - ] - }, - "documentation": "@return Computes in % how far off market is from peg", - "id": 8374, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "computeOffPegPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8321, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 8374, - "src": "23201:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23201:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23200:14:14" - }, - "returnParameters": { - "id": 8327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8324, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8374, - "src": "23261:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8323, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23261:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8374, - "src": "23270:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8325, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "23270:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23260:15:14" - }, - "scope": 8597, - "src": "23174:474:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 8417, - "nodeType": "Block", - "src": "23992:294:14", - "statements": [ - { - "assignments": [ - 8382 - ], - "declarations": [ - { - "constant": false, - "id": 8382, - "name": "absoluteDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 8417, - "src": "24002:34:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24002:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8392, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24091:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8389, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24097:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24091:8:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8385, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "24054:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8383, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24039:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "24039:14:14", - "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": 8386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24039:34:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "24039:51:14", - "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": 8391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24039:61:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24002:98:14" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8393, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24119:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8394, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24127:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24119:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8398, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24150:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8396, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24141:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "24141:8:14", - "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": 8399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24141:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8400, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8382, - "src": "24164:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24141:49:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24119:71:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8403, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24118:73:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8404, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24208:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8405, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24215:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24208:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8409, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24244:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8407, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24229:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "24229:14:14", - "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": 8410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24229:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8411, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8382, - "src": "24252:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24229:49:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24208:70:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8414, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24207:72:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24118:161:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8380, - "id": 8416, - "nodeType": "Return", - "src": "24111:168:14" - } - ] - }, - "documentation": "@param rate The current exchange rate, an 18 decimal fixed point number.\n@return If the rate is within the deviation threshold from the target rate, returns true.\n Otherwise, returns false.", - "id": 8418, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withinDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8377, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8376, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 8418, - "src": "23922:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8375, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23922:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23921:14:14" - }, - "returnParameters": { - "id": 8380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8379, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8418, - "src": "23982:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8378, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "23982:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23981:6:14" - }, - "scope": 8597, - "src": "23888:398:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 8451, - "nodeType": "Block", - "src": "24571:296:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8429, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8427, - "src": "24581:4:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "ff", - "id": 8435, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24645:7:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - }, - { - "argumentTypes": null, - "id": 8436, - "name": "factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8420, - "src": "24670:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8440, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8422, - "src": "24722:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8441, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8424, - "src": "24730:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8438, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "24705:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24705:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 8442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24705:32:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8437, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10766, - "src": "24695:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 8443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24695:43:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", - "id": 8444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24756:69:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - } - ], - "expression": { - "argumentTypes": null, - "id": 8433, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "24611:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24611:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 8445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24611:246:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8432, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10766, - "src": "24601:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 8446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24601:257:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 8431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "24596:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 8447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24596:263:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8430, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "24588:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24588:272:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "24581:279:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8450, - "nodeType": "ExpressionStatement", - "src": "24581:279:14" - } - ] - }, - "documentation": null, - "id": 8452, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "pairFor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8425, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8420, - "name": "factory", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24436:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8419, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24436:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8422, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24461:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8421, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24461:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8424, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24485:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8423, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24485:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24426:79:14" - }, - "returnParameters": { - "id": 8428, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8427, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24553:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8426, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24553:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24552:14:14" - }, - "scope": 8597, - "src": "24410:457:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8494, - "nodeType": "Block", - "src": "25130:238:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8464, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25148:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 8465, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25158:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "25148:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553", - "id": 8467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25166:39:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - }, - "value": "UniswapV2Library: IDENTICAL_ADDRESSES" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - } - ], - "id": 8463, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "25140:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25140:66:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8469, - "nodeType": "ExpressionStatement", - "src": "25140:66:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8470, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8459, - "src": "25217:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8471, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8461, - "src": "25225:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 8472, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "25216:16:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8473, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25235:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8474, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25244:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "25235:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8479, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25273:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8480, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25281:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 8481, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "25272:16:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "id": 8482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "25235:53:14", - "trueExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8476, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25254:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8477, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25262:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 8478, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "25253:16:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "src": "25216:72:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8484, - "nodeType": "ExpressionStatement", - "src": "25216:72:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8486, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8459, - "src": "25306:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8488, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25324:1:14", - "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": 8487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25316:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8489, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "25306:20:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a205a45524f5f41444452455353", - "id": 8491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25328:32:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - }, - "value": "UniswapV2Library: ZERO_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - } - ], - "id": 8485, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "25298:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25298:63:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8493, - "nodeType": "ExpressionStatement", - "src": "25298:63:14" - } - ] - }, - "documentation": null, - "id": 8495, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sortTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8454, - "name": "tokenA", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25002:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8453, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25002:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8456, - "name": "tokenB", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25026:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8455, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25026:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24992:54:14" - }, - "returnParameters": { - "id": 8462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8459, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25094:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8458, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25094:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8461, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25110:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25110:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25093:32:14" - }, - "scope": 8597, - "src": "24973:395:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8514, - "nodeType": "Block", - "src": "25715:148:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 8508, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25778:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 8509, - "name": "destination", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8497, - "src": "25809:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8510, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8499, - "src": "25840:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "id": 8507, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6938, - "src": "25743:11:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Transaction_$6938_storage_ptr_$", - "typeString": "type(struct Rebaser.Transaction storage pointer)" - } - }, - "id": 8511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "enabled", - "destination", - "data" - ], - "nodeType": "FunctionCall", - "src": "25743:112:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_memory", - "typeString": "struct Rebaser.Transaction memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Transaction_$6938_memory", - "typeString": "struct Rebaser.Transaction memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 8504, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "25725:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25725:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Transaction_$6938_storage_$returns$_t_uint256_$", - "typeString": "function (struct Rebaser.Transaction storage ref) returns (uint256)" - } - }, - "id": 8512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25725:131:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8513, - "nodeType": "ExpressionStatement", - "src": "25725:131:14" - } - ] - }, - "documentation": "@notice Adds a transaction that gets called for a downstream receiver of rebases\n@param destination Address of contract destination\n@param data Transaction data payload", - "id": 8515, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8502, - "modifierName": { - "argumentTypes": null, - "id": 8501, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "25703:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25703:7:14" - } - ], - "name": "addTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8500, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8497, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 8515, - "src": "25636:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8496, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25636:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8499, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 8515, - "src": "25657:19:14", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8498, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "25657:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25635:42:14" - }, - "returnParameters": { - "id": 8503, - "nodeType": "ParameterList", - "parameters": [], - "src": "25715:0:14" - }, - "scope": 8597, - "src": "25612:251:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8554, - "nodeType": "Block", - "src": "26086:239:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8523, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8517, - "src": "26104:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8524, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26112:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8525, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26112:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26104:27:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206f7574206f6620626f756e6473", - "id": 8527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26133:21:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - }, - "value": "index out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - } - ], - "id": 8522, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "26096:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26096:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8529, - "nodeType": "ExpressionStatement", - "src": "26096:59:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8530, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8517, - "src": "26170:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8531, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26178:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8532, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26178:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26200:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "26178:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26170:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8548, - "nodeType": "IfStatement", - "src": "26166:121:14", - "trueBody": { - "id": 8547, - "nodeType": "Block", - "src": "26203:84:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8536, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26217:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8538, - "indexExpression": { - "argumentTypes": null, - "id": 8537, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8517, - "src": "26230:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "26217:19:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8539, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26239:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8544, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8540, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26252:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8541, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26252:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8542, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26274:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "26252:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26239:37:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "src": "26217:59:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "id": 8546, - "nodeType": "ExpressionStatement", - "src": "26217:59:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 8552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "26297:21:14", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8549, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26297:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8551, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26297:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8553, - "nodeType": "ExpressionStatement", - "src": "26297:21:14" - } - ] - }, - "documentation": "@param index Index of transaction to remove.\n Transaction ordering may have changed since adding.", - "id": 8555, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8520, - "modifierName": { - "argumentTypes": null, - "id": 8519, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "26074:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26074:7:14" - } - ], - "name": "removeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8518, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8517, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 8555, - "src": "26037:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8516, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "26037:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26036:12:14" - }, - "returnParameters": { - "id": 8521, - "nodeType": "ParameterList", - "parameters": [], - "src": "26086:0:14" - }, - "scope": 8597, - "src": "26010:315:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8579, - "nodeType": "Block", - "src": "26595:144:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8565, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "26613:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8566, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26621:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8567, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26621:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26613:27:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206d75737420626520696e2072616e6765206f662073746f726564207478206c697374", - "id": 8569, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26642:42:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - }, - "value": "index must be in range of stored tx list" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - } - ], - "id": 8564, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "26605:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26605:80:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8571, - "nodeType": "ExpressionStatement", - "src": "26605:80:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8572, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26695:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8574, - "indexExpression": { - "argumentTypes": null, - "id": 8573, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "26708:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26695:19:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "id": 8575, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 6933, - "src": "26695:27:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8576, - "name": "enabled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8559, - "src": "26725:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "26695:37:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8578, - "nodeType": "ExpressionStatement", - "src": "26695:37:14" - } - ] - }, - "documentation": "@param index Index of transaction. Transaction ordering may have changed since adding.\n@param enabled True for enabled, false for disabled.", - "id": 8580, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8562, - "modifierName": { - "argumentTypes": null, - "id": 8561, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "26583:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26583:7:14" - } - ], - "name": "setTransactionEnabled", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8560, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8557, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 8580, - "src": "26532:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8556, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "26532:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8559, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 8580, - "src": "26544:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8558, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "26544:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26531:26:14" - }, - "returnParameters": { - "id": 8563, - "nodeType": "ParameterList", - "parameters": [], - "src": "26595:0:14" - }, - "scope": 8597, - "src": "26501:238:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8595, - "nodeType": "Block", - "src": "27080:1112:14", - "statements": [ - { - "assignments": [ - 8590 - ], - "declarations": [ - { - "constant": false, - "id": 8590, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 8595, - "src": "27090:11:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8589, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27090:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8591, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "27090:11:14" - }, - { - "externalReferences": [ - { - "result": { - "declaration": 8590, - "isOffset": false, - "isSlot": false, - "src": "27468:6:14", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 8584, - "isOffset": false, - "isSlot": false, - "src": "27445:4:14", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 8584, - "isOffset": false, - "isSlot": false, - "src": "27959:4:14", - "valueSize": 1 - } - }, - { - "destination": { - "declaration": 8582, - "isOffset": false, - "isSlot": false, - "src": "27851:11:14", - "valueSize": 1 - } - } - ], - "id": 8592, - "nodeType": "InlineAssembly", - "operations": "{\n let outputAddress := mload(0x40)\n let dataAddress := add(data, 32)\n result := call(sub(gas(), 34710), destination, 0, dataAddress, mload(data), outputAddress, 0)\n}", - "src": "27111:1052:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8593, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8590, - "src": "28179:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8588, - "id": 8594, - "nodeType": "Return", - "src": "28172:13:14" - } - ] - }, - "documentation": "@dev wrapper to call the encoded transactions on downstream consumers.\n@param destination Address of destination contract.\n@param data The encoded data payload.\n@return True on success", - "id": 8596, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "externalCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8585, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8582, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 8596, - "src": "26996:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26996:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8584, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 8596, - "src": "27017:17:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8583, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "27017:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26995:40:14" - }, - "returnParameters": { - "id": 8588, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8587, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8596, - "src": "27070:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8586, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27070:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27069:6:14" - }, - "scope": 8597, - "src": "26974:1218:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 8598, - "src": "243:27951:14" - } - ], - "src": "0:28195:14" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol", - "exportedSymbols": { - "Rebaser": [ - 8597 - ] - }, - "id": 8598, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6911, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:14" - }, - { - "id": 6912, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:14" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 6913, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6604, - "src": "59:30:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 6914, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6791, - "src": "90:29:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "file": "../lib/IUniswapV2Pair.sol", - "id": 6915, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6399, - "src": "120:35:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol", - "file": "../lib/UniswapV2OracleLibrary.sol", - "id": 6916, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 6910, - "src": "156:43:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 6917, - "nodeType": "ImportDirective", - "scope": 8598, - "sourceUnit": 10714, - "src": "200:40:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8597, - "linearizedBaseContracts": [ - 8597 - ], - "name": "Rebaser", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6920, - "libraryName": { - "contractScope": null, - "id": 6918, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6790, - "src": "273:8:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$6790", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "267:27:14", - "typeName": { - "id": 6919, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "286:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "body": { - "id": 6930, - "nodeType": "Block", - "src": "319:54:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6923, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "337:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "337:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6925, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "351:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "337:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 6922, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "329:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 6927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "329:26:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6928, - "nodeType": "ExpressionStatement", - "src": "329:26:14" - }, - { - "id": 6929, - "nodeType": "PlaceholderStatement", - "src": "365:1:14" - } - ] - }, - "documentation": null, - "id": 6931, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6921, - "nodeType": "ParameterList", - "parameters": [], - "src": "316:2:14" - }, - "src": "300:73:14", - "visibility": "internal" - }, - { - "canonicalName": "Rebaser.Transaction", - "id": 6938, - "members": [ - { - "constant": false, - "id": 6933, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 6938, - "src": "408:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6932, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "408:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6935, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 6938, - "src": "430:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6934, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "430:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6937, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6938, - "src": "459:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6936, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "459:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Transaction", - "nodeType": "StructDefinition", - "scope": 8597, - "src": "379:97:14", - "visibility": "public" - }, - { - "canonicalName": "Rebaser.UniVars", - "id": 6945, - "members": [ - { - "constant": false, - "id": 6940, - "name": "yamsToUni", - "nodeType": "VariableDeclaration", - "scope": 6945, - "src": "505:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6939, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "505:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6942, - "name": "amountFromReserves", - "nodeType": "VariableDeclaration", - "scope": 6945, - "src": "530:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6941, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "530:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6944, - "name": "mintToReserves", - "nodeType": "VariableDeclaration", - "scope": 6945, - "src": "564:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "564:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "UniVars", - "nodeType": "StructDefinition", - "scope": 8597, - "src": "482:111:14", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6953, - "name": "TransactionFailed", - "nodeType": "EventDefinition", - "parameters": { - "id": 6952, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6947, - "indexed": true, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 6953, - "src": "623:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6946, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "623:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6949, - "indexed": false, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 6953, - "src": "652:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6948, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "652:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6951, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6953, - "src": "664:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6950, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "664:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "622:53:14" - }, - "src": "599:77:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 6959, - "name": "NewMaxSlippageFactor", - "nodeType": "EventDefinition", - "parameters": { - "id": 6958, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6955, - "indexed": false, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 6959, - "src": "709:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6954, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "709:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6957, - "indexed": false, - "name": "newSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 6959, - "src": "736:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6956, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "736:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "708:54:14" - }, - "src": "682:81:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 6965, - "name": "NewDeviationThreshold", - "nodeType": "EventDefinition", - "parameters": { - "id": 6964, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6961, - "indexed": false, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 6965, - "src": "797:29:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6960, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "797:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6963, - "indexed": false, - "name": "newDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 6965, - "src": "828:29:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6962, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "828:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "796:62:14" - }, - "src": "769:90:14" - }, - { - "anonymous": false, - "documentation": "@notice Sets the treasury mint percentage of rebase", - "id": 6971, - "name": "NewRebaseMintPercent", - "nodeType": "EventDefinition", - "parameters": { - "id": 6970, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6967, - "indexed": false, - "name": "oldRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 6971, - "src": "967:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6966, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "967:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6969, - "indexed": false, - "name": "newRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 6971, - "src": "994:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6968, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "994:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "966:54:14" - }, - "src": "940:81:14" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 6977, - "name": "NewReserveContract", - "nodeType": "EventDefinition", - "parameters": { - "id": 6976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6973, - "indexed": false, - "name": "oldReserveContract", - "nodeType": "VariableDeclaration", - "scope": 6977, - "src": "1110:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1110:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6975, - "indexed": false, - "name": "newReserveContract", - "nodeType": "VariableDeclaration", - "scope": 6977, - "src": "1138:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6974, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1138:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1109:56:14" - }, - "src": "1085:81:14" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 6987, - "name": "TreasuryIncreased", - "nodeType": "EventDefinition", - "parameters": { - "id": 6986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6979, - "indexed": false, - "name": "reservesAdded", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1253:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1253:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6981, - "indexed": false, - "name": "yamsSold", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1276:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6980, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1276:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6983, - "indexed": false, - "name": "yamsFromReserves", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1294:24:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6982, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1294:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6985, - "indexed": false, - "name": "yamsToReserves", - "nodeType": "VariableDeclaration", - "scope": 6987, - "src": "1320:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6984, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1320:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1252:91:14" - }, - "src": "1229:115:14" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 6993, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 6992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6989, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 6993, - "src": "1443:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1443:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6991, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 6993, - "src": "1466:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1466:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1442:46:14" - }, - "src": "1423:66:14" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 6999, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 6998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6995, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 6999, - "src": "1573:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6994, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1573:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6997, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 6999, - "src": "1589:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1589:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1572:32:14" - }, - "src": "1560:45:14" - }, - { - "constant": false, - "id": 7002, - "name": "transactions", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1653:33:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction[]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 7000, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6938, - "src": "1653:11:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction" - } - }, - "id": 7001, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1653:13:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage_ptr", - "typeString": "struct Rebaser.Transaction[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7004, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1729:18:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7003, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1729:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7006, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1797:25:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7005, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1797:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7008, - "name": "rebaseLag", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1876:24:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7007, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1876:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7010, - "name": "targetRate", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "1925:25:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1925:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7012, - "name": "rebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2025:29:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7011, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2025:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7014, - "name": "deviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2361:33:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2361:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7016, - "name": "minRebaseTimeIntervalSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2470:39:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7015, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2470:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7018, - "name": "lastRebaseTimestampSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2564:37:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7017, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2564:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7020, - "name": "rebaseWindowOffsetSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2793:36:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7019, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2793:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7022, - "name": "rebaseWindowLengthSec", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "2933:36:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7021, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2933:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7024, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3027:20:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7023, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3027:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7026, - "name": "rebasingActive", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3157:26:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7025, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3157:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 7029, - "name": "rebaseDelay", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3248:46:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7027, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3248:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3132", - "id": 7028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3286:8:14", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7031, - "name": "timeOfTWAPInit", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3336:29:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7030, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3336:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7033, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3397:25:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3397:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7035, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3450:27:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7034, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3450:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7037, - "name": "reservesContract", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3515:31:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7036, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3515:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7039, - "name": "uniswap_pair", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3589:27:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3589:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7041, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3652:33:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 7040, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3652:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 7043, - "name": "priceCumulativeLast", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "3727:34:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7042, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3727:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7045, - "name": "maxSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "4076:32:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4076:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7047, - "name": "isToken0", - "nodeType": "VariableDeclaration", - "scope": 8597, - "src": "4171:20:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7046, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4171:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 7156, - "nodeType": "Block", - "src": "4363:1245:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7058, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "4375:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3132", - "id": 7059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4402:8:14", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "src": "4375:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7061, - "nodeType": "ExpressionStatement", - "src": "4375:35:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7062, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "4422:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3336303030", - "id": 7063, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4446:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_36000_by_1", - "typeString": "int_const 36000" - }, - "value": "36000" - }, - "src": "4422:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7065, - "nodeType": "ExpressionStatement", - "src": "4422:29:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7066, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "4463:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7067, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7055, - "src": "4482:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4463:36:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7069, - "nodeType": "ExpressionStatement", - "src": "4463:36:14" - }, - { - "assignments": [ - 7071, - 7073 - ], - "declarations": [ - { - "constant": false, - "id": 7071, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 7156, - "src": "4512:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7070, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4512:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7073, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 7156, - "src": "4528:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7072, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4528:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7078, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7075, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7049, - "src": "4557:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7076, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7051, - "src": "4570:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7074, - "name": "sortTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8495, - "src": "4546:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$_t_address_$_t_address_$", - "typeString": "function (address,address) pure returns (address,address)" - } - }, - "id": 7077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4546:38:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4511:73:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7079, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7071, - "src": "4648:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7080, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7049, - "src": "4658:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4648:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7091, - "nodeType": "Block", - "src": "4721:45:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7087, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "4737:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 7088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4748:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4737:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7090, - "nodeType": "ExpressionStatement", - "src": "4737:16:14" - } - ] - }, - "id": 7092, - "nodeType": "IfStatement", - "src": "4644:122:14", - "trueBody": { - "id": 7086, - "nodeType": "Block", - "src": "4671:44:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7082, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "4687:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 7083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4698:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "4687:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7085, - "nodeType": "ExpressionStatement", - "src": "4687:15:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 7099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7093, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "4816:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7095, - "name": "uniswap_factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7053, - "src": "4839:15:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7096, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7071, - "src": "4856:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7097, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7073, - "src": "4864:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7094, - "name": "pairFor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8452, - "src": "4831:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_address_$returns$_t_address_$", - "typeString": "function (address,address,address) pure returns (address)" - } - }, - "id": 7098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4831:40:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4816:55:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7100, - "nodeType": "ExpressionStatement", - "src": "4816:55:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7101, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "4926:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7102, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7055, - "src": "4945:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4926:36:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7104, - "nodeType": "ExpressionStatement", - "src": "4926:36:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7105, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7035, - "src": "5057:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7106, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7051, - "src": "5072:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5057:28:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7108, - "nodeType": "ExpressionStatement", - "src": "5057:28:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7109, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "5098:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7110, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7049, - "src": "5111:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5098:24:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7112, - "nodeType": "ExpressionStatement", - "src": "5098:24:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7113, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "5204:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - }, - "id": 7118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35343039323538", - "id": 7114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5224:7:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5409258_by_1", - "typeString": "int_const 5409258" - }, - "value": "5409258" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - }, - "id": 7117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5234:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5238:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5234:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - } - }, - "src": "5224:16:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - } - }, - "src": "5204:36:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7120, - "nodeType": "ExpressionStatement", - "src": "5204:36:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7121, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "5273:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5286:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5290:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "5286:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "5273:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7126, - "nodeType": "ExpressionStatement", - "src": "5273:19:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7127, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7008, - "src": "5376:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5388:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5376:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7130, - "nodeType": "ExpressionStatement", - "src": "5376:14:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7131, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7012, - "src": "5420:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 7134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5437:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 7133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5441:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "5437:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "5420:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7136, - "nodeType": "ExpressionStatement", - "src": "5420:23:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7137, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "5472:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - }, - "id": 7142, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 7138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5493:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - }, - "id": 7141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5497:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3136", - "id": 7140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5501:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_16_by_1", - "typeString": "int_const 16" - }, - "value": "16" - }, - "src": "5497:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - } - }, - "src": "5493:10:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - } - }, - "src": "5472:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7144, - "nodeType": "ExpressionStatement", - "src": "5472:31:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7145, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7022, - "src": "5540:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_900_by_1", - "typeString": "int_const 900" - }, - "id": 7148, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 7146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5564:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 7147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5569:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "src": "5564:7:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_900_by_1", - "typeString": "int_const 900" - } - }, - "src": "5540:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7150, - "nodeType": "ExpressionStatement", - "src": "5540:31:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7151, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "5584:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7152, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "5590:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5590:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5584:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7155, - "nodeType": "ExpressionStatement", - "src": "5584:16:14" - } - ] - }, - "documentation": null, - "id": 7157, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7056, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7049, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4219:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7048, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4219:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7051, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4248:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7050, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4248:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7053, - "name": "uniswap_factory", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4279:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7052, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4279:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7055, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 7157, - "src": "4312:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7054, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4312:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4209:134:14" - }, - "returnParameters": { - "id": 7057, - "nodeType": "ParameterList", - "parameters": [], - "src": "4363:0:14" - }, - "scope": 8597, - "src": "4198:1410:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7177, - "nodeType": "Block", - "src": "5760:185:14", - "statements": [ - { - "assignments": [ - 7165 - ], - "declarations": [ - { - "constant": false, - "id": 7165, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 7177, - "src": "5770:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5770:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7167, - "initialValue": { - "argumentTypes": null, - "id": 7166, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7159, - "src": "5798:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5770:46:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7168, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "5826:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7169, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7159, - "src": "5846:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5826:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7171, - "nodeType": "ExpressionStatement", - "src": "5826:38:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7173, - "name": "oldSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7165, - "src": "5900:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7174, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7159, - "src": "5919:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7172, - "name": "NewMaxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6959, - "src": "5879:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 7175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5879:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7176, - "nodeType": "EmitStatement", - "src": "5874:64:14" - } - ] - }, - "documentation": "@notice Updates slippage factor\n ", - "id": 7178, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7162, - "modifierName": { - "argumentTypes": null, - "id": 7161, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "5748:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "5748:7:14" - } - ], - "name": "setMaxSlippageFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7159, - "name": "maxSlippageFactor_", - "nodeType": "VariableDeclaration", - "scope": 7178, - "src": "5697:26:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5697:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5696:28:14" - }, - "returnParameters": { - "id": 7163, - "nodeType": "ParameterList", - "parameters": [], - "src": "5760:0:14" - }, - "scope": 8597, - "src": "5667:278:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7198, - "nodeType": "Block", - "src": "6091:153:14", - "statements": [ - { - "assignments": [ - 7186 - ], - "declarations": [ - { - "constant": false, - "id": 7186, - "name": "oldPerc", - "nodeType": "VariableDeclaration", - "scope": 7198, - "src": "6101:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7185, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6101:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7188, - "initialValue": { - "argumentTypes": null, - "id": 7187, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7180, - "src": "6119:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6101:33:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7189, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7012, - "src": "6144:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7190, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7180, - "src": "6161:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6144:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7192, - "nodeType": "ExpressionStatement", - "src": "6144:32:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7194, - "name": "oldPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7186, - "src": "6212:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7195, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7180, - "src": "6221:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7193, - "name": "NewRebaseMintPercent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6971, - "src": "6191:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 7196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6191:46:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7197, - "nodeType": "EmitStatement", - "src": "6186:51:14" - } - ] - }, - "documentation": "@notice Updates slippage factor\n ", - "id": 7199, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7183, - "modifierName": { - "argumentTypes": null, - "id": 7182, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "6079:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6079:7:14" - } - ], - "name": "setRebaseMintPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7181, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7180, - "name": "rebaseMintPerc_", - "nodeType": "VariableDeclaration", - "scope": 7199, - "src": "6031:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6031:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6030:25:14" - }, - "returnParameters": { - "id": 7184, - "nodeType": "ParameterList", - "parameters": [], - "src": "6091:0:14" - }, - "scope": 8597, - "src": "6004:240:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7219, - "nodeType": "Block", - "src": "6395:182:14", - "statements": [ - { - "assignments": [ - 7207 - ], - "declarations": [ - { - "constant": false, - "id": 7207, - "name": "oldReservesContract", - "nodeType": "VariableDeclaration", - "scope": 7219, - "src": "6405:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7206, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6405:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7209, - "initialValue": { - "argumentTypes": null, - "id": 7208, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "6435:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6405:46:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7210, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "6461:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7211, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7201, - "src": "6480:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6461:36:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7213, - "nodeType": "ExpressionStatement", - "src": "6461:36:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7215, - "name": "oldReservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7207, - "src": "6531:19:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7216, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7201, - "src": "6552:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7214, - "name": "NewReserveContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6977, - "src": "6512:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6512:58:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7218, - "nodeType": "EmitStatement", - "src": "6507:63:14" - } - ] - }, - "documentation": "@notice Updates reserve contract\n ", - "id": 7220, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7204, - "modifierName": { - "argumentTypes": null, - "id": 7203, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "6383:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6383:7:14" - } - ], - "name": "setReserveContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7202, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7201, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 7220, - "src": "6333:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7200, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6333:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6332:27:14" - }, - "returnParameters": { - "id": 7205, - "nodeType": "ParameterList", - "parameters": [], - "src": "6395:0:14" - }, - "scope": 8597, - "src": "6305:272:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7240, - "nodeType": "Block", - "src": "6799:141:14", - "statements": [ - { - "assignments": [ - 7228 - ], - "declarations": [ - { - "constant": false, - "id": 7228, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 7240, - "src": "6809:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7227, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6809:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7230, - "initialValue": { - "argumentTypes": null, - "id": 7229, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "6833:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6809:34:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7231, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "6853:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7232, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7222, - "src": "6866:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6853:24:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7234, - "nodeType": "ExpressionStatement", - "src": "6853:24:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7236, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7228, - "src": "6906:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7237, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7222, - "src": "6921:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7235, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6993, - "src": "6892:13:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6892:41:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7239, - "nodeType": "EmitStatement", - "src": "6887:46:14" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 7241, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7225, - "modifierName": { - "argumentTypes": null, - "id": 7224, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "6787:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6787:7:14" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7223, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7222, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 7241, - "src": "6741:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6741:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6740:21:14" - }, - "returnParameters": { - "id": 7226, - "nodeType": "ParameterList", - "parameters": [], - "src": "6799:0:14" - }, - "scope": 8597, - "src": "6717:223:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7271, - "nodeType": "Block", - "src": "7054:185:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7245, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "7072:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7072:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7247, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "7086:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7072:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 7249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7098:10:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 7244, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7064:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7064:45:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7251, - "nodeType": "ExpressionStatement", - "src": "7064:45:14" - }, - { - "assignments": [ - 7253 - ], - "declarations": [ - { - "constant": false, - "id": 7253, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "7119:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7252, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7119:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7255, - "initialValue": { - "argumentTypes": null, - "id": 7254, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "7136:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7119:20:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7256, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "7149:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7257, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "7155:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7149:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7259, - "nodeType": "ExpressionStatement", - "src": "7149:16:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7260, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7006, - "src": "7175:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7196:1:14", - "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": 7261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7188:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7188:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7175:23:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7265, - "nodeType": "ExpressionStatement", - "src": "7175:23:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7267, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7253, - "src": "7220:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7268, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7004, - "src": "7228:3:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7266, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6999, - "src": "7213:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7213:19:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7270, - "nodeType": "EmitStatement", - "src": "7208:24:14" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 7272, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7242, - "nodeType": "ParameterList", - "parameters": [], - "src": "7030:2:14" - }, - "returnParameters": { - "id": 7243, - "nodeType": "ParameterList", - "parameters": [], - "src": "7054:0:14" - }, - "scope": 8597, - "src": "7011:228:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7311, - "nodeType": "Block", - "src": "7377:388:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7276, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "7395:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7277, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7413:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7395:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920616374697661746564", - "id": 7279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7416:19:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - }, - "value": "already activated" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - } - ], - "id": 7275, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7387:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7387:49:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7281, - "nodeType": "ExpressionStatement", - "src": "7387:49:14" - }, - { - "assignments": [ - 7283, - 7285 - ], - "declarations": [ - { - "constant": false, - "id": 7283, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 7311, - "src": "7447:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7282, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7447:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7285, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 7311, - "src": "7469:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 7284, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "7469:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7291, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7288, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "7552:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7289, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "7566:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 7286, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6909, - "src": "7505:22:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$6909_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 7287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 6908, - "src": "7505:46:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 7290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7505:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7446:129:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 7295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7293, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7285, - "src": "7593:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7294, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7610:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7593:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f20747261646573", - "id": 7296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7613:11:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - }, - "value": "no trades" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - } - ], - "id": 7292, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7585:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7585:40:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7298, - "nodeType": "ExpressionStatement", - "src": "7585:40:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7299, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7041, - "src": "7635:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7300, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7285, - "src": "7656:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7635:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 7302, - "nodeType": "ExpressionStatement", - "src": "7635:35:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7303, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7043, - "src": "7680:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7304, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7283, - "src": "7702:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7680:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7306, - "nodeType": "ExpressionStatement", - "src": "7680:37:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7307, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "7727:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7308, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7285, - "src": "7744:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7727:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7310, - "nodeType": "ExpressionStatement", - "src": "7727:31:14" - } - ] - }, - "documentation": "@notice Initializes TWAP start point, starts countdown to first rebase\n ", - "id": 7312, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "init_twap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7273, - "nodeType": "ParameterList", - "parameters": [], - "src": "7355:2:14" - }, - "returnParameters": { - "id": 7274, - "nodeType": "ParameterList", - "parameters": [], - "src": "7377:0:14" - }, - "scope": 8597, - "src": "7337:428:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7346, - "nodeType": "Block", - "src": "7929:414:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7316, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "7947:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7964:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7947:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "74776170207761736e7420696e74697469617465642c2063616c6c20696e69745f747761702829", - "id": 7319, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7967:41:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - }, - "value": "twap wasnt intitiated, call init_twap()" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - } - ], - "id": 7315, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "7939:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7939:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7321, - "nodeType": "ExpressionStatement", - "src": "7939:70:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7323, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "8080:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7324, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7031, - "src": "8087:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7325, - "name": "rebaseDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7029, - "src": "8104:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8087:28:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8080:35:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21656e645f64656c6179", - "id": 7328, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8117:12:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - }, - "value": "!end_delay" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - } - ], - "id": 7322, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "8072:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8072:58:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7330, - "nodeType": "ExpressionStatement", - "src": "8072:58:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7333, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "8230:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7332, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6398, - "src": "8218:11:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$6398_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 7334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8218:25:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "price0CumulativeLast", - "nodeType": "MemberAccess", - "referencedDeclaration": 6345, - "src": "8218:46:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8218:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8269:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8218:52:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "216c6971756964", - "id": 7339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8272:9:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_82c512820785d68b2ff3e6fc80f986822072334d156c9a0280e8a7c6fea3b323", - "typeString": "literal_string \"!liquid\"" - }, - "value": "!liquid" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_82c512820785d68b2ff3e6fc80f986822072334d156c9a0280e8a7c6fea3b323", - "typeString": "literal_string \"!liquid\"" - } - ], - "id": 7331, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "8210:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8210:72:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7341, - "nodeType": "ExpressionStatement", - "src": "8210:72:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7342, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7026, - "src": "8315:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 7343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8332:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8315:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7345, - "nodeType": "ExpressionStatement", - "src": "8315:21:14" - } - ] - }, - "documentation": "@notice Activates rebasing\n @dev One way function, cannot be undone, callable by anyone", - "id": 7347, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "activate_rebasing", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7313, - "nodeType": "ParameterList", - "parameters": [], - "src": "7907:2:14" - }, - "returnParameters": { - "id": 7314, - "nodeType": "ParameterList", - "parameters": [], - "src": "7929:0:14" - }, - "scope": 8597, - "src": "7881:462:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7504, - "nodeType": "Block", - "src": "8742:1597:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7351, - "name": "inRebaseWindow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8319, - "src": "8760:14:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 7352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8760:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 7350, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "8752:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 7353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8752:25:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7354, - "nodeType": "ExpressionStatement", - "src": "8752:25:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7358, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "8887:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7356, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7018, - "src": "8860:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "8860:26:14", - "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": 7359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8860:52:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 7360, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "8915:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8860:58:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 7355, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "8852:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 7362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8852:67:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7363, - "nodeType": "ExpressionStatement", - "src": "8852:67:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7364, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7018, - "src": "8991:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7373, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "9076:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7369, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "9045:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7367, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "9037:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 6766, - "src": "9037:7:14", - "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": 7370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9037:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7365, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "9016:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "9016:7:14", - "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": 7371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9016:55:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "9016:59:14", - "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": 7374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9016:82:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8991:107:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7376, - "nodeType": "ExpressionStatement", - "src": "8991:107:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7377, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7024, - "src": "9109:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 7380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9127:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 7378, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7024, - "src": "9117:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "9117:9:14", - "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": 7381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9117:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9109:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7383, - "nodeType": "ExpressionStatement", - "src": "9109:20:14" - }, - { - "assignments": [ - 7385 - ], - "declarations": [ - { - "constant": false, - "id": 7385, - "name": "exchangeRate", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9177:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9177:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7388, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7386, - "name": "getTWAP", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8189, - "src": "9200:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () returns (uint256)" - } - }, - "id": 7387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9200:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9177:32:14" - }, - { - "assignments": [ - 7390, - 7392 - ], - "declarations": [ - { - "constant": false, - "id": 7390, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9262:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7389, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9262:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7392, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9282:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7391, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9282:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7396, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7394, - "name": "exchangeRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7385, - "src": "9317:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7393, - "name": "computeOffPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8374, - "src": "9299:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_bool_$", - "typeString": "function (uint256) view returns (uint256,bool)" - } - }, - "id": 7395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9299:31:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9261:69:14" - }, - { - "assignments": [ - 7398 - ], - "declarations": [ - { - "constant": false, - "id": 7398, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9341:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7397, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9341:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7400, - "initialValue": { - "argumentTypes": null, - "id": 7399, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7390, - "src": "9362:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9341:31:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7401, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9421:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7404, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7008, - "src": "9449:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7402, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9434:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "9434:14:14", - "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": 7405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9434:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9421:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7407, - "nodeType": "ExpressionStatement", - "src": "9421:38:14" - }, - { - "assignments": [ - 7409 - ], - "declarations": [ - { - "constant": false, - "id": 7409, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9470:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 7408, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10713, - "src": "9470:17:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7413, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7411, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "9512:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7410, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "9494:17:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 7412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9494:29:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9470:53:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 7424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7414, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7392, - "src": "9568:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7415, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9580:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10744, - "src": "9580:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9580:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7418, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9606:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9580:36:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7420, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9619:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10676, - "src": "9619:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9619:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9580:61:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "9568:73:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7436, - "nodeType": "IfStatement", - "src": "9564:165:14", - "trueBody": { - "id": 7435, - "nodeType": "Block", - "src": "9643:86:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7425, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9657:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7426, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9670:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10676, - "src": "9670:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9670:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7429, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9695:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10744, - "src": "9695:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9670:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9657:61:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7434, - "nodeType": "ExpressionStatement", - "src": "9657:61:14" - } - ] - } - }, - { - "assignments": [ - 7438 - ], - "declarations": [ - { - "constant": false, - "id": 7438, - "name": "currSupply", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9740:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7437, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9740:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7442, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7439, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "9761:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "totalSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 10737, - "src": "9761:15:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9761:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9740:38:14" - }, - { - "assignments": [ - 7444 - ], - "declarations": [ - { - "constant": false, - "id": 7444, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "9789:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7443, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9789:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7445, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "9789:18:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 7446, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7392, - "src": "9873:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7479, - "nodeType": "IfStatement", - "src": "9869:214:14", - "trueBody": { - "id": 7478, - "nodeType": "Block", - "src": "9883:200:14", - "statements": [ - { - "assignments": [ - 7448 - ], - "declarations": [ - { - "constant": false, - "id": 7448, - "name": "mintPerc", - "nodeType": "VariableDeclaration", - "scope": 7478, - "src": "9897:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7447, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9897:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7458, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7456, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7454, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9951:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7455, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9955:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9951:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7451, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7012, - "src": "9931:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7449, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9916:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "9916:14:14", - "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": 7452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9916:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "9916:34:14", - "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": 7457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9916:42:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9897:61:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7459, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9972:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7462, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7448, - "src": "10000:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7460, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "9985:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "9985:14:14", - "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": 7463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9985:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9972:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7465, - "nodeType": "ExpressionStatement", - "src": "9972:37:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7466, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7444, - "src": "10023:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10065:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10069:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "10065:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7469, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7448, - "src": "10051:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7467, - "name": "currSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7438, - "src": "10036:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "10036:14:14", - "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": 7470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10036:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "10036:28:14", - "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": 7475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10036:36:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10023:49:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7477, - "nodeType": "ExpressionStatement", - "src": "10023:49:14" - } - ] - } - }, - { - "assignments": [ - 7481 - ], - "declarations": [ - { - "constant": false, - "id": 7481, - "name": "supplyAfterRebase", - "nodeType": "VariableDeclaration", - "scope": 7504, - "src": "10112:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7480, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10112:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7488, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7484, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7024, - "src": "10151:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7485, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7398, - "src": "10158:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7486, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7392, - "src": "10170:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 7482, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "10140:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "rebase", - "nodeType": "MemberAccess", - "referencedDeclaration": 10694, - "src": "10140:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,bool) external returns (uint256)" - } - }, - "id": 7487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10140:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10112:67:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7490, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "10196:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10744, - "src": "10196:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10196:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7493, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7409, - "src": "10223:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10676, - "src": "10223:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 7495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10223:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10196:49:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 7489, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10761, - "src": "10189:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 7497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10189:57:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7498, - "nodeType": "ExpressionStatement", - "src": "10189:57:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7500, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7444, - "src": "10309:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7501, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7390, - "src": "10321:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7499, - "name": "afterRebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8138, - "src": "10297:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 7502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10297:35:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7503, - "nodeType": "ExpressionStatement", - "src": "10297:35:14" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is CpiOracleRate / baseCpi", - "id": 7505, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7348, - "nodeType": "ParameterList", - "parameters": [], - "src": "8720:2:14" - }, - "returnParameters": { - "id": 7349, - "nodeType": "ParameterList", - "parameters": [], - "src": "8742:0:14" - }, - "scope": 8597, - "src": "8705:1634:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7641, - "nodeType": "Block", - "src": "10495:1403:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7517, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "10563:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10563:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7519, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "10577:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10563:26:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206d73672e73656e646572", - "id": 7521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10591:16:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - }, - "value": "bad msg.sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - } - ], - "id": 7516, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "10555:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10555:53:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7523, - "nodeType": "ExpressionStatement", - "src": "10555:53:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7525, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7507, - "src": "10679:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7527, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "10697:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7526, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10689:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10689:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10679:23:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206f726967696e", - "id": 7530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10704:12:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - }, - "value": "bad origin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - } - ], - "id": 7524, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "10671:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10671:46:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7532, - "nodeType": "ExpressionStatement", - "src": "10671:46:14" - }, - { - "assignments": [ - 7534 - ], - "declarations": [ - { - "constant": false, - "id": 7534, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 7641, - "src": "10728:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 7533, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6945, - "src": "10728:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_storage_ptr", - "typeString": "struct Rebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7541, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7537, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7513, - "src": "10765:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 7538, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6945, - "src": "10772:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - } - ], - "id": 7539, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10771:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - ], - "expression": { - "argumentTypes": null, - "id": 7535, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "10754:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10754:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 7540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10754:27:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10727:54:14" - }, - { - "assignments": [ - 7543 - ], - "declarations": [ - { - "constant": false, - "id": 7543, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7641, - "src": "10792:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 7542, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10713, - "src": "10792:17:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7547, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7545, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "10834:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7544, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "10816:17:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 7546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10816:29:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10792:53:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7548, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "10860:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7549, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "10860:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10889:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10860:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7581, - "nodeType": "Block", - "src": "11141:97:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7576, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "11195:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7577, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11209:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7578, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11209:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7573, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "11186:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 10683, - "src": "11186:8:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 7579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11186:41:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7580, - "nodeType": "ExpressionStatement", - "src": "11186:41:14" - } - ] - }, - "id": 7582, - "nodeType": "IfStatement", - "src": "10856:382:14", - "trueBody": { - "id": 7572, - "nodeType": "Block", - "src": "10892:243:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7555, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "10981:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7556, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "10999:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7557, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11013:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7558, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11013:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7552, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "10964:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 10628, - "src": "10964:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 7559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10964:76:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 7560, - "nodeType": "ExpressionStatement", - "src": "10964:76:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7564, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "11063:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7565, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11077:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7566, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11077:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7567, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11097:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7568, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11097:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11077:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7561, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "11054:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 10683, - "src": "11054:8:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 7570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11054:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7571, - "nodeType": "ExpressionStatement", - "src": "11054:70:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7583, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11287:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11287:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11312:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11287:26:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7596, - "nodeType": "IfStatement", - "src": "11283:107:14", - "trueBody": { - "id": 7595, - "nodeType": "Block", - "src": "11315:75:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7590, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "11338:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7591, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11356:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7592, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11356:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7587, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7543, - "src": "11329:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 10683, - "src": "11329:8:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 7593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11329:50:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7594, - "nodeType": "ExpressionStatement", - "src": "11329:50:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "id": 7597, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "11450:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7639, - "nodeType": "Block", - "src": "11678:212:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7623, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7035, - "src": "11722:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7622, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "11715:6:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11715:20:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 7625, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "11737:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7626, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7509, - "src": "11755:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7619, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6603, - "src": "11692:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$6603_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 7621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6431, - "src": "11692:22:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6156_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11692:71:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7628, - "nodeType": "ExpressionStatement", - "src": "11692:71:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7630, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7509, - "src": "11800:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7631, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11809:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7632, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11809:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7633, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11828:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11828:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7635, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11856:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7636, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11856:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7629, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6987, - "src": "11782:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 7637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11782:97:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7638, - "nodeType": "EmitStatement", - "src": "11777:102:14" - } - ] - }, - "id": 7640, - "nodeType": "IfStatement", - "src": "11446:444:14", - "trueBody": { - "id": 7618, - "nodeType": "Block", - "src": "11460:212:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7602, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7035, - "src": "11504:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7601, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "11497:6:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11497:20:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 7604, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "11519:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7605, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7511, - "src": "11537:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7598, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6603, - "src": "11474:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$6603_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 7600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6431, - "src": "11474:22:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6156_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11474:71:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7607, - "nodeType": "ExpressionStatement", - "src": "11474:71:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7609, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7511, - "src": "11582:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7610, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11591:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7611, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "11591:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7612, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11610:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7613, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "11610:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7614, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7534, - "src": "11638:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7615, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "11638:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7608, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6987, - "src": "11564:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 7616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11564:97:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7617, - "nodeType": "EmitStatement", - "src": "11559:102:14" - } - ] - } - } - ] - }, - "documentation": null, - "id": 7642, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapV2Call", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7514, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7507, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10378:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7506, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10378:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7509, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10402:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7508, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10402:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7511, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10427:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10427:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7513, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 7642, - "src": "10452:17:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 7512, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10452:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10368:107:14" - }, - "returnParameters": { - "id": 7515, - "nodeType": "ParameterList", - "parameters": [], - "src": "10495:0:14" - }, - "scope": 8597, - "src": "10346:1552:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7939, - "nodeType": "Block", - "src": "12018:4159:14", - "statements": [ - { - "assignments": [ - 7650 - ], - "declarations": [ - { - "constant": false, - "id": 7650, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12028:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - }, - "typeName": { - "contractScope": null, - "id": 7649, - "name": "UniswapPair", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6398, - "src": "12028:11:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7654, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7652, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "12059:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7651, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6398, - "src": "12047:11:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$6398_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 7653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12047:25:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12028:44:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7655, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "12083:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sync", - "nodeType": "MemberAccess", - "referencedDeclaration": 6390, - "src": "12083:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 7658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12083:11:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7659, - "nodeType": "ExpressionStatement", - "src": "12083:11:14" - }, - { - "assignments": [ - 7661 - ], - "declarations": [ - { - "constant": false, - "id": 7661, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12105:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 7660, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10713, - "src": "12105:17:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7665, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7663, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "12147:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7662, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "12129:17:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 7664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12129:29:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12105:53:14" - }, - { - "assignments": [ - 7667, - 7669, - null - ], - "declarations": [ - { - "constant": false, - "id": 7667, - "name": "token0Reserves", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12194:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7666, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12194:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7669, - "name": "token1Reserves", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12218:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7668, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12218:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 7673, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 7670, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "12246:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6340, - "src": "12246:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "function () view external returns (uint112,uint112,uint32)" - } - }, - "id": 7672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12246:18:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "tuple(uint112,uint112,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12193:71:14" - }, - { - "assignments": [ - 7675 - ], - "declarations": [ - { - "constant": false, - "id": 7675, - "name": "excess", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12334:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7674, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12334:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7680, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7678, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7037, - "src": "12365:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7676, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7661, - "src": "12351:3:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 7677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 10635, - "src": "12351:13:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 7679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12351:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12334:48:14" - }, - { - "assignments": [ - 7682 - ], - "declarations": [ - { - "constant": false, - "id": 7682, - "name": "tokens_to_max_slippage", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12394:30:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7681, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12394:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7688, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7684, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "12446:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7685, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "12462:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7686, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7646, - "src": "12478:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7683, - "name": "uniswapMaxSlippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8012, - "src": "12427:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) returns (uint256)" - } - }, - "id": 7687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12427:62:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12394:95:14" - }, - { - "assignments": [ - 7690 - ], - "declarations": [ - { - "constant": false, - "id": 7690, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 7939, - "src": "12500:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 7689, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6945, - "src": "12500:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_storage_ptr", - "typeString": "struct Rebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7696, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7692, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "12556:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7693, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "12610:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12644:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 7691, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6945, - "src": "12525:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$6945_storage_ptr_$", - "typeString": "type(struct Rebaser.UniVars storage pointer)" - } - }, - "id": 7695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "yamsToUni", - "amountFromReserves", - "mintToReserves" - ], - "nodeType": "FunctionCall", - "src": "12525:131:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12500:156:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 7697, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "12813:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7937, - "nodeType": "Block", - "src": "14448:1723:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7818, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "14466:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7819, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14491:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7820, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14504:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14491:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14466:44:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7935, - "nodeType": "Block", - "src": "14963:1198:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7862, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "14985:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7863, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "15010:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14985:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7933, - "nodeType": "Block", - "src": "15594:553:14", - "statements": [ - { - "assignments": [ - 7900 - ], - "declarations": [ - { - "constant": false, - "id": 7900, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7933, - "src": "15673:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7899, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15673:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7906, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7902, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15706:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7903, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "15730:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7904, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "15746:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7901, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "15693:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15693:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15673:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7907, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15783:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7909, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "15783:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7910, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15812:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15783:51:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7912, - "nodeType": "ExpressionStatement", - "src": "15783:51:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7913, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15856:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7915, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "15856:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7916, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "15881:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15856:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7918, - "nodeType": "ExpressionStatement", - "src": "15856:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7922, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7900, - "src": "16079:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7923, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16090:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7925, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "16101:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7924, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16093:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16093:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7929, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "16119:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7927, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "16108:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16108:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16108:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7919, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "16069:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "16069:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16069:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7932, - "nodeType": "ExpressionStatement", - "src": "16069:59:14" - } - ] - }, - "id": 7934, - "nodeType": "IfStatement", - "src": "14981:1166:14", - "trueBody": { - "id": 7898, - "nodeType": "Block", - "src": "15018:570:14", - "statements": [ - { - "assignments": [ - 7866 - ], - "declarations": [ - { - "constant": false, - "id": 7866, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7898, - "src": "15098:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7865, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15098:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7872, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7868, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15131:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7869, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "15155:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7870, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "15171:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7867, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "15118:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15118:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15098:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7873, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15312:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7875, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "15312:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7876, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "15337:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7877, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "15351:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 7878, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "15376:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15351:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 7880, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15350:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15337:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15312:71:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7883, - "nodeType": "ExpressionStatement", - "src": "15312:71:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7887, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7866, - "src": "15520:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15531:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7890, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "15542:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15534:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15534:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7894, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "15560:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "15549:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15549:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15549:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7884, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "15510:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "15510:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15510:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7897, - "nodeType": "ExpressionStatement", - "src": "15510:59:14" - } - ] - } - } - ] - }, - "id": 7936, - "nodeType": "IfStatement", - "src": "14462:1699:14", - "trueBody": { - "id": 7861, - "nodeType": "Block", - "src": "14512:445:14", - "statements": [ - { - "assignments": [ - 7824 - ], - "declarations": [ - { - "constant": false, - "id": 7824, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7861, - "src": "14585:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7823, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14585:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7832, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7826, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14618:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7827, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14631:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14618:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7829, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "14639:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7830, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "14655:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7825, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "14605:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14605:65:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14585:85:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7833, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14688:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7835, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "14688:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7836, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14708:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7837, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14721:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14708:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14688:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7840, - "nodeType": "ExpressionStatement", - "src": "14688:39:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7841, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14745:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7843, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "14745:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7844, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "14774:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14745:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7846, - "nodeType": "ExpressionStatement", - "src": "14745:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7850, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7824, - "src": "14893:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 7851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14904:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7853, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "14915:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14907:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14907:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7857, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14933:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7855, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "14922:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7856, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14922:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14922:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7847, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "14883:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "14883:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14883:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7860, - "nodeType": "ExpressionStatement", - "src": "14883:59:14" - } - ] - } - } - ] - }, - "id": 7938, - "nodeType": "IfStatement", - "src": "12809:3362:14", - "trueBody": { - "id": 7817, - "nodeType": "Block", - "src": "12823:1619:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7698, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "12841:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7699, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "12866:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7700, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "12879:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12866:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12841:44:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7815, - "nodeType": "Block", - "src": "13338:1094:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7742, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13360:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7743, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13385:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13360:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7813, - "nodeType": "Block", - "src": "13865:553:14", - "statements": [ - { - "assignments": [ - 7780 - ], - "declarations": [ - { - "constant": false, - "id": 7780, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7813, - "src": "13944:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7779, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13944:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7786, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7782, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13977:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7783, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "14001:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7784, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "14017:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7781, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "13964:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13964:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13944:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7787, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14054:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7789, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "14054:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7790, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "14083:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14054:51:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7792, - "nodeType": "ExpressionStatement", - "src": "14054:51:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7793, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14127:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7795, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "14127:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7796, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "14152:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14127:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7798, - "nodeType": "ExpressionStatement", - "src": "14127:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7802, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14350:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 7803, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7780, - "src": "14353:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7805, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "14372:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7804, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14364:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14364:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7809, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "14390:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7807, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "14379:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14379:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14379:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7799, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "14340:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "14340:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14340:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7812, - "nodeType": "ExpressionStatement", - "src": "14340:59:14" - } - ] - }, - "id": 7814, - "nodeType": "IfStatement", - "src": "13356:1062:14", - "trueBody": { - "id": 7778, - "nodeType": "Block", - "src": "13393:466:14", - "statements": [ - { - "assignments": [ - 7746 - ], - "declarations": [ - { - "constant": false, - "id": 7746, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7778, - "src": "13473:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7745, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13473:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7752, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7748, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13506:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7749, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "13530:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7750, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "13546:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7747, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "13493:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13493:68:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13473:88:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7753, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13688:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7755, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6944, - "src": "13688:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7756, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "13713:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7757, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7682, - "src": "13727:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 7758, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13752:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13727:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 7760, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "13726:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13713:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13688:71:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7763, - "nodeType": "ExpressionStatement", - "src": "13688:71:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13791:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 7768, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7746, - "src": "13794:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7770, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "13813:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7769, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13805:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13805:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7774, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13831:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7772, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "13820:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13820:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13820:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7764, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "13781:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "13781:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13781:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7777, - "nodeType": "ExpressionStatement", - "src": "13781:59:14" - } - ] - } - } - ] - }, - "id": 7816, - "nodeType": "IfStatement", - "src": "12837:1595:14", - "trueBody": { - "id": 7741, - "nodeType": "Block", - "src": "12887:445:14", - "statements": [ - { - "assignments": [ - 7704 - ], - "declarations": [ - { - "constant": false, - "id": 7704, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 7741, - "src": "12960:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7703, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12960:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7712, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7706, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "12993:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7707, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13006:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12993:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7709, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7667, - "src": "13014:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7710, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7669, - "src": "13030:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7705, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8072, - "src": "12980:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 7711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12980:65:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12960:85:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7713, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13063:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7715, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 6940, - "src": "13063:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7716, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7644, - "src": "13083:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 7717, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13096:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13083:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13063:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7720, - "nodeType": "ExpressionStatement", - "src": "13063:39:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 7725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7721, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13120:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - }, - "id": 7723, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 6942, - "src": "13120:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7724, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7675, - "src": "13149:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13120:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7726, - "nodeType": "ExpressionStatement", - "src": "13120:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13268:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 7731, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7704, - "src": "13271:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7733, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10836, - "src": "13290:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Rebaser_$8597", - "typeString": "contract Rebaser" - } - ], - "id": 7732, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13282:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13282:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7737, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7690, - "src": "13308:7:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$6945_memory_ptr", - "typeString": "struct Rebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7735, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "13297:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13297:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 7738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13297:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 7727, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7650, - "src": "13258:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$6398", - "typeString": "contract UniswapPair" - } - }, - "id": 7729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 6382, - "src": "13258:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 7739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13258:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7740, - "nodeType": "ExpressionStatement", - "src": "13258:59:14" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 7940, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "buyReserveAndTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7644, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 7940, - "src": "11944:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7643, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11944:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7646, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 7940, - "src": "11972:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7645, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11972:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11934:62:14" - }, - "returnParameters": { - "id": 7648, - "nodeType": "ParameterList", - "parameters": [], - "src": "12018:0:14" - }, - "scope": 8597, - "src": "11904:4273:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8011, - "nodeType": "Block", - "src": "16336:865:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 7951, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "16350:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 8009, - "nodeType": "Block", - "src": "16970:225:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7981, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "16988:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7982, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "17001:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16988:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 8007, - "nodeType": "Block", - "src": "17107:78:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17163:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8003, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17167:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17163:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7997, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "17143:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 7998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17156:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "17143:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7995, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7944, - "src": "17132:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17132:10:14", - "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": 8000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17132:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "17132:30:14", - "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": 8005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17132:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 8006, - "nodeType": "Return", - "src": "17125:45:14" - } - ] - }, - "id": 8008, - "nodeType": "IfStatement", - "src": "16984:201:14", - "trueBody": { - "id": 7994, - "nodeType": "Block", - "src": "17020:81:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7991, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17079:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7990, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17083:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17079:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7986, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "17056:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7984, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7944, - "src": "17045:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17045:10:14", - "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": 7987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17045:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "17045:33:14", - "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": 7992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17045:41:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 7993, - "nodeType": "Return", - "src": "17038:48:14" - } - ] - } - } - ] - }, - "id": 8010, - "nodeType": "IfStatement", - "src": "16346:849:14", - "trueBody": { - "id": 7980, - "nodeType": "Block", - "src": "16360:604:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7952, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "16376:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7953, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "16389:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16376:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7978, - "nodeType": "Block", - "src": "16521:433:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7975, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16934:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7974, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16938:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "16934:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7968, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7946, - "src": "16914:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 7969, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16927:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "16914:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7966, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7942, - "src": "16903:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "16903:10:14", - "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": 7971, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16903:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "16903:30:14", - "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": 7976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16903:38:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 7977, - "nodeType": "Return", - "src": "16896:45:14" - } - ] - }, - "id": 7979, - "nodeType": "IfStatement", - "src": "16372:582:14", - "trueBody": { - "id": 7965, - "nodeType": "Block", - "src": "16408:107:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7960, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16495:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16499:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "16495:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7957, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7045, - "src": "16472:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7955, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7942, - "src": "16461:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "16461:10:14", - "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": 7958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16461:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "16461:33:14", - "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": 7963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16461:41:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7950, - "id": 7964, - "nodeType": "Return", - "src": "16454:48:14" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 8012, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapMaxSlippage", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7947, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7942, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16220:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7941, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16220:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7944, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16244:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16244:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7946, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16268:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7945, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16268:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16210:82:14" - }, - "returnParameters": { - "id": 7950, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7949, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8012, - "src": "16323:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7948, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16323:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16322:9:14" - }, - "scope": 8597, - "src": "16183:1018:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8071, - "nodeType": "Block", - "src": "17486:394:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8024, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8014, - "src": "17503:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8025, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17514:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "17503:12:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54", - "id": 8027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17517:45:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - } - ], - "id": 8023, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "17495:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17495:68:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8029, - "nodeType": "ExpressionStatement", - "src": "17495:68:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8031, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8016, - "src": "17580:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17592:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "17580:13:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8034, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8018, - "src": "17597:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8035, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17610:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "17597:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17580:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459", - "id": 8038, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17613:42:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_LIQUIDITY" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - } - ], - "id": 8030, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "17572:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17572:84:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8040, - "nodeType": "ExpressionStatement", - "src": "17572:84:14" - }, - { - "assignments": [ - 8042 - ], - "declarations": [ - { - "constant": false, - "id": 8042, - "name": "amountInWithFee", - "nodeType": "VariableDeclaration", - "scope": 8071, - "src": "17665:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8041, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17665:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8047, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "393937", - "id": 8045, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17701:3:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - }, - "value": "997" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - } - ], - "expression": { - "argumentTypes": null, - "id": 8043, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8014, - "src": "17688:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17688:12:14", - "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": 8046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17688:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17665:40:14" - }, - { - "assignments": [ - 8049 - ], - "declarations": [ - { - "constant": false, - "id": 8049, - "name": "numerator", - "nodeType": "VariableDeclaration", - "scope": 8071, - "src": "17714:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8048, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17714:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8054, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8052, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8018, - "src": "17751:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8050, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "17731:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17731:19:14", - "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": 8053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17731:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17714:48:14" - }, - { - "assignments": [ - 8056 - ], - "declarations": [ - { - "constant": false, - "id": 8056, - "name": "denominator", - "nodeType": "VariableDeclaration", - "scope": 8071, - "src": "17771:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8055, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17771:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8064, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8062, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "17814:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31303030", - "id": 8059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17804:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - }, - "value": "1000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - } - ], - "expression": { - "argumentTypes": null, - "id": 8057, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8016, - "src": "17790:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "17790:13:14", - "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": 8060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17790:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "17790:23:14", - "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": 8063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17790:40:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17771:59:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8065, - "name": "amountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8021, - "src": "17839:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8066, - "name": "numerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8049, - "src": "17851:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8067, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8056, - "src": "17863:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17851:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17839:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8070, - "nodeType": "ExpressionStatement", - "src": "17839:35:14" - } - ] - }, - "documentation": null, - "id": 8072, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAmountOut", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8019, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8014, - "name": "amountIn", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17350:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8013, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17350:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8016, - "name": "reserveIn", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17373:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8015, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17373:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8018, - "name": "reserveOut", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17397:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8017, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17397:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17340:78:14" - }, - "returnParameters": { - "id": 8022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8021, - "name": "amountOut", - "nodeType": "VariableDeclaration", - "scope": 8072, - "src": "17466:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8020, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17466:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17465:16:14" - }, - "scope": 8597, - "src": "17319:561:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8137, - "nodeType": "Block", - "src": "17991:572:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8079, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8074, - "src": "18005:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18018:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18005:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8088, - "nodeType": "IfStatement", - "src": "18001:136:14", - "trueBody": { - "id": 8087, - "nodeType": "Block", - "src": "18021:116:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8083, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8074, - "src": "18074:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8084, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8076, - "src": "18102:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8082, - "name": "buyReserveAndTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7940, - "src": "18035:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 8085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18035:91:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8086, - "nodeType": "ExpressionStatement", - "src": "18035:91:14" - } - ] - } - }, - { - "body": { - "id": 8135, - "nodeType": "Block", - "src": "18194:363:14", - "statements": [ - { - "assignments": [ - 8101 - ], - "declarations": [ - { - "constant": false, - "id": 8101, - "name": "t", - "nodeType": "VariableDeclaration", - "scope": 8135, - "src": "18208:21:14", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction" - }, - "typeName": { - "contractScope": null, - "id": 8100, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6938, - "src": "18208:11:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8105, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8102, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "18232:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8104, - "indexExpression": { - "argumentTypes": null, - "id": 8103, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18245:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18232:15:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18208:39:14" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8106, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18265:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8107, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 6933, - "src": "18265:9:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8134, - "nodeType": "IfStatement", - "src": "18261:286:14", - "trueBody": { - "id": 8133, - "nodeType": "Block", - "src": "18276:271:14", - "statements": [ - { - "assignments": [ - 8109 - ], - "declarations": [ - { - "constant": false, - "id": 8109, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 8133, - "src": "18294:11:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8108, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "18294:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8116, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8111, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18341:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8112, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 6935, - "src": "18341:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8113, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18356:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8114, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 6937, - "src": "18356:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 8110, - "name": "externalCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8596, - "src": "18328:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (address,bytes memory) returns (bool)" - } - }, - "id": 8115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18328:35:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18294:69:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 8118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "18385:7:14", - "subExpression": { - "argumentTypes": null, - "id": 8117, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8109, - "src": "18386:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8132, - "nodeType": "IfStatement", - "src": "18381:152:14", - "trueBody": { - "id": 8131, - "nodeType": "Block", - "src": "18394:139:14", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8120, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18439:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8121, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 6935, - "src": "18439:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8122, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18454:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8123, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8101, - "src": "18457:1:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage_ptr", - "typeString": "struct Rebaser.Transaction storage pointer" - } - }, - "id": 8124, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 6937, - "src": "18457:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 8119, - "name": "TransactionFailed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6953, - "src": "18421:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,bytes memory)" - } - }, - "id": 8125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18421:43:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8126, - "nodeType": "EmitStatement", - "src": "18416:48:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5472616e73616374696f6e204661696c6564", - "id": 8128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18493:20:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - }, - "value": "Transaction Failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - } - ], - "id": 8127, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10777, - 10778 - ], - "referencedDeclaration": 10778, - "src": "18486:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 8129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18486:28:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8130, - "nodeType": "ExpressionStatement", - "src": "18486:28:14" - } - ] - } - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8093, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18164:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8094, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "18168:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8095, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18168:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18164:23:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8136, - "initializationExpression": { - "assignments": [ - 8090 - ], - "declarations": [ - { - "constant": false, - "id": 8090, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 8136, - "src": "18152:6:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8089, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18152:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8092, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 8091, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18161:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18152:10:14" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 8098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18189:3:14", - "subExpression": { - "argumentTypes": null, - "id": 8097, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8090, - "src": "18189:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8099, - "nodeType": "ExpressionStatement", - "src": "18189:3:14" - }, - "nodeType": "ForStatement", - "src": "18147:410:14" - } - ] - }, - "documentation": null, - "id": 8138, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "afterRebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8074, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 8138, - "src": "17917:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17917:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8076, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 8138, - "src": "17945:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8075, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17945:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17907:62:14" - }, - "returnParameters": { - "id": 8078, - "nodeType": "ParameterList", - "parameters": [], - "src": "17991:0:14" - }, - "scope": 8597, - "src": "17887:676:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8188, - "nodeType": "Block", - "src": "19050:741:14", - "statements": [ - { - "assignments": [ - 8144, - 8146 - ], - "declarations": [ - { - "constant": false, - "id": 8144, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19059:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8143, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19059:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8146, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19081:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 8145, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19081:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8152, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8149, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7039, - "src": "19162:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8150, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7047, - "src": "19176:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 8147, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6909, - "src": "19115:22:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$6909_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 8148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 6908, - "src": "19115:46:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 8151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19115:70:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:127:14" - }, - { - "assignments": [ - 8154 - ], - "declarations": [ - { - "constant": false, - "id": 8154, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19194:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 8153, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19194:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8158, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 8157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8155, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8146, - "src": "19215:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 8156, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7041, - "src": "19232:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19215:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19194:56:14" - }, - { - "assignments": [ - 8162 - ], - "declarations": [ - { - "constant": false, - "id": 8162, - "name": "priceAverage", - "nodeType": "VariableDeclaration", - "scope": 8188, - "src": "19515:40:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 8161, - "name": "FixedPoint.uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5864, - "src": "19515:20:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8174, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8166, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8144, - "src": "19588:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 8167, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7043, - "src": "19606:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19588:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8169, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "19587:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8170, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8154, - "src": "19629:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19587:53:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19579:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 8172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19579:62:14", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "expression": { - "argumentTypes": null, - "id": 8163, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6087, - "src": "19558:10:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$6087_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 8164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "uq112x112", - "nodeType": "MemberAccess", - "referencedDeclaration": 5864, - "src": "19558:20:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$5864_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 8173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19558:84:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19515:127:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8175, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7043, - "src": "19653:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8176, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8144, - "src": "19675:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19653:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8178, - "nodeType": "ExpressionStatement", - "src": "19653:37:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8179, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7041, - "src": "19700:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8180, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8146, - "src": "19721:14:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19700:35:14", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 8182, - "nodeType": "ExpressionStatement", - "src": "19700:35:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8185, - "name": "priceAverage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8162, - "src": "19771:12:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_uq112x112_$5864_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 8183, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6087, - "src": "19753:10:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$6087_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 8184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": 6024, - "src": "19753:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_uq112x112_$5864_memory_ptr_$returns$_t_uint112_$", - "typeString": "function (struct FixedPoint.uq112x112 memory) pure returns (uint112)" - } - }, - "id": 8186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19753:31:14", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "functionReturnParameters": 8142, - "id": 8187, - "nodeType": "Return", - "src": "19746:38:14" - } - ] - }, - "documentation": "@notice Calculates TWAP from uniswap\n * @dev When liquidity is low, this can be manipulated by an end of block -> next block\n attack. We delay the activation of rebases 12 hours after liquidity incentives\n to reduce this attack vector. Additional there is very little supply\n to be able to manipulate this during that time period of highest vuln.", - "id": 8189, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTWAP", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8139, - "nodeType": "ParameterList", - "parameters": [], - "src": "19000:2:14" - }, - "returnParameters": { - "id": 8142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8141, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8189, - "src": "19037:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19037:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19036:9:14" - }, - "scope": 8597, - "src": "18984:807:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8215, - "nodeType": "Block", - "src": "20242:238:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8197, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "20260:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20281:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20260:22:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8196, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "20252:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20252:31:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8201, - "nodeType": "ExpressionStatement", - "src": "20252:31:14" - }, - { - "assignments": [ - 8203 - ], - "declarations": [ - { - "constant": false, - "id": 8203, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 8215, - "src": "20293:29:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8202, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20293:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8205, - "initialValue": { - "argumentTypes": null, - "id": 8204, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "20325:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20293:50:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8206, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "20353:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8207, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8191, - "src": "20374:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20353:40:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8209, - "nodeType": "ExpressionStatement", - "src": "20353:40:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8211, - "name": "oldDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8203, - "src": "20430:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8212, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8191, - "src": "20453:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8210, - "name": "NewDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6965, - "src": "20408:21:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 8213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20408:65:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8214, - "nodeType": "EmitStatement", - "src": "20403:70:14" - } - ] - }, - "documentation": "@notice Sets the deviation threshold fraction. If the exchange rate given by the market\n oracle is within this fractional distance from the targetRate, then no supply\n modifications are made. DECIMALS fixed point number.\n@param deviationThreshold_ The new exchange rate threshold fraction.", - "id": 8216, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8194, - "modifierName": { - "argumentTypes": null, - "id": 8193, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "20230:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "20230:7:14" - } - ], - "name": "setDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8191, - "name": "deviationThreshold_", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "20176:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20176:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20175:29:14" - }, - "returnParameters": { - "id": 8195, - "nodeType": "ParameterList", - "parameters": [], - "src": "20242:0:14" - }, - "scope": 8597, - "src": "20145:335:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8233, - "nodeType": "Block", - "src": "21012:72:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8224, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8218, - "src": "21030:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8225, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21043:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21030:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8223, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "21022:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21022:23:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8228, - "nodeType": "ExpressionStatement", - "src": "21022:23:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8229, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7008, - "src": "21055:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8230, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8218, - "src": "21067:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21055:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8232, - "nodeType": "ExpressionStatement", - "src": "21055:22:14" - } - ] - }, - "documentation": "@notice Sets the rebase lag parameter.\nIt is used to dampen the applied supply adjustment by 1 / rebaseLag\nIf the rebase lag R, equals 1, the smallest value for R, then the full supply\ncorrection is applied on each rebase cycle.\nIf it is greater than 1, then a correction of 1/R of is applied on each rebase.\n@param rebaseLag_ The new rebase lag parameter.", - "id": 8234, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8221, - "modifierName": { - "argumentTypes": null, - "id": 8220, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "21000:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21000:7:14" - } - ], - "name": "setRebaseLag", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8219, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8218, - "name": "rebaseLag_", - "nodeType": "VariableDeclaration", - "scope": 8234, - "src": "20955:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20955:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20954:20:14" - }, - "returnParameters": { - "id": 8222, - "nodeType": "ParameterList", - "parameters": [], - "src": "21012:0:14" - }, - "scope": 8597, - "src": "20933:151:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8251, - "nodeType": "Block", - "src": "21290:75:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8242, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8236, - "src": "21308:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8243, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21322:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21308:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8241, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "21300:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21300:24:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8246, - "nodeType": "ExpressionStatement", - "src": "21300:24:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8247, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "21334:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8248, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8236, - "src": "21347:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21334:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8250, - "nodeType": "ExpressionStatement", - "src": "21334:24:14" - } - ] - }, - "documentation": "@notice Sets the targetRate parameter.\n@param targetRate_ The new target rate parameter.", - "id": 8252, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8239, - "modifierName": { - "argumentTypes": null, - "id": 8238, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "21278:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21278:7:14" - } - ], - "name": "setTargetRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8236, - "name": "targetRate_", - "nodeType": "VariableDeclaration", - "scope": 8252, - "src": "21232:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21232:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21231:21:14" - }, - "returnParameters": { - "id": 8240, - "nodeType": "ParameterList", - "parameters": [], - "src": "21290:0:14" - }, - "scope": 8597, - "src": "21209:156:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8287, - "nodeType": "Block", - "src": "22241:299:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8264, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "22259:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22287:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "22259:29:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8263, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "22251:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22251:38:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8268, - "nodeType": "ExpressionStatement", - "src": "22251:38:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8270, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8256, - "src": "22307:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8271, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "22332:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22307:50:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8269, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "22299:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22299:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8274, - "nodeType": "ExpressionStatement", - "src": "22299:59:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8275, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "22369:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8276, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "22396:25:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22369:52:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8278, - "nodeType": "ExpressionStatement", - "src": "22369:52:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8279, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "22431:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8280, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8256, - "src": "22455:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22431:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8282, - "nodeType": "ExpressionStatement", - "src": "22431:46:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8283, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7022, - "src": "22487:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8284, - "name": "rebaseWindowLengthSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8258, - "src": "22511:22:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22487:46:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8286, - "nodeType": "ExpressionStatement", - "src": "22487:46:14" - } - ] - }, - "documentation": "@notice Sets the parameters which control the timing and frequency of\n rebase operations.\n a) the minimum time period that must elapse between rebase cycles.\n b) the rebase window offset parameter.\n c) the rebase window length parameter.\n@param minRebaseTimeIntervalSec_ More than this much time must pass between rebase\n operations, in seconds.\n@param rebaseWindowOffsetSec_ The number of seconds from the beginning of\nthe rebase interval, where the rebase window begins.\n@param rebaseWindowLengthSec_ The length of the rebase window in seconds.", - "id": 8288, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8261, - "modifierName": { - "argumentTypes": null, - "id": 8260, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "22229:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "22229:7:14" - } - ], - "name": "setRebaseTimingParameters", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8254, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "VariableDeclaration", - "scope": 8288, - "src": "22089:33:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22089:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8256, - "name": "rebaseWindowOffsetSec_", - "nodeType": "VariableDeclaration", - "scope": 8288, - "src": "22132:30:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8255, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22132:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8258, - "name": "rebaseWindowLengthSec_", - "nodeType": "VariableDeclaration", - "scope": 8288, - "src": "22172:30:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22172:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22079:124:14" - }, - "returnParameters": { - "id": 8262, - "nodeType": "ParameterList", - "parameters": [], - "src": "22241:0:14" - }, - "scope": 8597, - "src": "22045:495:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8318, - "nodeType": "Block", - "src": "22752:340:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 8294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "22829:15:14", - "subExpression": { - "argumentTypes": null, - "id": 8293, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7026, - "src": "22830:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8298, - "nodeType": "IfStatement", - "src": "22825:56:14", - "trueBody": { - "id": 8297, - "nodeType": "Block", - "src": "22846:35:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 8295, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22865:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 8292, - "id": 8296, - "nodeType": "Return", - "src": "22858:12:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8301, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "22921:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8299, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "22913:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 6766, - "src": "22913:7:14", - "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": 8302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22913:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8303, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "22950:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22913:58:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8307, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7016, - "src": "22996:24:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8305, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10774, - "src": "22988:3:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 6766, - "src": "22988:7:14", - "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": 8308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22988:33:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8311, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7022, - "src": "23051:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8309, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7020, - "src": "23025:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6630, - "src": "23025:25:14", - "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": 8312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23025:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8313, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23024:50:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22988:86:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "22913:161:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8316, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "22898:187:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8292, - "id": 8317, - "nodeType": "Return", - "src": "22891:194:14" - } - ] - }, - "documentation": "@return If the latest block timestamp is within the rebase time window it, returns true.\n Otherwise, returns false.", - "id": 8319, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "inRebaseWindow", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8289, - "nodeType": "ParameterList", - "parameters": [], - "src": "22722:2:14" - }, - "returnParameters": { - "id": 8292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8291, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8319, - "src": "22746:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8290, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "22746:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22745:6:14" - }, - "scope": 8597, - "src": "22699:393:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8373, - "nodeType": "Block", - "src": "23280:368:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8329, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23319:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8328, - "name": "withinDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8418, - "src": "23294:24:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 8330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23294:30:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8336, - "nodeType": "IfStatement", - "src": "23290:78:14", - "trueBody": { - "id": 8335, - "nodeType": "Block", - "src": "23326:42:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23348:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 8332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23351:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 8333, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23347:10:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_bool_$", - "typeString": "tuple(int_const 0,bool)" - } - }, - "functionReturnParameters": 8327, - "id": 8334, - "nodeType": "Return", - "src": "23340:17:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8337, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23440:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 8338, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23447:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23440:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 8371, - "nodeType": "Block", - "src": "23553:89:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8366, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23612:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8363, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23600:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23604:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "23600:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8358, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23590:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8356, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23575:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "23575:14:14", - "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": 8359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23575:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "23575:24:14", - "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": 8364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23575:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "23575:36:14", - "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": 8367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23575:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 8368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23625:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 8369, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23574:57:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 8327, - "id": 8370, - "nodeType": "Return", - "src": "23567:64:14" - } - ] - }, - "id": 8372, - "nodeType": "IfStatement", - "src": "23436:206:14", - "trueBody": { - "id": 8355, - "nodeType": "Block", - "src": "23459:88:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8350, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23518:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8345, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23506:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23510:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "23506:6:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8342, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "23490:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8340, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8321, - "src": "23481:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "23481:8:14", - "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": 8343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23481:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "23481:24:14", - "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": 8348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23481:32:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "23481:36:14", - "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": 8351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23481:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 8352, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23531:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "id": 8353, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23480:56:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 8327, - "id": 8354, - "nodeType": "Return", - "src": "23473:63:14" - } - ] - } - } - ] - }, - "documentation": "@return Computes in % how far off market is from peg", - "id": 8374, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "computeOffPegPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8321, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 8374, - "src": "23201:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23201:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23200:14:14" - }, - "returnParameters": { - "id": 8327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8324, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8374, - "src": "23261:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8323, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23261:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8374, - "src": "23270:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8325, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "23270:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23260:15:14" - }, - "scope": 8597, - "src": "23174:474:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 8417, - "nodeType": "Block", - "src": "23992:294:14", - "statements": [ - { - "assignments": [ - 8382 - ], - "declarations": [ - { - "constant": false, - "id": 8382, - "name": "absoluteDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 8417, - "src": "24002:34:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24002:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8392, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 8390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 8388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24091:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 8389, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24097:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24091:8:14", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8385, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7014, - "src": "24054:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8383, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24039:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6707, - "src": "24039:14:14", - "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": 8386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24039:34:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6723, - "src": "24039:51:14", - "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": 8391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24039:61:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24002:98:14" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8393, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24119:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8394, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24127:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24119:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8398, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24150:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8396, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24141:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "24141:8:14", - "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": 8399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24141:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8400, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8382, - "src": "24164:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24141:49:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24119:71:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8403, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24118:73:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8404, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24208:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8405, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24215:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24208:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8409, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8376, - "src": "24244:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8407, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7010, - "src": "24229:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6646, - "src": "24229:14:14", - "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": 8410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24229:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8411, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8382, - "src": "24252:26:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24229:49:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24208:70:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8414, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24207:72:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24118:161:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8380, - "id": 8416, - "nodeType": "Return", - "src": "24111:168:14" - } - ] - }, - "documentation": "@param rate The current exchange rate, an 18 decimal fixed point number.\n@return If the rate is within the deviation threshold from the target rate, returns true.\n Otherwise, returns false.", - "id": 8418, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withinDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8377, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8376, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 8418, - "src": "23922:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8375, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23922:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23921:14:14" - }, - "returnParameters": { - "id": 8380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8379, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8418, - "src": "23982:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8378, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "23982:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23981:6:14" - }, - "scope": 8597, - "src": "23888:398:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 8451, - "nodeType": "Block", - "src": "24571:296:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8429, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8427, - "src": "24581:4:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "ff", - "id": 8435, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24645:7:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - }, - { - "argumentTypes": null, - "id": 8436, - "name": "factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8420, - "src": "24670:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8440, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8422, - "src": "24722:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8441, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8424, - "src": "24730:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8438, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "24705:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24705:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 8442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24705:32:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8437, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10766, - "src": "24695:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 8443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24695:43:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", - "id": 8444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24756:69:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - } - ], - "expression": { - "argumentTypes": null, - "id": 8433, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10759, - "src": "24611:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24611:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 8445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24611:246:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8432, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10766, - "src": "24601:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 8446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24601:257:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 8431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "24596:4:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 8447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24596:263:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 8430, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "24588:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24588:272:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "24581:279:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8450, - "nodeType": "ExpressionStatement", - "src": "24581:279:14" - } - ] - }, - "documentation": null, - "id": 8452, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "pairFor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8425, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8420, - "name": "factory", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24436:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8419, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24436:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8422, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24461:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8421, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24461:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8424, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24485:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8423, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24485:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24426:79:14" - }, - "returnParameters": { - "id": 8428, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8427, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 8452, - "src": "24553:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8426, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24553:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24552:14:14" - }, - "scope": 8597, - "src": "24410:457:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8494, - "nodeType": "Block", - "src": "25130:238:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8464, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25148:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 8465, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25158:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "25148:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553", - "id": 8467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25166:39:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - }, - "value": "UniswapV2Library: IDENTICAL_ADDRESSES" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - } - ], - "id": 8463, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "25140:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25140:66:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8469, - "nodeType": "ExpressionStatement", - "src": "25140:66:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8470, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8459, - "src": "25217:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8471, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8461, - "src": "25225:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 8472, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "25216:16:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8473, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25235:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 8474, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25244:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "25235:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8479, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25273:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8480, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25281:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 8481, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "25272:16:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "id": 8482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "25235:53:14", - "trueExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8476, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8454, - "src": "25254:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8477, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8456, - "src": "25262:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 8478, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "25253:16:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "src": "25216:72:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8484, - "nodeType": "ExpressionStatement", - "src": "25216:72:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8486, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8459, - "src": "25306:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8488, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25324:1:14", - "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": 8487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25316:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8489, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "25306:20:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a205a45524f5f41444452455353", - "id": 8491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25328:32:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - }, - "value": "UniswapV2Library: ZERO_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - } - ], - "id": 8485, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "25298:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25298:63:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8493, - "nodeType": "ExpressionStatement", - "src": "25298:63:14" - } - ] - }, - "documentation": null, - "id": 8495, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sortTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8454, - "name": "tokenA", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25002:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8453, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25002:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8456, - "name": "tokenB", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25026:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8455, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25026:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24992:54:14" - }, - "returnParameters": { - "id": 8462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8459, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25094:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8458, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25094:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8461, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "25110:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25110:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25093:32:14" - }, - "scope": 8597, - "src": "24973:395:14", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8514, - "nodeType": "Block", - "src": "25715:148:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 8508, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25778:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 8509, - "name": "destination", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8497, - "src": "25809:11:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8510, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8499, - "src": "25840:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "id": 8507, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6938, - "src": "25743:11:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Transaction_$6938_storage_ptr_$", - "typeString": "type(struct Rebaser.Transaction storage pointer)" - } - }, - "id": 8511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "enabled", - "destination", - "data" - ], - "nodeType": "FunctionCall", - "src": "25743:112:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_memory", - "typeString": "struct Rebaser.Transaction memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Transaction_$6938_memory", - "typeString": "struct Rebaser.Transaction memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 8504, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "25725:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25725:17:14", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Transaction_$6938_storage_$returns$_t_uint256_$", - "typeString": "function (struct Rebaser.Transaction storage ref) returns (uint256)" - } - }, - "id": 8512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25725:131:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8513, - "nodeType": "ExpressionStatement", - "src": "25725:131:14" - } - ] - }, - "documentation": "@notice Adds a transaction that gets called for a downstream receiver of rebases\n@param destination Address of contract destination\n@param data Transaction data payload", - "id": 8515, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8502, - "modifierName": { - "argumentTypes": null, - "id": 8501, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "25703:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25703:7:14" - } - ], - "name": "addTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8500, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8497, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 8515, - "src": "25636:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8496, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25636:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8499, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 8515, - "src": "25657:19:14", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8498, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "25657:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25635:42:14" - }, - "returnParameters": { - "id": 8503, - "nodeType": "ParameterList", - "parameters": [], - "src": "25715:0:14" - }, - "scope": 8597, - "src": "25612:251:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8554, - "nodeType": "Block", - "src": "26086:239:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8523, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8517, - "src": "26104:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8524, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26112:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8525, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26112:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26104:27:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206f7574206f6620626f756e6473", - "id": 8527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26133:21:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - }, - "value": "index out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - } - ], - "id": 8522, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "26096:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26096:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8529, - "nodeType": "ExpressionStatement", - "src": "26096:59:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8530, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8517, - "src": "26170:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8531, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26178:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8532, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26178:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26200:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "26178:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26170:31:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8548, - "nodeType": "IfStatement", - "src": "26166:121:14", - "trueBody": { - "id": 8547, - "nodeType": "Block", - "src": "26203:84:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8536, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26217:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8538, - "indexExpression": { - "argumentTypes": null, - "id": 8537, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8517, - "src": "26230:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "26217:19:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8539, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26239:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8544, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8540, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26252:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8541, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26252:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8542, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26274:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "26252:23:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26239:37:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "src": "26217:59:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "id": 8546, - "nodeType": "ExpressionStatement", - "src": "26217:59:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 8552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "26297:21:14", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8549, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26297:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8551, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26297:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8553, - "nodeType": "ExpressionStatement", - "src": "26297:21:14" - } - ] - }, - "documentation": "@param index Index of transaction to remove.\n Transaction ordering may have changed since adding.", - "id": 8555, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8520, - "modifierName": { - "argumentTypes": null, - "id": 8519, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "26074:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26074:7:14" - } - ], - "name": "removeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8518, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8517, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 8555, - "src": "26037:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8516, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "26037:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26036:12:14" - }, - "returnParameters": { - "id": 8521, - "nodeType": "ParameterList", - "parameters": [], - "src": "26086:0:14" - }, - "scope": 8597, - "src": "26010:315:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8579, - "nodeType": "Block", - "src": "26595:144:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8565, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "26613:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8566, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26621:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8567, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26621:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26613:27:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206d75737420626520696e2072616e6765206f662073746f726564207478206c697374", - "id": 8569, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26642:42:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - }, - "value": "index must be in range of stored tx list" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - } - ], - "id": 8564, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "26605:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26605:80:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8571, - "nodeType": "ExpressionStatement", - "src": "26605:80:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8572, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7002, - "src": "26695:12:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$6938_storage_$dyn_storage", - "typeString": "struct Rebaser.Transaction storage ref[] storage ref" - } - }, - "id": 8574, - "indexExpression": { - "argumentTypes": null, - "id": 8573, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "26708:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26695:19:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$6938_storage", - "typeString": "struct Rebaser.Transaction storage ref" - } - }, - "id": 8575, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 6933, - "src": "26695:27:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8576, - "name": "enabled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8559, - "src": "26725:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "26695:37:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8578, - "nodeType": "ExpressionStatement", - "src": "26695:37:14" - } - ] - }, - "documentation": "@param index Index of transaction. Transaction ordering may have changed since adding.\n@param enabled True for enabled, false for disabled.", - "id": 8580, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8562, - "modifierName": { - "argumentTypes": null, - "id": 8561, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6931, - "src": "26583:7:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26583:7:14" - } - ], - "name": "setTransactionEnabled", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8560, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8557, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 8580, - "src": "26532:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8556, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "26532:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8559, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 8580, - "src": "26544:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8558, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "26544:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26531:26:14" - }, - "returnParameters": { - "id": 8563, - "nodeType": "ParameterList", - "parameters": [], - "src": "26595:0:14" - }, - "scope": 8597, - "src": "26501:238:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8595, - "nodeType": "Block", - "src": "27080:1112:14", - "statements": [ - { - "assignments": [ - 8590 - ], - "declarations": [ - { - "constant": false, - "id": 8590, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 8595, - "src": "27090:11:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8589, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27090:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8591, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "27090:11:14" - }, - { - "externalReferences": [ - { - "result": { - "declaration": 8590, - "isOffset": false, - "isSlot": false, - "src": "27468:6:14", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 8584, - "isOffset": false, - "isSlot": false, - "src": "27445:4:14", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 8584, - "isOffset": false, - "isSlot": false, - "src": "27959:4:14", - "valueSize": 1 - } - }, - { - "destination": { - "declaration": 8582, - "isOffset": false, - "isSlot": false, - "src": "27851:11:14", - "valueSize": 1 - } - } - ], - "id": 8592, - "nodeType": "InlineAssembly", - "operations": "{\n let outputAddress := mload(0x40)\n let dataAddress := add(data, 32)\n result := call(sub(gas(), 34710), destination, 0, dataAddress, mload(data), outputAddress, 0)\n}", - "src": "27111:1052:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 8593, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8590, - "src": "28179:6:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8588, - "id": 8594, - "nodeType": "Return", - "src": "28172:13:14" - } - ] - }, - "documentation": "@dev wrapper to call the encoded transactions on downstream consumers.\n@param destination Address of destination contract.\n@param data The encoded data payload.\n@return True on success", - "id": 8596, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "externalCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8585, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8582, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 8596, - "src": "26996:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26996:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8584, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 8596, - "src": "27017:17:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8583, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "27017:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26995:40:14" - }, - "returnParameters": { - "id": 8588, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8587, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8596, - "src": "27070:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8586, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27070:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27069:6:14" - }, - "scope": 8597, - "src": "26974:1218:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 8598, - "src": "243:27951:14" - } - ], - "src": "0:28195:14" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-06T14:57:57.110Z", - "devdoc": { - "methods": { - "_setPendingGov(address)": { - "params": { - "pendingGov_": "The address of the rebaser contract to use for authentication." - } - }, - "activate_rebasing()": { - "details": "One way function, cannot be undone, callable by anyone" - }, - "addTransaction(address,bytes)": { - "params": { - "data": "Transaction data payload", - "destination": "Address of contract destination" - } - }, - "inRebaseWindow()": { - "return": "If the latest block timestamp is within the rebase time window it, returns true. Otherwise, returns false." - }, - "rebase()": { - "details": "The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi" - }, - "removeTransaction(uint256)": { - "params": { - "index": "Index of transaction to remove. Transaction ordering may have changed since adding." - } - }, - "setDeviationThreshold(uint256)": { - "params": { - "deviationThreshold_": "The new exchange rate threshold fraction." - } - }, - "setRebaseLag(uint256)": { - "params": { - "rebaseLag_": "The new rebase lag parameter." - } - }, - "setRebaseTimingParameters(uint256,uint256,uint256)": { - "params": { - "minRebaseTimeIntervalSec_": "More than this much time must pass between rebase operations, in seconds.", - "rebaseWindowLengthSec_": "The length of the rebase window in seconds.", - "rebaseWindowOffsetSec_": "The number of seconds from the beginning of the rebase interval, where the rebase window begins." - } - }, - "setTargetRate(uint256)": { - "params": { - "targetRate_": "The new target rate parameter." - } - }, - "setTransactionEnabled(uint256,bool)": { - "params": { - "enabled": "True for enabled, false for disabled.", - "index": "Index of transaction. Transaction ordering may have changed since adding." - } - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "lets msg.sender accept governance " - }, - "_setPendingGov(address)": { - "notice": "sets the pendingGov" - }, - "activate_rebasing()": { - "notice": "Activates rebasing" - }, - "addTransaction(address,bytes)": { - "notice": "Adds a transaction that gets called for a downstream receiver of rebases" - }, - "init_twap()": { - "notice": "Initializes TWAP start point, starts countdown to first rebase " - }, - "rebase()": { - "notice": "Initiates a new rebase operation, provided the minimum time period has elapsed." - }, - "setDeviationThreshold(uint256)": { - "notice": "Sets the deviation threshold fraction. If the exchange rate given by the market oracle is within this fractional distance from the targetRate, then no supply modifications are made. DECIMALS fixed point number." - }, - "setMaxSlippageFactor(uint256)": { - "notice": "Updates slippage factor " - }, - "setRebaseLag(uint256)": { - "notice": "Sets the rebase lag parameter. It is used to dampen the applied supply adjustment by 1 / rebaseLag If the rebase lag R, equals 1, the smallest value for R, then the full supply correction is applied on each rebase cycle. If it is greater than 1, then a correction of 1/R of is applied on each rebase." - }, - "setRebaseMintPerc(uint256)": { - "notice": "Updates slippage factor " - }, - "setRebaseTimingParameters(uint256,uint256,uint256)": { - "notice": "Sets the parameters which control the timing and frequency of rebase operations. a) the minimum time period that must elapse between rebase cycles. b) the rebase window offset parameter. c) the rebase window length parameter." - }, - "setReserveContract(address)": { - "notice": "Updates reserve contract " - }, - "setTargetRate(uint256)": { - "notice": "Sets the targetRate parameter." - } - } - } -} \ No newline at end of file diff --git a/build/contracts/SafeERC20.json b/build/contracts/SafeERC20.json deleted file mode 100644 index 7f8f265..0000000 --- a/build/contracts/SafeERC20.json +++ /dev/null @@ -1,5930 +0,0 @@ -{ - "contractName": "SafeERC20", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"methods\":{},\"title\":\"SafeERC20\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Address.sol\":{\"keccak256\":\"0xfcf985fe775d3891eb6f1df2b0926b13392f7411550fbddbb2a51e2dfb4c328f\",\"urls\":[\"bzz-raw://557db9c06dce45db040c1a8a87cc2100cbaa86b3fd7cbdf49acf983e110673df\",\"dweb:/ipfs/QmVRxJhBro2YT42FkofepMfseF4rxbDFNXySA2doFSf2Lq\"]},\"/Users/brockelmore/YAM/contracts/lib/IERC20.sol\":{\"keccak256\":\"0xb654abe85060b241b440e22ead01dabb724dda69034d49b483e5e3e55ee64400\",\"urls\":[\"bzz-raw://53f67e469e2c4dfc10411d72f465a3c5b85939f1df4b2b26f12deb729f260b04\",\"dweb:/ipfs/QmSNUGpXPcmWNDczauAmUgZsypdcAB2pZNi3B2RGpYVyp2\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol\":{\"keccak256\":\"0x00c7887d6e2af7d5971473efbd93d312374d6e8478a6f435d7ec3b62fe62a523\",\"urls\":[\"bzz-raw://787539dc1ebb71a219dee830f1d71188d0b13c2d5f7e7bfd08a3cafa8ec9333c\",\"dweb:/ipfs/QmfFwH2Wt17vqVaeoCMpdXbRUFa3e2Kbm1i6HTybGFXv8h\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820ec0fe15569f02169fafcfe886367b5a3af63bc9cefc4cf81d1c9fb598f21530e64736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820ec0fe15569f02169fafcfe886367b5a3af63bc9cefc4cf81d1c9fb598f21530e64736f6c63430005110032", - "sourceMap": "590:3104:17:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "590:3104:17:-;;;;;;;;", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.5.17;\n\nimport \"./IERC20.sol\";\nimport \"./SafeMath.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "exportedSymbols": { - "SafeERC20": [ - 14805 - ] - }, - "id": 14806, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14602, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:17" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "file": "./IERC20.sol", - "id": 14603, - "nodeType": "ImportDirective", - "scope": 14806, - "sourceUnit": 14359, - "src": "59:22:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "./SafeMath.sol", - "id": 14604, - "nodeType": "ImportDirective", - "scope": 14806, - "sourceUnit": 14993, - "src": "82:24:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Address.sol", - "file": "./Address.sol", - "id": 14605, - "nodeType": "ImportDirective", - "scope": 14806, - "sourceUnit": 14004, - "src": "107:23:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 14805, - "linearizedBaseContracts": [ - 14805 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 14608, - "libraryName": { - "contractScope": null, - "id": 14606, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "620:8:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "614:27:17", - "typeName": { - "id": 14607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "633:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 14611, - "libraryName": { - "contractScope": null, - "id": 14609, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14003, - "src": "652:7:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "646:26:17", - "typeName": { - "id": 14610, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 14632, - "nodeType": "Block", - "src": "750:103:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14621, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14613, - "src": "780:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14624, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14613, - "src": "810:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14312, - "src": "810:14:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "810:23:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14627, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14615, - "src": "835:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14628, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14617, - "src": "839:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14622, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "787:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "787:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "787:58:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14620, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "760:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "760:86:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14631, - "nodeType": "ExpressionStatement", - "src": "760:86:17" - } - ] - }, - "documentation": null, - "id": 14633, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14618, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14613, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14633, - "src": "700:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14612, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "700:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14615, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14633, - "src": "714:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14614, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "714:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14617, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14633, - "src": "726:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14616, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "726:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "699:41:17" - }, - "returnParameters": { - "id": 14619, - "nodeType": "ParameterList", - "parameters": [], - "src": "750:0:17" - }, - "scope": 14805, - "src": "678:175:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14657, - "nodeType": "Block", - "src": "949:113:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14645, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14635, - "src": "979:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14648, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14635, - "src": "1009:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 14341, - "src": "1009:18:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 14650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1009:27:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14651, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14637, - "src": "1038:4:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14652, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14639, - "src": "1044:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14653, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14641, - "src": "1048:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14646, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "986:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14647, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "986:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "986:68:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14644, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "959:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "959:96:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14656, - "nodeType": "ExpressionStatement", - "src": "959:96:17" - } - ] - }, - "documentation": null, - "id": 14658, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14642, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14635, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "885:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14634, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "885:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14637, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "899:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14636, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "899:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14639, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "913:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14638, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "913:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14641, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "925:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14640, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "925:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "884:55:17" - }, - "returnParameters": { - "id": 14643, - "nodeType": "ParameterList", - "parameters": [], - "src": "949:0:17" - }, - "scope": 14805, - "src": "859:203:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14698, - "nodeType": "Block", - "src": "1398:537:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 14682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14668, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14664, - "src": "1687:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1696:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1687:10:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 14671, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1686:12:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14675, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19316, - "src": "1727:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - ], - "id": 14674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1719:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1719:13:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14677, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14662, - "src": "1734:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 14672, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14660, - "src": "1703:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 14321, - "src": "1703:15:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 14678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1703:39:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1746:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1703:44:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 14681, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1702:46:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1686:62:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 14683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1762:56:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 14667, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1678:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1678:150:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14685, - "nodeType": "ExpressionStatement", - "src": "1678:150:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14687, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14660, - "src": "1858:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14690, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14660, - "src": "1888:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 14330, - "src": "1888:13:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1888:22:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14693, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14662, - "src": "1912:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14694, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14664, - "src": "1921:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14688, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1865:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1865:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1865:62:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14686, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "1838:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1838:90:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14697, - "nodeType": "ExpressionStatement", - "src": "1838:90:17" - } - ] - }, - "documentation": "@dev Deprecated. This function has issues similar to the ones found in\n{IERC20-approve}, and its usage is discouraged.\n * Whenever possible, use {safeIncreaseAllowance} and\n{safeDecreaseAllowance} instead.", - "id": 14699, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14665, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14660, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14699, - "src": "1343:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14659, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "1343:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14662, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14699, - "src": "1357:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14661, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1357:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14664, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14699, - "src": "1374:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14663, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1374:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1342:46:17" - }, - "returnParameters": { - "id": 14666, - "nodeType": "ParameterList", - "parameters": [], - "src": "1398:0:17" - }, - "scope": 14805, - "src": "1322:613:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14733, - "nodeType": "Block", - "src": "2027:197:17", - "statements": [ - { - "assignments": [ - 14709 - ], - "declarations": [ - { - "constant": false, - "id": 14709, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 14733, - "src": "2037:20:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14708, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2037:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14720, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14718, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14705, - "src": "2104:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14713, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19316, - "src": "2084:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - ], - "id": 14712, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2076:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2076:13:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14715, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14703, - "src": "2091:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 14710, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14701, - "src": "2060:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 14321, - "src": "2060:15:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 14716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2060:39:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2060:43:17", - "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": 14719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2060:50:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2037:73:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14722, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14701, - "src": "2140:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14725, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14701, - "src": "2170:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 14330, - "src": "2170:13:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2170:22:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14728, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14703, - "src": "2194:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14729, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14709, - "src": "2203:12:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14723, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2147:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2147:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2147:69:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14721, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "2120:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2120:97:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14732, - "nodeType": "ExpressionStatement", - "src": "2120:97:17" - } - ] - }, - "documentation": null, - "id": 14734, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14706, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14701, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14734, - "src": "1972:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14700, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "1972:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14703, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14734, - "src": "1986:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14702, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1986:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14705, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14734, - "src": "2003:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14704, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2003:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1971:46:17" - }, - "returnParameters": { - "id": 14707, - "nodeType": "ParameterList", - "parameters": [], - "src": "2027:0:17" - }, - "scope": 14805, - "src": "1941:283:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14769, - "nodeType": "Block", - "src": "2316:242:17", - "statements": [ - { - "assignments": [ - 14744 - ], - "declarations": [ - { - "constant": false, - "id": 14744, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 14769, - "src": "2326:20:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14743, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2326:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14756, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14753, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14740, - "src": "2393:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 14754, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2400:43:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14748, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19316, - "src": "2373:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - ], - "id": 14747, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2365:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2365:13:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14750, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14738, - "src": "2380:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 14745, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14736, - "src": "2349:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 14321, - "src": "2349:15:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 14751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:39:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14875, - "src": "2349:43:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:95:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2326:118:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14758, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14736, - "src": "2474:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14761, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14736, - "src": "2504:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 14330, - "src": "2504:13:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2504:22:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14764, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14738, - "src": "2528:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14765, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14744, - "src": "2537:12:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14759, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2481:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14760, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2481:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2481:69:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14757, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "2454:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2454:97:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14768, - "nodeType": "ExpressionStatement", - "src": "2454:97:17" - } - ] - }, - "documentation": null, - "id": 14770, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14736, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14770, - "src": "2261:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14735, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "2261:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14738, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14770, - "src": "2275:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14737, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2275:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14740, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14770, - "src": "2292:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14739, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2292:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2260:46:17" - }, - "returnParameters": { - "id": 14742, - "nodeType": "ParameterList", - "parameters": [], - "src": "2316:0:17" - }, - "scope": 14805, - "src": "2230:328:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14803, - "nodeType": "Block", - "src": "3011:681:17", - "statements": [ - { - "assignments": [ - 14778 - ], - "declarations": [ - { - "constant": false, - "id": 14778, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 14803, - "src": "3360:23:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 14777, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3360:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14786, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14783, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14774, - "src": "3414:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 14784, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3420:34:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14780, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14772, - "src": "3394:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - ], - "id": 14779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3386:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:14:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 14782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "functionCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 13901, - "src": "3386:27:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_address_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 14785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:69:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3360:95:17" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14787, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14778, - "src": "3469:10:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 14788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3469:17:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3489:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3469:21:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 14802, - "nodeType": "IfStatement", - "src": "3465:221:17", - "trueBody": { - "id": 14801, - "nodeType": "Block", - "src": "3492:194:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14794, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14778, - "src": "3609:10:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 14795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3622:4:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 14796, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3621:6:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 14792, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "3598:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3598:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 14797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3598:30:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 14798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3630:44:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 14791, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3590:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3590:85:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14800, - "nodeType": "ExpressionStatement", - "src": "3590:85:17" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 14804, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14772, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14804, - "src": "2970:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14771, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "2970:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14774, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 14804, - "src": "2984:17:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 14773, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2984:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2969:33:17" - }, - "returnParameters": { - "id": 14776, - "nodeType": "ParameterList", - "parameters": [], - "src": "3011:0:17" - }, - "scope": 14805, - "src": "2941:751:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 14806, - "src": "590:3104:17" - } - ], - "src": "33:3662:17" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "exportedSymbols": { - "SafeERC20": [ - 14805 - ] - }, - "id": 14806, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14602, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:17" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "file": "./IERC20.sol", - "id": 14603, - "nodeType": "ImportDirective", - "scope": 14806, - "sourceUnit": 14359, - "src": "59:22:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "./SafeMath.sol", - "id": 14604, - "nodeType": "ImportDirective", - "scope": 14806, - "sourceUnit": 14993, - "src": "82:24:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/Address.sol", - "file": "./Address.sol", - "id": 14605, - "nodeType": "ImportDirective", - "scope": 14806, - "sourceUnit": 14004, - "src": "107:23:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 14805, - "linearizedBaseContracts": [ - 14805 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 14608, - "libraryName": { - "contractScope": null, - "id": 14606, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "620:8:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "614:27:17", - "typeName": { - "id": 14607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "633:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 14611, - "libraryName": { - "contractScope": null, - "id": 14609, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14003, - "src": "652:7:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$14003", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "646:26:17", - "typeName": { - "id": 14610, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 14632, - "nodeType": "Block", - "src": "750:103:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14621, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14613, - "src": "780:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14624, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14613, - "src": "810:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14312, - "src": "810:14:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "810:23:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14627, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14615, - "src": "835:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14628, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14617, - "src": "839:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14622, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "787:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "787:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "787:58:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14620, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "760:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "760:86:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14631, - "nodeType": "ExpressionStatement", - "src": "760:86:17" - } - ] - }, - "documentation": null, - "id": 14633, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14618, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14613, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14633, - "src": "700:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14612, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "700:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14615, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14633, - "src": "714:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14614, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "714:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14617, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14633, - "src": "726:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14616, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "726:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "699:41:17" - }, - "returnParameters": { - "id": 14619, - "nodeType": "ParameterList", - "parameters": [], - "src": "750:0:17" - }, - "scope": 14805, - "src": "678:175:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14657, - "nodeType": "Block", - "src": "949:113:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14645, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14635, - "src": "979:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14648, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14635, - "src": "1009:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 14341, - "src": "1009:18:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 14650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1009:27:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14651, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14637, - "src": "1038:4:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14652, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14639, - "src": "1044:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14653, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14641, - "src": "1048:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14646, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "986:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14647, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "986:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "986:68:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14644, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "959:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "959:96:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14656, - "nodeType": "ExpressionStatement", - "src": "959:96:17" - } - ] - }, - "documentation": null, - "id": 14658, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14642, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14635, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "885:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14634, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "885:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14637, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "899:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14636, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "899:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14639, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "913:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14638, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "913:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14641, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14658, - "src": "925:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14640, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "925:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "884:55:17" - }, - "returnParameters": { - "id": 14643, - "nodeType": "ParameterList", - "parameters": [], - "src": "949:0:17" - }, - "scope": 14805, - "src": "859:203:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14698, - "nodeType": "Block", - "src": "1398:537:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 14682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14668, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14664, - "src": "1687:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1696:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1687:10:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 14671, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1686:12:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14675, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19316, - "src": "1727:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - ], - "id": 14674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1719:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1719:13:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14677, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14662, - "src": "1734:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 14672, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14660, - "src": "1703:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 14321, - "src": "1703:15:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 14678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1703:39:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1746:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1703:44:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 14681, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1702:46:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1686:62:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 14683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1762:56:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 14667, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1678:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1678:150:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14685, - "nodeType": "ExpressionStatement", - "src": "1678:150:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14687, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14660, - "src": "1858:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14690, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14660, - "src": "1888:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 14330, - "src": "1888:13:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1888:22:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14693, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14662, - "src": "1912:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14694, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14664, - "src": "1921:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14688, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1865:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1865:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1865:62:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14686, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "1838:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1838:90:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14697, - "nodeType": "ExpressionStatement", - "src": "1838:90:17" - } - ] - }, - "documentation": "@dev Deprecated. This function has issues similar to the ones found in\n{IERC20-approve}, and its usage is discouraged.\n * Whenever possible, use {safeIncreaseAllowance} and\n{safeDecreaseAllowance} instead.", - "id": 14699, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14665, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14660, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14699, - "src": "1343:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14659, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "1343:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14662, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14699, - "src": "1357:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14661, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1357:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14664, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14699, - "src": "1374:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14663, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1374:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1342:46:17" - }, - "returnParameters": { - "id": 14666, - "nodeType": "ParameterList", - "parameters": [], - "src": "1398:0:17" - }, - "scope": 14805, - "src": "1322:613:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14733, - "nodeType": "Block", - "src": "2027:197:17", - "statements": [ - { - "assignments": [ - 14709 - ], - "declarations": [ - { - "constant": false, - "id": 14709, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 14733, - "src": "2037:20:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14708, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2037:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14720, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14718, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14705, - "src": "2104:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14713, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19316, - "src": "2084:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - ], - "id": 14712, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2076:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2076:13:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14715, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14703, - "src": "2091:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 14710, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14701, - "src": "2060:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 14321, - "src": "2060:15:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 14716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2060:39:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2060:43:17", - "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": 14719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2060:50:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2037:73:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14722, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14701, - "src": "2140:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14725, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14701, - "src": "2170:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 14330, - "src": "2170:13:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2170:22:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14728, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14703, - "src": "2194:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14729, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14709, - "src": "2203:12:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14723, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2147:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2147:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2147:69:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14721, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "2120:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2120:97:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14732, - "nodeType": "ExpressionStatement", - "src": "2120:97:17" - } - ] - }, - "documentation": null, - "id": 14734, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14706, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14701, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14734, - "src": "1972:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14700, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "1972:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14703, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14734, - "src": "1986:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14702, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1986:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14705, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14734, - "src": "2003:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14704, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2003:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1971:46:17" - }, - "returnParameters": { - "id": 14707, - "nodeType": "ParameterList", - "parameters": [], - "src": "2027:0:17" - }, - "scope": 14805, - "src": "1941:283:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14769, - "nodeType": "Block", - "src": "2316:242:17", - "statements": [ - { - "assignments": [ - 14744 - ], - "declarations": [ - { - "constant": false, - "id": 14744, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 14769, - "src": "2326:20:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14743, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2326:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14756, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14753, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14740, - "src": "2393:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 14754, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2400:43:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14748, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19316, - "src": "2373:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$14805", - "typeString": "library SafeERC20" - } - ], - "id": 14747, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2365:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2365:13:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14750, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14738, - "src": "2380:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 14745, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14736, - "src": "2349:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 14321, - "src": "2349:15:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 14751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:39:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 14752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14875, - "src": "2349:43:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:95:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2326:118:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14758, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14736, - "src": "2474:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14761, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14736, - "src": "2504:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 14762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 14330, - "src": "2504:13:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 14763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2504:22:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 14764, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14738, - "src": "2528:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 14765, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14744, - "src": "2537:12:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 14759, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2481:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14760, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2481:22:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 14766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2481:69:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 14757, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14804, - "src": "2454:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 14767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2454:97:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14768, - "nodeType": "ExpressionStatement", - "src": "2454:97:17" - } - ] - }, - "documentation": null, - "id": 14770, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14736, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14770, - "src": "2261:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14735, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "2261:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14738, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14770, - "src": "2275:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14737, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2275:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14740, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14770, - "src": "2292:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14739, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2292:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2260:46:17" - }, - "returnParameters": { - "id": 14742, - "nodeType": "ParameterList", - "parameters": [], - "src": "2316:0:17" - }, - "scope": 14805, - "src": "2230:328:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14803, - "nodeType": "Block", - "src": "3011:681:17", - "statements": [ - { - "assignments": [ - 14778 - ], - "declarations": [ - { - "constant": false, - "id": 14778, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 14803, - "src": "3360:23:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 14777, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3360:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14786, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14783, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14774, - "src": "3414:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 14784, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3420:34:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14780, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14772, - "src": "3394:5:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - ], - "id": 14779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3386:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 14781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:14:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 14782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "functionCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 13901, - "src": "3386:27:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_address_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 14785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:69:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3360:95:17" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14787, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14778, - "src": "3469:10:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 14788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3469:17:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3489:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3469:21:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 14802, - "nodeType": "IfStatement", - "src": "3465:221:17", - "trueBody": { - "id": 14801, - "nodeType": "Block", - "src": "3492:194:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14794, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14778, - "src": "3609:10:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 14795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3622:4:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 14796, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3621:6:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 14792, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "3598:3:17", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 14793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3598:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 14797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3598:30:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 14798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3630:44:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 14791, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3590:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3590:85:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14800, - "nodeType": "ExpressionStatement", - "src": "3590:85:17" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 14804, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14772, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 14804, - "src": "2970:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 14771, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "2970:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14774, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 14804, - "src": "2984:17:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 14773, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2984:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2969:33:17" - }, - "returnParameters": { - "id": 14776, - "nodeType": "ParameterList", - "parameters": [], - "src": "3011:0:17" - }, - "scope": 14805, - "src": "2941:751:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 14806, - "src": "590:3104:17" - } - ], - "src": "33:3662:17" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.297Z", - "devdoc": { - "details": "Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "methods": {}, - "title": "SafeERC20" - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/SafeMath.json b/build/contracts/SafeMath.json deleted file mode 100644 index 2b1c1da..0000000 --- a/build/contracts/SafeMath.json +++ /dev/null @@ -1,4893 +0,0 @@ -{ - "contractName": "SafeMath", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158209e0b05ab2a65222d6fec3e346ca3eda91befd0d943a764eeeecca261e221c35864736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158209e0b05ab2a65222d6fec3e346ca3eda91befd0d943a764eeeecca261e221c35864736f6c63430005110032", - "sourceMap": "623:4578:18:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "623:4578:18:-;;;;;;;;", - "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.5.17;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "exportedSymbols": { - "SafeMath": [ - 14992 - ] - }, - "id": 14993, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14807, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:18" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 14992, - "linearizedBaseContracts": [ - 14992 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 14831, - "nodeType": "Block", - "src": "942:109:18", - "statements": [ - { - "assignments": [ - 14817 - ], - "declarations": [ - { - "constant": false, - "id": 14817, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14831, - "src": "952:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14816, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "952:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14821, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14818, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14809, - "src": "964:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 14819, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14811, - "src": "968:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "964:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "952:17:18" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14823, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14817, - "src": "987:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 14824, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14809, - "src": "992:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "987:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 14826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "995:29:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 14822, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "979:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "979:46:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14828, - "nodeType": "ExpressionStatement", - "src": "979:46:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14829, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14817, - "src": "1043:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14815, - "id": 14830, - "nodeType": "Return", - "src": "1036:8:18" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n * - Addition cannot overflow.", - "id": 14832, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14812, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14809, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14832, - "src": "888:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14808, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "888:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14811, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14832, - "src": "899:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14810, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "899:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "887:22:18" - }, - "returnParameters": { - "id": 14815, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14814, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14832, - "src": "933:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14813, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "933:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "932:9:18" - }, - "scope": 14992, - "src": "875:176:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14847, - "nodeType": "Block", - "src": "1389:67:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14842, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14834, - "src": "1410:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 14843, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14836, - "src": "1413:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 14844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1416:32:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 14841, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 14848, - 14875 - ], - "referencedDeclaration": 14875, - "src": "1406:3:18", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1406:43:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14840, - "id": 14846, - "nodeType": "Return", - "src": "1399:50:18" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n * - Subtraction cannot overflow.", - "id": 14848, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14837, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14834, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14848, - "src": "1335:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14833, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1335:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14836, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14848, - "src": "1346:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14835, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1346:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1334:22:18" - }, - "returnParameters": { - "id": 14840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14839, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14848, - "src": "1380:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14838, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1380:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1379:9:18" - }, - "scope": 14992, - "src": "1322:134:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14874, - "nodeType": "Block", - "src": "1842:92:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14862, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14860, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14852, - "src": "1860:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 14861, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14850, - "src": "1865:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1860:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 14863, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14854, - "src": "1868:12:18", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 14859, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1852:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1852:29:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14865, - "nodeType": "ExpressionStatement", - "src": "1852:29:18" - }, - { - "assignments": [ - 14867 - ], - "declarations": [ - { - "constant": false, - "id": 14867, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14874, - "src": "1891:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1891:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14871, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14868, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14850, - "src": "1903:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 14869, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14852, - "src": "1907:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1903:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1891:17:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14872, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14867, - "src": "1926:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14858, - "id": 14873, - "nodeType": "Return", - "src": "1919:8:18" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n * - Subtraction cannot overflow.", - "id": 14875, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14855, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14850, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1760:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14849, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1760:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14852, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1771:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14851, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1771:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14854, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1782:26:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14853, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1782:6:18", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:50:18" - }, - "returnParameters": { - "id": 14858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14857, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1833:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14856, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1832:9:18" - }, - "scope": 14992, - "src": "1747:187:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14908, - "nodeType": "Block", - "src": "2248:392:18", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14884, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14877, - "src": "2480:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2485:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2480:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 14890, - "nodeType": "IfStatement", - "src": "2476:45:18", - "trueBody": { - "id": 14889, - "nodeType": "Block", - "src": "2488:33:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2509:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 14883, - "id": 14888, - "nodeType": "Return", - "src": "2502:8:18" - } - ] - } - }, - { - "assignments": [ - 14892 - ], - "declarations": [ - { - "constant": false, - "id": 14892, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14908, - "src": "2531:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2531:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14896, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14893, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14877, - "src": "2543:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 14894, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14879, - "src": "2547:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2543:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2531:17:18" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14898, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14892, - "src": "2566:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14899, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14877, - "src": "2570:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2566:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 14901, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14879, - "src": "2575:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2566:10:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 14903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2578:35:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 14897, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2558:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2558:56:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14905, - "nodeType": "ExpressionStatement", - "src": "2558:56:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14906, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14892, - "src": "2632:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14883, - "id": 14907, - "nodeType": "Return", - "src": "2625:8:18" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n * - Multiplication cannot overflow.", - "id": 14909, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14880, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14877, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14909, - "src": "2194:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14876, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2194:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14879, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14909, - "src": "2205:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14878, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2205:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2193:22:18" - }, - "returnParameters": { - "id": 14883, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14882, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14909, - "src": "2239:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14881, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2239:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2238:9:18" - }, - "scope": 14992, - "src": "2181:459:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14924, - "nodeType": "Block", - "src": "3169:63:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14919, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14911, - "src": "3190:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 14920, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14913, - "src": "3193:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 14921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3196:28:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 14918, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 14925, - 14952 - ], - "referencedDeclaration": 14952, - "src": "3186:3:18", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3186:39:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14917, - "id": 14923, - "nodeType": "Return", - "src": "3179:46:18" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14925, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14914, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14911, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14925, - "src": "3115:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3115:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14913, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14925, - "src": "3126:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14912, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3126:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3114:22:18" - }, - "returnParameters": { - "id": 14917, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14916, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14925, - "src": "3160:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14915, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3160:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3159:9:18" - }, - "scope": 14992, - "src": "3102:130:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14951, - "nodeType": "Block", - "src": "3809:177:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14937, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14929, - "src": "3827:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3831:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3827:5:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 14940, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14931, - "src": "3834:12:18", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 14936, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3819:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3819:28:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14942, - "nodeType": "ExpressionStatement", - "src": "3819:28:18" - }, - { - "assignments": [ - 14944 - ], - "declarations": [ - { - "constant": false, - "id": 14944, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14951, - "src": "3857:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3857:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14948, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14945, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14927, - "src": "3869:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14946, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14929, - "src": "3873:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3869:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3857:17:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14949, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14944, - "src": "3978:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14935, - "id": 14950, - "nodeType": "Return", - "src": "3971:8:18" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14952, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14927, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3727:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14926, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3727:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14929, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3738:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3738:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14931, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3749:26:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14930, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3749:6:18", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3726:50:18" - }, - "returnParameters": { - "id": 14935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14934, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3800:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3800:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3799:9:18" - }, - "scope": 14992, - "src": "3714:272:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14967, - "nodeType": "Block", - "src": "4504:61:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14962, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14954, - "src": "4525:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 14963, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14956, - "src": "4528:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 14964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4531:26:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 14961, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 14968, - 14991 - ], - "referencedDeclaration": 14991, - "src": "4521:3:18", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4521:37:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14960, - "id": 14966, - "nodeType": "Return", - "src": "4514:44:18" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14968, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14957, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14954, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14968, - "src": "4450:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14953, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4450:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14956, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14968, - "src": "4461:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14955, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4461:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4449:22:18" - }, - "returnParameters": { - "id": 14960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14959, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14968, - "src": "4495:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14958, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4495:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4494:9:18" - }, - "scope": 14992, - "src": "4437:128:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14990, - "nodeType": "Block", - "src": "5131:68:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14980, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14972, - "src": "5149:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5154:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5149:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 14983, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14974, - "src": "5157:12:18", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 14979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "5141:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5141:29:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14985, - "nodeType": "ExpressionStatement", - "src": "5141:29:18" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14986, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14970, - "src": "5187:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 14987, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14972, - "src": "5191:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5187:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14978, - "id": 14989, - "nodeType": "Return", - "src": "5180:12:18" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14991, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14975, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14970, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5049:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14969, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5049:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14972, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5060:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14971, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5060:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14974, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5071:26:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14973, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5071:6:18", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5048:50:18" - }, - "returnParameters": { - "id": 14978, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14977, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5122:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14976, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5122:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5121:9:18" - }, - "scope": 14992, - "src": "5036:163:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 14993, - "src": "623:4578:18" - } - ], - "src": "33:5169:18" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "exportedSymbols": { - "SafeMath": [ - 14992 - ] - }, - "id": 14993, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14807, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "33:24:18" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 14992, - "linearizedBaseContracts": [ - 14992 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 14831, - "nodeType": "Block", - "src": "942:109:18", - "statements": [ - { - "assignments": [ - 14817 - ], - "declarations": [ - { - "constant": false, - "id": 14817, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14831, - "src": "952:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14816, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "952:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14821, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14818, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14809, - "src": "964:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 14819, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14811, - "src": "968:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "964:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "952:17:18" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14823, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14817, - "src": "987:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 14824, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14809, - "src": "992:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "987:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 14826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "995:29:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 14822, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "979:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "979:46:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14828, - "nodeType": "ExpressionStatement", - "src": "979:46:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14829, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14817, - "src": "1043:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14815, - "id": 14830, - "nodeType": "Return", - "src": "1036:8:18" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n * - Addition cannot overflow.", - "id": 14832, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14812, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14809, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14832, - "src": "888:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14808, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "888:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14811, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14832, - "src": "899:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14810, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "899:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "887:22:18" - }, - "returnParameters": { - "id": 14815, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14814, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14832, - "src": "933:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14813, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "933:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "932:9:18" - }, - "scope": 14992, - "src": "875:176:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14847, - "nodeType": "Block", - "src": "1389:67:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14842, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14834, - "src": "1410:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 14843, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14836, - "src": "1413:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 14844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1416:32:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 14841, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 14848, - 14875 - ], - "referencedDeclaration": 14875, - "src": "1406:3:18", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1406:43:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14840, - "id": 14846, - "nodeType": "Return", - "src": "1399:50:18" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n * - Subtraction cannot overflow.", - "id": 14848, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14837, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14834, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14848, - "src": "1335:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14833, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1335:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14836, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14848, - "src": "1346:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14835, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1346:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1334:22:18" - }, - "returnParameters": { - "id": 14840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14839, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14848, - "src": "1380:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14838, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1380:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1379:9:18" - }, - "scope": 14992, - "src": "1322:134:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14874, - "nodeType": "Block", - "src": "1842:92:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14862, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14860, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14852, - "src": "1860:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 14861, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14850, - "src": "1865:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1860:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 14863, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14854, - "src": "1868:12:18", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 14859, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1852:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1852:29:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14865, - "nodeType": "ExpressionStatement", - "src": "1852:29:18" - }, - { - "assignments": [ - 14867 - ], - "declarations": [ - { - "constant": false, - "id": 14867, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14874, - "src": "1891:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1891:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14871, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14868, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14850, - "src": "1903:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 14869, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14852, - "src": "1907:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1903:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1891:17:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14872, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14867, - "src": "1926:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14858, - "id": 14873, - "nodeType": "Return", - "src": "1919:8:18" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n * - Subtraction cannot overflow.", - "id": 14875, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14855, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14850, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1760:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14849, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1760:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14852, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1771:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14851, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1771:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14854, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1782:26:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14853, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1782:6:18", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:50:18" - }, - "returnParameters": { - "id": 14858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14857, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14875, - "src": "1833:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14856, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1832:9:18" - }, - "scope": 14992, - "src": "1747:187:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14908, - "nodeType": "Block", - "src": "2248:392:18", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14884, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14877, - "src": "2480:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2485:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2480:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 14890, - "nodeType": "IfStatement", - "src": "2476:45:18", - "trueBody": { - "id": 14889, - "nodeType": "Block", - "src": "2488:33:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2509:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 14883, - "id": 14888, - "nodeType": "Return", - "src": "2502:8:18" - } - ] - } - }, - { - "assignments": [ - 14892 - ], - "declarations": [ - { - "constant": false, - "id": 14892, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14908, - "src": "2531:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2531:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14896, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14893, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14877, - "src": "2543:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 14894, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14879, - "src": "2547:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2543:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2531:17:18" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14898, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14892, - "src": "2566:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14899, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14877, - "src": "2570:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2566:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 14901, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14879, - "src": "2575:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2566:10:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 14903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2578:35:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 14897, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2558:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2558:56:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14905, - "nodeType": "ExpressionStatement", - "src": "2558:56:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14906, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14892, - "src": "2632:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14883, - "id": 14907, - "nodeType": "Return", - "src": "2625:8:18" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n * - Multiplication cannot overflow.", - "id": 14909, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14880, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14877, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14909, - "src": "2194:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14876, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2194:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14879, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14909, - "src": "2205:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14878, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2205:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2193:22:18" - }, - "returnParameters": { - "id": 14883, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14882, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14909, - "src": "2239:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14881, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2239:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2238:9:18" - }, - "scope": 14992, - "src": "2181:459:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14924, - "nodeType": "Block", - "src": "3169:63:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14919, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14911, - "src": "3190:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 14920, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14913, - "src": "3193:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 14921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3196:28:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 14918, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 14925, - 14952 - ], - "referencedDeclaration": 14952, - "src": "3186:3:18", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3186:39:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14917, - "id": 14923, - "nodeType": "Return", - "src": "3179:46:18" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14925, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14914, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14911, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14925, - "src": "3115:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3115:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14913, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14925, - "src": "3126:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14912, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3126:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3114:22:18" - }, - "returnParameters": { - "id": 14917, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14916, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14925, - "src": "3160:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14915, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3160:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3159:9:18" - }, - "scope": 14992, - "src": "3102:130:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14951, - "nodeType": "Block", - "src": "3809:177:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14937, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14929, - "src": "3827:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3831:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3827:5:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 14940, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14931, - "src": "3834:12:18", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 14936, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3819:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3819:28:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14942, - "nodeType": "ExpressionStatement", - "src": "3819:28:18" - }, - { - "assignments": [ - 14944 - ], - "declarations": [ - { - "constant": false, - "id": 14944, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 14951, - "src": "3857:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3857:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 14948, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14945, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14927, - "src": "3869:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 14946, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14929, - "src": "3873:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3869:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3857:17:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 14949, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14944, - "src": "3978:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14935, - "id": 14950, - "nodeType": "Return", - "src": "3971:8:18" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14952, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14927, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3727:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14926, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3727:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14929, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3738:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3738:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14931, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3749:26:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14930, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3749:6:18", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3726:50:18" - }, - "returnParameters": { - "id": 14935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14934, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14952, - "src": "3800:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3800:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3799:9:18" - }, - "scope": 14992, - "src": "3714:272:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14967, - "nodeType": "Block", - "src": "4504:61:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 14962, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14954, - "src": "4525:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 14963, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14956, - "src": "4528:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 14964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4531:26:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 14961, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 14968, - 14991 - ], - "referencedDeclaration": 14991, - "src": "4521:3:18", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 14965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4521:37:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14960, - "id": 14966, - "nodeType": "Return", - "src": "4514:44:18" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14968, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14957, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14954, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14968, - "src": "4450:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14953, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4450:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14956, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14968, - "src": "4461:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14955, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4461:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4449:22:18" - }, - "returnParameters": { - "id": 14960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14959, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14968, - "src": "4495:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14958, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4495:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4494:9:18" - }, - "scope": 14992, - "src": "4437:128:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 14990, - "nodeType": "Block", - "src": "5131:68:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14980, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14972, - "src": "5149:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 14981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5154:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5149:6:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 14983, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14974, - "src": "5157:12:18", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 14979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "5141:7:18", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 14984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5141:29:18", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 14985, - "nodeType": "ExpressionStatement", - "src": "5141:29:18" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14986, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14970, - "src": "5187:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 14987, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14972, - "src": "5191:1:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5187:5:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 14978, - "id": 14989, - "nodeType": "Return", - "src": "5180:12:18" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n * - The divisor cannot be zero.", - "id": 14991, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14975, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14970, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5049:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14969, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5049:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14972, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5060:9:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14971, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5060:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14974, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5071:26:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14973, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5071:6:18", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5048:50:18" - }, - "returnParameters": { - "id": 14978, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14977, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14991, - "src": "5122:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14976, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5122:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5121:9:18" - }, - "scope": 14992, - "src": "5036:163:18", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 14993, - "src": "623:4578:18" - } - ], - "src": "33:5169:18" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.310Z", - "devdoc": { - "details": "Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.", - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Timelock.json b/build/contracts/Timelock.json deleted file mode 100644 index e6c9bfd..0000000 --- a/build/contracts/Timelock.json +++ /dev/null @@ -1,13304 +0,0 @@ -{ - "contractName": "Timelock", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "CancelTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ExecuteTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "newDelay", - "type": "uint256" - } - ], - "name": "NewDelay", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "QueueTransaction", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": true, - "inputs": [], - "name": "GRACE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAXIMUM_DELAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MINIMUM_DELAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin_initialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "delay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "queuedTransactions", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "delay_", - "type": "uint256" - } - ], - "name": "setDelay", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingAdmin_", - "type": "address" - } - ], - "name": "setPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "queueTransaction", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "cancelTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":true,\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin_initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/governance/TimeLock.sol\":\"Timelock\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/governance/TimeLock.sol\":{\"keccak256\":\"0x22871570209080c053296091d50a6711c423f4a3d99a13eb6391bdcedc703d31\",\"urls\":[\"bzz-raw://567d949462dfbd0048a3a4b9ec89f26f0e0657b24024a08329cfa9420c24dc63\",\"dweb:/ipfs/QmfGEs9eAGFqBwuR55bJ9g36vdDakXJdfpYYjBMNbUDmGH\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561afc86002556003805460ff19169055611b3c806100426000396000f3fe6080604052600436106100dd5760003560e01c80636fc1f57e1161007f578063c1a287e211610059578063c1a287e21461066e578063e177246e14610683578063f2b06537146106ad578063f851a440146106d7576100dd565b80636fc1f57e1461061b5780637d645fab14610644578063b1b43ae514610659576100dd565b80633a66f901116100bb5780633a66f901146102f85780634dd18bf514610468578063591fcdfe146104a85780636a42b8f814610606576100dd565b80630825f38f146100df5780630e18b681146102a557806326782247146102ba575b005b610230600480360360a08110156100f557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561013257600080fd5b82018360208201111561014457600080fd5b8035906020019184600183028401116401000000008311171561016657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156101b957600080fd5b8201836020820111156101cb57600080fd5b803590602001918460018302840111640100000000831117156101ed57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506106ec915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026a578181015183820152602001610252565b50505050905090810190601f1680156102975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b157600080fd5b506100dd610d7b565b3480156102c657600080fd5b506102cf610e63565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561030457600080fd5b50610456600480360360a081101561031b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561035857600080fd5b82018360208201111561036a57600080fd5b8035906020019184600183028401116401000000008311171561038c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156103df57600080fd5b8201836020820111156103f157600080fd5b8035906020019184600183028401116401000000008311171561041357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e7f915050565b60408051918252519081900360200190f35b34801561047457600080fd5b506100dd6004803603602081101561048b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111f8565b3480156104b457600080fd5b506100dd600480360360a08110156104cb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561050857600080fd5b82018360208201111561051a57600080fd5b8035906020019184600183028401116401000000008311171561053c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561058f57600080fd5b8201836020820111156105a157600080fd5b803590602001918460018302840111640100000000831117156105c357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250611301915050565b34801561061257600080fd5b50610456611605565b34801561062757600080fd5b5061063061160b565b604080519115158252519081900360200190f35b34801561065057600080fd5b50610456611614565b34801561066557600080fd5b5061045661161b565b34801561067a57600080fd5b50610456611621565b34801561068f57600080fd5b506100dd600480360360208110156106a657600080fd5b5035611628565b3480156106b957600080fd5b50610630600480360360208110156106d057600080fd5b503561176a565b3480156106e357600080fd5b506102cf61177f565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461075f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061181b6038913960400191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156107e85781810151838201526020016107d0565b50505050905090810190601f1680156108155780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610848578181015183820152602001610830565b50505050905090810190601f1680156108755780820380516001836020036101000a031916815260200191505b50604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012060035490995060ff16159750610a3296505050505050505760008181526004602052604090205460ff1661092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061196e603d913960400191505060405180910390fd5b8261093461179b565b101561098b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260458152602001806118bd6045913960600191505060405180910390fd5b61099e836212750063ffffffff61179f16565b6109a661179b565b11156109fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603381526020018061188a6033913960400191505060405180910390fd5b600081815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b6060855160001415610a45575083610b1a565b85805190602001208560405160200180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040182805190602001908083835b60208310610ae257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610aa5565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b600060608973ffffffffffffffffffffffffffffffffffffffff1689846040518082805190602001908083835b60208310610b8457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b47565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610be6576040519150601f19603f3d011682016040523d82523d6000602084013e610beb565b606091505b509150915081610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611a51603d913960400191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610cd0578181015183820152602001610cb8565b50505050905090810190601f168015610cfd5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610d30578181015183820152602001610d18565b50505050905090810190601f168015610d5d5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806119ab6038913960400191505060405180910390fd5b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000918216178083556001805490921690915560405173ffffffffffffffffffffffffffffffffffffffff909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180611a1b6036913960400191505060405180910390fd5b610f0a600254610efe61179b565b9063ffffffff61179f16565b821015610f62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526049815260200180611a8e6049913960600191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610feb578181015183820152602001610fd3565b50505050905090810190601f1680156110185780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561104b578181015183820152602001611033565b50505050905090810190601f1680156110785780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508673ffffffffffffffffffffffffffffffffffffffff16817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611150578181015183820152602001611138565b50505050905090810190601f16801561117d5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156111b0578181015183820152602001611198565b50505050905090810190601f1680156111dd5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b60035460ff16156112605733301461125b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806119e36038913960400191505060405180910390fd5b61128c565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314611371576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806118536037913960400191505060405180910390fd5b60008585858585604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156113fa5781810151838201526020016113e2565b50505050905090810190601f1680156114275780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561145a578181015183820152602001611442565b50505050905090810190601f1680156114875780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508573ffffffffffffffffffffffffffffffffffffffff16817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561155f578181015183820152602001611547565b50505050905090810190601f16801561158c5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156115bf5781810151838201526020016115a7565b50505050905090810190601f1680156115ec5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b60035460ff1681565b62278d0081565b61afc881565b6212750081565b333014611680576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611ad76031913960400191505060405180910390fd5b61afc88110156116db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806119026034913960400191505060405180910390fd5b62278d00811115611737576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806119366038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60046020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b4290565b60008282018381101561181357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea265627a7a723158208789d159ab6dd1a785045e71401ff194d2b18d2701e79ee5a6617b692992967764736f6c63430005110032", - "deployedBytecode": "0x6080604052600436106100dd5760003560e01c80636fc1f57e1161007f578063c1a287e211610059578063c1a287e21461066e578063e177246e14610683578063f2b06537146106ad578063f851a440146106d7576100dd565b80636fc1f57e1461061b5780637d645fab14610644578063b1b43ae514610659576100dd565b80633a66f901116100bb5780633a66f901146102f85780634dd18bf514610468578063591fcdfe146104a85780636a42b8f814610606576100dd565b80630825f38f146100df5780630e18b681146102a557806326782247146102ba575b005b610230600480360360a08110156100f557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561013257600080fd5b82018360208201111561014457600080fd5b8035906020019184600183028401116401000000008311171561016657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156101b957600080fd5b8201836020820111156101cb57600080fd5b803590602001918460018302840111640100000000831117156101ed57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506106ec915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026a578181015183820152602001610252565b50505050905090810190601f1680156102975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b157600080fd5b506100dd610d7b565b3480156102c657600080fd5b506102cf610e63565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561030457600080fd5b50610456600480360360a081101561031b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561035857600080fd5b82018360208201111561036a57600080fd5b8035906020019184600183028401116401000000008311171561038c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156103df57600080fd5b8201836020820111156103f157600080fd5b8035906020019184600183028401116401000000008311171561041357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e7f915050565b60408051918252519081900360200190f35b34801561047457600080fd5b506100dd6004803603602081101561048b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111f8565b3480156104b457600080fd5b506100dd600480360360a08110156104cb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561050857600080fd5b82018360208201111561051a57600080fd5b8035906020019184600183028401116401000000008311171561053c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561058f57600080fd5b8201836020820111156105a157600080fd5b803590602001918460018302840111640100000000831117156105c357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250611301915050565b34801561061257600080fd5b50610456611605565b34801561062757600080fd5b5061063061160b565b604080519115158252519081900360200190f35b34801561065057600080fd5b50610456611614565b34801561066557600080fd5b5061045661161b565b34801561067a57600080fd5b50610456611621565b34801561068f57600080fd5b506100dd600480360360208110156106a657600080fd5b5035611628565b3480156106b957600080fd5b50610630600480360360208110156106d057600080fd5b503561176a565b3480156106e357600080fd5b506102cf61177f565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461075f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018061181b6038913960400191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156107e85781810151838201526020016107d0565b50505050905090810190601f1680156108155780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610848578181015183820152602001610830565b50505050905090810190601f1680156108755780820380516001836020036101000a031916815260200191505b50604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012060035490995060ff16159750610a3296505050505050505760008181526004602052604090205460ff1661092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d81526020018061196e603d913960400191505060405180910390fd5b8261093461179b565b101561098b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260458152602001806118bd6045913960600191505060405180910390fd5b61099e836212750063ffffffff61179f16565b6109a661179b565b11156109fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603381526020018061188a6033913960400191505060405180910390fd5b600081815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b6060855160001415610a45575083610b1a565b85805190602001208560405160200180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040182805190602001908083835b60208310610ae257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610aa5565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b600060608973ffffffffffffffffffffffffffffffffffffffff1689846040518082805190602001908083835b60208310610b8457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b47565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610be6576040519150601f19603f3d011682016040523d82523d6000602084013e610beb565b606091505b509150915081610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611a51603d913960400191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610cd0578181015183820152602001610cb8565b50505050905090810190601f168015610cfd5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610d30578181015183820152602001610d18565b50505050905090810190601f168015610d5d5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806119ab6038913960400191505060405180910390fd5b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000918216178083556001805490921690915560405173ffffffffffffffffffffffffffffffffffffffff909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180611a1b6036913960400191505060405180910390fd5b610f0a600254610efe61179b565b9063ffffffff61179f16565b821015610f62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526049815260200180611a8e6049913960600191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610feb578181015183820152602001610fd3565b50505050905090810190601f1680156110185780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561104b578181015183820152602001611033565b50505050905090810190601f1680156110785780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508673ffffffffffffffffffffffffffffffffffffffff16817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611150578181015183820152602001611138565b50505050905090810190601f16801561117d5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156111b0578181015183820152602001611198565b50505050905090810190601f1680156111dd5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b60035460ff16156112605733301461125b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806119e36038913960400191505060405180910390fd5b61128c565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314611371576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260378152602001806118536037913960400191505060405180910390fd5b60008585858585604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156113fa5781810151838201526020016113e2565b50505050905090810190601f1680156114275780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561145a578181015183820152602001611442565b50505050905090810190601f1680156114875780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508573ffffffffffffffffffffffffffffffffffffffff16817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561155f578181015183820152602001611547565b50505050905090810190601f16801561158c5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156115bf5781810151838201526020016115a7565b50505050905090810190601f1680156115ec5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b60035460ff1681565b62278d0081565b61afc881565b6212750081565b333014611680576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611ad76031913960400191505060405180910390fd5b61afc88110156116db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806119026034913960400191505060405180910390fd5b62278d00811115611737576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806119366038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60046020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b4290565b60008282018381101561181357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea265627a7a723158208789d159ab6dd1a785045e71401ff194d2b18d2701e79ee5a6617b692992967764736f6c63430005110032", - "sourceMap": "401:5369:9:-;;;1401:344;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1654:5:9;:18;;-1:-1:-1;;;;;;1654:18:9;1662:10;1654:18;;;1107;1682:5;:21;1713:17;:25;;-1:-1:-1;;1713:25:9;;;401:5369;;;;;;", - "deployedSourceMap": "401:5369:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4071:1529;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;4071:1529:9;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;4071:1529:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4071:1529:9;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4071:1529:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4071:1529:9;;;;;;;;-1:-1:-1;4071:1529:9;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;4071:1529:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4071:1529:9;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4071:1529:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4071:1529:9;;-1:-1:-1;;4071:1529:9;;;-1:-1:-1;4071:1529:9;;-1:-1:-1;;4071:1529:9:i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4071:1529:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:248;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2208:248:9;;;:::i;1247:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1247:27:9;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2897:670;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2897:670:9;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2897:670:9;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;2897:670:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2897:670:9;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2897:670:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2897:670:9;;;;;;;;-1:-1:-1;2897:670:9;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;2897:670:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2897:670:9;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2897:670:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2897:670:9;;-1:-1:-1;;2897:670:9;;;-1:-1:-1;2897:670:9;;-1:-1:-1;;2897:670:9:i;:::-;;;;;;;;;;;;;;;;2462:429;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2462:429:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2462:429:9;;;;:::i;3573:492::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3573:492:9;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3573:492:9;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;3573:492:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3573:492:9;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3573:492:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;3573:492:9;;;;;;;;-1:-1:-1;3573:492:9;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;3573:492:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3573:492:9;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3573:492:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;3573:492:9;;-1:-1:-1;;3573:492:9;;;-1:-1:-1;3573:492:9;;-1:-1:-1;;3573:492:9:i;1280:20::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1280:20:9;;;:::i;1306:29::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1306:29:9;;;:::i;:::-;;;;;;;;;;;;;;;;;;1167:47;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1167:47:9;;;:::i;1067:58::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1067:58:9;;;:::i;1015:46::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1015:46:9;;;:::i;1788:414::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1788:414:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1788:414:9;;:::i;1342:51::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1342:51:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1342:51:9;;:::i;1221:20::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1221:20:9;;;:::i;4071:1529::-;4331:5;;4281:12;;4331:5;;4317:10;:19;4309:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4514:14;4552:6;4560:5;4567:9;4578:4;4584:3;4541:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4541:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4541:47:9;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4541:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4541:47:9;;;22:32:-1;26:21;;;22:32;6:49;;4541:47:9;;;4531:58;;49:4:-1;4531:58:9;;;;4603:17;;4531:58;;-1:-1:-1;4603:17:9;;4599:433;;-1:-1:-1;4599:433:9;;-1:-1:-1;;;;;;;4599:433:9;4642:26;;;;:18;:26;;;;;;;;4634:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4777:3;4754:19;:17;:19::i;:::-;:26;;4746:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4897:21;:3;1054:7;4897:21;:7;:21;:::i;:::-;4874:19;:17;:19::i;:::-;:44;;4866:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5016:5;4987:26;;;:18;:26;;;;;:34;;;;;;4599:433;5043:21;5085:9;5079:23;5106:1;5079:28;5075:175;;;-1:-1:-1;5134:4:9;5075:175;;;5220:9;5204:27;;;;;;5234:4;5180:59;;;;;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;5180:59:9;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;5180:59:9;;;5169:70;;5075:175;5320:12;5334:23;5361:6;:11;;5379:5;5386:8;5361:34;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;5361:34:9;;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;5319:76:9;;;;5413:7;5405:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5529:6;5502:63;;5521:6;5502:63;5537:5;5544:9;5555:4;5561:3;5502:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5502:63:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5502:63:9;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5502:63:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5583:10;4071:1529;-1:-1:-1;;;;;;;;;4071:1529:9:o;2208:248::-;2282:12;;;;2268:10;:26;2260:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2365:5;:18;;2373:10;2365:18;;;;;;;;-1:-1:-1;2393:25:9;;;;;;;;2434:15;;2365:18;2443:5;;;;2434:15;;;2208:248::o;1247:27::-;;;;;;:::o;2897:670::-;3089:7;3134:5;;;;3120:10;:19;3112:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3223:30;3247:5;;3223:19;:17;:19::i;:::-;:23;:30;:23;:30;:::i;:::-;3216:3;:37;;3208:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3342:14;3380:6;3388:5;3395:9;3406:4;3412:3;3369:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3369:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3369:47:9;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3369:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3369:47:9;;;3359:58;;;;;;3342:75;;3456:4;3427:18;:26;3446:6;3427:26;;;;;;;;;;;;:33;;;;;;;;;;;;;;;;;;3501:6;3476:61;;3493:6;3476:61;3509:5;3516:9;3527:4;3533:3;3476:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3476:61:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3476:61:9;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3476:61:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3554:6;2897:670;-1:-1:-1;;;;;;2897:670:9:o;2462:429::-;2611:17;;;;2607:195;;;2650:10;2672:4;2650:27;2642:96;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2607:195;;;2767:17;:24;;;;2787:4;2767:24;;;2607:195;2811:12;:28;;;;;;;;;;;;;;;;2855:29;;2871:12;;;2855:29;;-1:-1:-1;;2855:29:9;2462:429;:::o;3573:492::-;3785:5;;;;3771:10;:19;3763:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3861:14;3899:6;3907:5;3914:9;3925:4;3931:3;3888:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3888:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3888:47:9;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3888:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3888:47:9;;;3878:58;;;;;;3861:75;;3975:5;3946:18;:26;3965:6;3946:26;;;;;;;;;;;;:34;;;;;;;;;;;;;;;;;;4022:6;3996:62;;4014:6;3996:62;4030:5;4037:9;4048:4;4054:3;3996:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3996:62:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3996:62:9;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3996:62:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3573:492;;;;;;:::o;1280:20::-;;;;:::o;1306:29::-;;;;;;:::o;1167:47::-;1207:7;1167:47;:::o;1067:58::-;1107:18;1067:58;:::o;1015:46::-;1054:7;1015:46;:::o;1788:414::-;1859:10;1881:4;1859:27;1851:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1107:18;1958:6;:23;;1950:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1207:7;2056:6;:23;;2048:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2150:5;:14;;;2180:15;;2158:6;;2180:15;;;;;1788:414;:::o;1342:51::-;;;;;;;;;;;;;;;:::o;1221:20::-;;;;;;:::o;5606:162::-;5746:15;5606:162;:::o;875:176:18:-;933:7;964:5;;;987:6;;;;979:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1043:1;875:176;-1:-1:-1;;;875:176:18:o", - "source": "pragma solidity ^0.5.17;\n\n// Original file came from Compound: https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol\n\n\n// Original audit: https://blog.openzeppelin.com/compound-finance-patch-audit/\n// Overview:\n// No Critical\n// No High\n//\n// Changes made by YAM after audit:\n// Formatting, naming, & uint256 instead of uint\n\nimport \"../lib/SafeMath.sol\";\n\ncontract Timelock {\n using SafeMath for uint256;\n\n event NewAdmin(address indexed newAdmin);\n event NewPendingAdmin(address indexed newPendingAdmin);\n event NewDelay(uint indexed newDelay);\n event CancelTransaction(bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta);\n event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta);\n event QueueTransaction(bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta);\n\n uint256 public constant GRACE_PERIOD = 14 days;\n uint256 public constant MINIMUM_DELAY = 12 hours + 2*60*15; // have to be present for 2 rebases\n uint256 public constant MAXIMUM_DELAY = 30 days;\n\n address public admin;\n address public pendingAdmin;\n uint256 public delay;\n bool public admin_initialized;\n\n mapping (bytes32 => bool) public queuedTransactions;\n\n\n constructor()\n public\n {\n /* require(delay_ >= MINIMUM_DELAY, \"Timelock::constructor: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\"); */\n\n admin = msg.sender;\n delay = MINIMUM_DELAY;\n admin_initialized = false;\n }\n\n function() external payable { }\n\n function setDelay(uint256 delay_)\n public\n {\n require(msg.sender == address(this), \"Timelock::setDelay: Call must come from Timelock.\");\n require(delay_ >= MINIMUM_DELAY, \"Timelock::setDelay: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n delay = delay_;\n\n emit NewDelay(delay);\n }\n\n function acceptAdmin()\n public\n {\n require(msg.sender == pendingAdmin, \"Timelock::acceptAdmin: Call must come from pendingAdmin.\");\n admin = msg.sender;\n pendingAdmin = address(0);\n\n emit NewAdmin(admin);\n }\n\n function setPendingAdmin(address pendingAdmin_)\n public\n {\n // allows one time setting of admin for deployment purposes\n if (admin_initialized) {\n require(msg.sender == address(this), \"Timelock::setPendingAdmin: Call must come from Timelock.\");\n } else {\n admin_initialized = true;\n }\n pendingAdmin = pendingAdmin_;\n\n emit NewPendingAdmin(pendingAdmin);\n }\n\n function queueTransaction(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n )\n public\n returns (bytes32)\n {\n require(msg.sender == admin, \"Timelock::queueTransaction: Call must come from admin.\");\n require(eta >= getBlockTimestamp().add(delay), \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n queuedTransactions[txHash] = true;\n\n emit QueueTransaction(txHash, target, value, signature, data, eta);\n return txHash;\n }\n\n function cancelTransaction(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n )\n public\n {\n require(msg.sender == admin, \"Timelock::cancelTransaction: Call must come from admin.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n queuedTransactions[txHash] = false;\n\n emit CancelTransaction(txHash, target, value, signature, data, eta);\n }\n\n function executeTransaction(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n )\n public\n payable\n returns (bytes memory)\n {\n require(msg.sender == admin, \"Timelock::executeTransaction: Call must come from admin.\");\n\n // timelock not enforced prior to updating the admin. This should occur on\n // deployment.\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n if (admin_initialized) {\n require(queuedTransactions[txHash], \"Timelock::executeTransaction: Transaction hasn't been queued.\");\n require(getBlockTimestamp() >= eta, \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\");\n require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), \"Timelock::executeTransaction: Transaction is stale.\");\n\n queuedTransactions[txHash] = false;\n }\n\n\n bytes memory callData;\n\n if (bytes(signature).length == 0) {\n callData = data;\n } else {\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\n }\n\n // solium-disable-next-line security/no-call-value\n (bool success, bytes memory returnData) = target.call.value(value)(callData);\n require(success, \"Timelock::executeTransaction: Transaction execution reverted.\");\n\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\n\n return returnData;\n }\n\n function getBlockTimestamp() internal view returns (uint256) {\n // solium-disable-next-line security/no-block-members\n return block.timestamp;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/governance/TimeLock.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/TimeLock.sol", - "exportedSymbols": { - "Timelock": [ - 11064 - ] - }, - "id": 11065, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 10606, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:9" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 10607, - "nodeType": "ImportDirective", - "scope": 11065, - "sourceUnit": 14993, - "src": "370:29:9", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 11064, - "linearizedBaseContracts": [ - 11064 - ], - "name": "Timelock", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 10610, - "libraryName": { - "contractScope": null, - "id": 10608, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "431:8:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "425:27:9", - "typeName": { - "id": 10609, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "444:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "anonymous": false, - "documentation": null, - "id": 10614, - "name": "NewAdmin", - "nodeType": "EventDefinition", - "parameters": { - "id": 10613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10612, - "indexed": true, - "name": "newAdmin", - "nodeType": "VariableDeclaration", - "scope": 10614, - "src": "473:24:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10611, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "473:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "472:26:9" - }, - "src": "458:41:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10618, - "name": "NewPendingAdmin", - "nodeType": "EventDefinition", - "parameters": { - "id": 10617, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10616, - "indexed": true, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 10618, - "src": "526:31:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10615, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "526:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "525:33:9" - }, - "src": "504:55:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10622, - "name": "NewDelay", - "nodeType": "EventDefinition", - "parameters": { - "id": 10621, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10620, - "indexed": true, - "name": "newDelay", - "nodeType": "VariableDeclaration", - "scope": 10622, - "src": "579:21:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10619, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "579:4:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "578:23:9" - }, - "src": "564:38:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10636, - "name": "CancelTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 10635, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10624, - "indexed": true, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "631:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10623, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "631:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10626, - "indexed": true, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "655:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10625, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "655:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10628, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "679:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10627, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "679:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10630, - "indexed": false, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "694:16:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10629, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "694:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10632, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "713:10:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10631, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "713:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10634, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "725:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10633, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "725:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "630:107:9" - }, - "src": "607:131:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10650, - "name": "ExecuteTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 10649, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10638, - "indexed": true, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "768:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10637, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "768:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10640, - "indexed": true, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "792:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10639, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "792:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10642, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "816:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10641, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "816:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10644, - "indexed": false, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "831:16:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10643, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "831:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10646, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "850:10:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10645, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "850:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10648, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "862:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10647, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "862:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "767:107:9" - }, - "src": "743:132:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10664, - "name": "QueueTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 10663, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10652, - "indexed": true, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "903:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10651, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "903:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10654, - "indexed": true, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "927:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10653, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "927:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10656, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "951:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10655, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "951:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10658, - "indexed": false, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "966:16:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10657, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "966:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10660, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "984:10:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10659, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "984:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10662, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "996:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10661, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "996:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "902:106:9" - }, - "src": "880:129:9" - }, - { - "constant": true, - "id": 10667, - "name": "GRACE_PERIOD", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1015:46:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10665, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1015:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3134", - "id": 10666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1054:7:9", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_1209600_by_1", - "typeString": "int_const 1209600" - }, - "value": "14" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 10676, - "name": "MINIMUM_DELAY", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1067:58:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10668, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1067:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_45000_by_1", - "typeString": "int_const 45000" - }, - "id": 10675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 10669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1107:8:9", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1800_by_1", - "typeString": "int_const 1800" - }, - "id": 10674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_120_by_1", - "typeString": "int_const 120" - }, - "id": 10672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 10670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1118:1:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 10671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1120:2:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "src": "1118:4:9", - "typeDescriptions": { - "typeIdentifier": "t_rational_120_by_1", - "typeString": "int_const 120" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 10673, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1123:2:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "src": "1118:7:9", - "typeDescriptions": { - "typeIdentifier": "t_rational_1800_by_1", - "typeString": "int_const 1800" - } - }, - "src": "1107:18:9", - "typeDescriptions": { - "typeIdentifier": "t_rational_45000_by_1", - "typeString": "int_const 45000" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 10679, - "name": "MAXIMUM_DELAY", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1167:47:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10677, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1167:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3330", - "id": 10678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1207:7:9", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_2592000_by_1", - "typeString": "int_const 2592000" - }, - "value": "30" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10681, - "name": "admin", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1221:20:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10680, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1221:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10683, - "name": "pendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1247:27:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10682, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1247:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10685, - "name": "delay", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1280:20:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10684, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1280:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10687, - "name": "admin_initialized", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1306:29:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 10686, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1306:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10691, - "name": "queuedTransactions", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1342:51:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 10690, - "keyType": { - "id": 10688, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1351:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1342:25:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 10689, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1362:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 10707, - "nodeType": "Block", - "src": "1434:311:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10694, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "1654:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10695, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1662:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1662:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1654:18:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10698, - "nodeType": "ExpressionStatement", - "src": "1654:18:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10699, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "1682:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10700, - "name": "MINIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10676, - "src": "1690:13:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1682:21:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10702, - "nodeType": "ExpressionStatement", - "src": "1682:21:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10703, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "1713:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 10704, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1733:5:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1713:25:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10706, - "nodeType": "ExpressionStatement", - "src": "1713:25:9" - } - ] - }, - "documentation": null, - "id": 10708, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10692, - "nodeType": "ParameterList", - "parameters": [], - "src": "1412:2:9" - }, - "returnParameters": { - "id": 10693, - "nodeType": "ParameterList", - "parameters": [], - "src": "1434:0:9" - }, - "scope": 11064, - "src": "1401:344:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10711, - "nodeType": "Block", - "src": "1779:3:9", - "statements": [] - }, - "documentation": null, - "id": 10712, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10709, - "nodeType": "ParameterList", - "parameters": [], - "src": "1759:2:9" - }, - "returnParameters": { - "id": 10710, - "nodeType": "ParameterList", - "parameters": [], - "src": "1779:0:9" - }, - "scope": 11064, - "src": "1751:31:9", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 10749, - "nodeType": "Block", - "src": "1841:361:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 10723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10718, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1859:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1859:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10721, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19282, - "src": "1881:4:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - ], - "id": 10720, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1873:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1873:13:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1859:27:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e", - "id": 10724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1888:51:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e810dcfb9ec7662fa74f0c58d14b8ca36ebffcb4d6cdf3e54d58e4096597d95d", - "typeString": "literal_string \"Timelock::setDelay: Call must come from Timelock.\"" - }, - "value": "Timelock::setDelay: Call must come from Timelock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e810dcfb9ec7662fa74f0c58d14b8ca36ebffcb4d6cdf3e54d58e4096597d95d", - "typeString": "literal_string \"Timelock::setDelay: Call must come from Timelock.\"" - } - ], - "id": 10717, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1851:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1851:89:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10726, - "nodeType": "ExpressionStatement", - "src": "1851:89:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10728, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10714, - "src": "1958:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10729, - "name": "MINIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10676, - "src": "1968:13:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1958:23:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e", - "id": 10731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1983:54:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4198c63548ffd3e47f06dc876a374eb662a4ea6ff5509a211e07dd2b49998b1d", - "typeString": "literal_string \"Timelock::setDelay: Delay must exceed minimum delay.\"" - }, - "value": "Timelock::setDelay: Delay must exceed minimum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4198c63548ffd3e47f06dc876a374eb662a4ea6ff5509a211e07dd2b49998b1d", - "typeString": "literal_string \"Timelock::setDelay: Delay must exceed minimum delay.\"" - } - ], - "id": 10727, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1950:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1950:88:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10733, - "nodeType": "ExpressionStatement", - "src": "1950:88:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10735, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10714, - "src": "2056:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 10736, - "name": "MAXIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10679, - "src": "2066:13:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2056:23:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e", - "id": 10738, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2081:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - }, - "value": "Timelock::setDelay: Delay must not exceed maximum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - } - ], - "id": 10734, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2048:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2048:92:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10740, - "nodeType": "ExpressionStatement", - "src": "2048:92:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10741, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "2150:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10742, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10714, - "src": "2158:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2150:14:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10744, - "nodeType": "ExpressionStatement", - "src": "2150:14:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10746, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "2189:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10745, - "name": "NewDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10622, - "src": "2180:8:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2180:15:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10748, - "nodeType": "EmitStatement", - "src": "2175:20:9" - } - ] - }, - "documentation": null, - "id": 10750, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10714, - "name": "delay_", - "nodeType": "VariableDeclaration", - "scope": 10750, - "src": "1806:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10713, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1806:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1805:16:9" - }, - "returnParameters": { - "id": 10716, - "nodeType": "ParameterList", - "parameters": [], - "src": "1841:0:9" - }, - "scope": 11064, - "src": "1788:414:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10776, - "nodeType": "Block", - "src": "2250:206:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10754, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2268:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2268:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10756, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2282:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2268:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e", - "id": 10758, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2296:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a6d22532620e2c2df8ce400b3f4754629da5ed6321258d3add10ae5aba9450b3", - "typeString": "literal_string \"Timelock::acceptAdmin: Call must come from pendingAdmin.\"" - }, - "value": "Timelock::acceptAdmin: Call must come from pendingAdmin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a6d22532620e2c2df8ce400b3f4754629da5ed6321258d3add10ae5aba9450b3", - "typeString": "literal_string \"Timelock::acceptAdmin: Call must come from pendingAdmin.\"" - } - ], - "id": 10753, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2260:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2260:95:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10760, - "nodeType": "ExpressionStatement", - "src": "2260:95:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10761, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "2365:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10762, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2373:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2373:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2365:18:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10765, - "nodeType": "ExpressionStatement", - "src": "2365:18:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10766, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2393:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 10768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2416:1:9", - "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": 10767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2408:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10769, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2408:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2393:25:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10771, - "nodeType": "ExpressionStatement", - "src": "2393:25:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10773, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "2443:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10772, - "name": "NewAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10614, - "src": "2434:8:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 10774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2434:15:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10775, - "nodeType": "EmitStatement", - "src": "2429:20:9" - } - ] - }, - "documentation": null, - "id": 10777, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10751, - "nodeType": "ParameterList", - "parameters": [], - "src": "2228:2:9" - }, - "returnParameters": { - "id": 10752, - "nodeType": "ParameterList", - "parameters": [], - "src": "2250:0:9" - }, - "scope": 11064, - "src": "2208:248:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10808, - "nodeType": "Block", - "src": "2529:362:9", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 10782, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "2611:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 10798, - "nodeType": "Block", - "src": "2755:47:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10794, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "2767:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 10795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2787:4:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "2767:24:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10797, - "nodeType": "ExpressionStatement", - "src": "2767:24:9" - } - ] - }, - "id": 10799, - "nodeType": "IfStatement", - "src": "2607:195:9", - "trueBody": { - "id": 10793, - "nodeType": "Block", - "src": "2630:119:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 10789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2650:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2650:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10787, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19282, - "src": "2672:4:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - ], - "id": 10786, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2664:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2664:13:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2650:27:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e", - "id": 10790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2679:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7a0aaea4203d5a5318b76c13dcb2afd3f7e9e71cd6f5f022040411bd080d815", - "typeString": "literal_string \"Timelock::setPendingAdmin: Call must come from Timelock.\"" - }, - "value": "Timelock::setPendingAdmin: Call must come from Timelock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b7a0aaea4203d5a5318b76c13dcb2afd3f7e9e71cd6f5f022040411bd080d815", - "typeString": "literal_string \"Timelock::setPendingAdmin: Call must come from Timelock.\"" - } - ], - "id": 10783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2642:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2642:96:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10792, - "nodeType": "ExpressionStatement", - "src": "2642:96:9" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 10802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10800, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2811:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10801, - "name": "pendingAdmin_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10779, - "src": "2826:13:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2811:28:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10803, - "nodeType": "ExpressionStatement", - "src": "2811:28:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10805, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2871:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10804, - "name": "NewPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10618, - "src": "2855:15:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 10806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2855:29:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10807, - "nodeType": "EmitStatement", - "src": "2850:34:9" - } - ] - }, - "documentation": null, - "id": 10809, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10780, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10779, - "name": "pendingAdmin_", - "nodeType": "VariableDeclaration", - "scope": 10809, - "src": "2487:21:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10778, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2487:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2486:23:9" - }, - "returnParameters": { - "id": 10781, - "nodeType": "ParameterList", - "parameters": [], - "src": "2529:0:9" - }, - "scope": 11064, - "src": "2462:429:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10873, - "nodeType": "Block", - "src": "3102:465:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10825, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3120:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3120:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10827, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "3134:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3120:19:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 10829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3141:56:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b9bd2ade56c0bd4d6738b7a39a90e136f8901e8e7945a3d237050075ad6fd749", - "typeString": "literal_string \"Timelock::queueTransaction: Call must come from admin.\"" - }, - "value": "Timelock::queueTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b9bd2ade56c0bd4d6738b7a39a90e136f8901e8e7945a3d237050075ad6fd749", - "typeString": "literal_string \"Timelock::queueTransaction: Call must come from admin.\"" - } - ], - "id": 10824, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3112:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3112:86:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10831, - "nodeType": "ExpressionStatement", - "src": "3112:86:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10833, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10819, - "src": "3216:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10837, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "3247:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10834, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11063, - "src": "3223:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3223:19:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "3223:23:9", - "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": 10838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3223:30:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3216:37:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e", - "id": 10840, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3255:75:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d8f8e6fa46b62e55e6ef89f0d71d2a706a902748f37198aeb3e192bf7bca348c", - "typeString": "literal_string \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"" - }, - "value": "Timelock::queueTransaction: Estimated execution block must satisfy delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d8f8e6fa46b62e55e6ef89f0d71d2a706a902748f37198aeb3e192bf7bca348c", - "typeString": "literal_string \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"" - } - ], - "id": 10832, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3208:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3208:123:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10842, - "nodeType": "ExpressionStatement", - "src": "3208:123:9" - }, - { - "assignments": [ - 10844 - ], - "declarations": [ - { - "constant": false, - "id": 10844, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10873, - "src": "3342:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10843, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3342:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10855, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10848, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10811, - "src": "3380:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10849, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10813, - "src": "3388:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10850, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10815, - "src": "3395:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10851, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10817, - "src": "3406:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10852, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10819, - "src": "3412:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10846, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "3369:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3369:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 10853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3369:47:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 10845, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "3359:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 10854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3359:58:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3342:75:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10856, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "3427:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10858, - "indexExpression": { - "argumentTypes": null, - "id": 10857, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10844, - "src": "3446:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3427:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 10859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3456:4:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "3427:33:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10861, - "nodeType": "ExpressionStatement", - "src": "3427:33:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10863, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10844, - "src": "3493:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 10864, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10811, - "src": "3501:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10865, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10813, - "src": "3509:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10866, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10815, - "src": "3516:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10867, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10817, - "src": "3527:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10868, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10819, - "src": "3533:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10862, - "name": "QueueTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10664, - "src": "3476:16:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 10869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3476:61:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10870, - "nodeType": "EmitStatement", - "src": "3471:66:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10871, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10844, - "src": "3554:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 10823, - "id": 10872, - "nodeType": "Return", - "src": "3547:13:9" - } - ] - }, - "documentation": null, - "id": 10874, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10811, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "2932:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10810, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2932:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10813, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "2956:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10812, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2956:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10815, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "2979:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10814, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2979:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10817, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "3012:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10816, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3012:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10819, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "3039:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10818, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3039:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2922:134:9" - }, - "returnParameters": { - "id": 10823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10822, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "3089:7:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10821, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3089:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3088:9:9" - }, - "scope": 11064, - "src": "2897:670:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10923, - "nodeType": "Block", - "src": "3753:312:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3771:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3771:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10890, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "3785:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3771:19:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 10892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3792:57:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_135e413b08c779b9b925daaaf6178471ba60ebd33d413d809c76a0d4e8beaf3d", - "typeString": "literal_string \"Timelock::cancelTransaction: Call must come from admin.\"" - }, - "value": "Timelock::cancelTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_135e413b08c779b9b925daaaf6178471ba60ebd33d413d809c76a0d4e8beaf3d", - "typeString": "literal_string \"Timelock::cancelTransaction: Call must come from admin.\"" - } - ], - "id": 10887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3763:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3763:87:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10894, - "nodeType": "ExpressionStatement", - "src": "3763:87:9" - }, - { - "assignments": [ - 10896 - ], - "declarations": [ - { - "constant": false, - "id": 10896, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10923, - "src": "3861:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10895, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3861:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10907, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10900, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10876, - "src": "3899:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10901, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10878, - "src": "3907:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10902, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10880, - "src": "3914:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10903, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10882, - "src": "3925:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10904, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10884, - "src": "3931:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10898, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "3888:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3888:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 10905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3888:47:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 10897, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "3878:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 10906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3878:58:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3861:75:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10908, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "3946:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10910, - "indexExpression": { - "argumentTypes": null, - "id": 10909, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10896, - "src": "3965:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3946:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 10911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3975:5:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "3946:34:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10913, - "nodeType": "ExpressionStatement", - "src": "3946:34:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10915, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10896, - "src": "4014:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 10916, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10876, - "src": "4022:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10917, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10878, - "src": "4030:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10918, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10880, - "src": "4037:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10919, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10882, - "src": "4048:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10920, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10884, - "src": "4054:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10914, - "name": "CancelTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10636, - "src": "3996:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 10921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3996:62:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10922, - "nodeType": "EmitStatement", - "src": "3991:67:9" - } - ] - }, - "documentation": null, - "id": 10924, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10885, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10876, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3609:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3609:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10878, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3633:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3633:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10880, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3656:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10879, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3656:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10882, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3689:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10881, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3689:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10884, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3716:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10883, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3716:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3599:134:9" - }, - "returnParameters": { - "id": 10886, - "nodeType": "ParameterList", - "parameters": [], - "src": "3753:0:9" - }, - "scope": 11064, - "src": "3573:492:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11053, - "nodeType": "Block", - "src": "4299:1301:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10940, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "4317:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4317:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10942, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "4331:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4317:19:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 10944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4338:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0cbc65ac44dc8b90b8bc4c38c9c6ad704bfeb2c8170538058496c0e805dfa947", - "typeString": "literal_string \"Timelock::executeTransaction: Call must come from admin.\"" - }, - "value": "Timelock::executeTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0cbc65ac44dc8b90b8bc4c38c9c6ad704bfeb2c8170538058496c0e805dfa947", - "typeString": "literal_string \"Timelock::executeTransaction: Call must come from admin.\"" - } - ], - "id": 10939, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4309:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4309:88:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10946, - "nodeType": "ExpressionStatement", - "src": "4309:88:9" - }, - { - "assignments": [ - 10948 - ], - "declarations": [ - { - "constant": false, - "id": 10948, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "4514:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10947, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4514:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10959, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10952, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10926, - "src": "4552:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10953, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10928, - "src": "4560:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10954, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "4567:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10955, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "4578:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10956, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "4584:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10950, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "4541:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4541:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 10957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4541:47:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 10949, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4531:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 10958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4531:58:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4514:75:9" - }, - { - "condition": { - "argumentTypes": null, - "id": 10960, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "4603:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10994, - "nodeType": "IfStatement", - "src": "4599:433:9", - "trueBody": { - "id": 10993, - "nodeType": "Block", - "src": "4622:410:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10962, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "4642:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10964, - "indexExpression": { - "argumentTypes": null, - "id": 10963, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10948, - "src": "4661:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4642:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e", - "id": 10965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4670:63:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e3bf24eec453753018af1214443c72d8abb3050b249b2b3b9bb2adb04310650", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't been queued.\"" - }, - "value": "Timelock::executeTransaction: Transaction hasn't been queued." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e3bf24eec453753018af1214443c72d8abb3050b249b2b3b9bb2adb04310650", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't been queued.\"" - } - ], - "id": 10961, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4634:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4634:100:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10967, - "nodeType": "ExpressionStatement", - "src": "4634:100:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10969, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11063, - "src": "4754:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4754:19:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10971, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "4777:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4754:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e", - "id": 10973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4782:71:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_381d72a875dbcf282eb0ce43951c66b6c4d7dadc6fdeb9294add773d09cd1687", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\"" - }, - "value": "Timelock::executeTransaction: Transaction hasn't surpassed time lock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_381d72a875dbcf282eb0ce43951c66b6c4d7dadc6fdeb9294add773d09cd1687", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\"" - } - ], - "id": 10968, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4746:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4746:108:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10975, - "nodeType": "ExpressionStatement", - "src": "4746:108:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10977, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11063, - "src": "4874:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4874:19:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10981, - "name": "GRACE_PERIOD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10667, - "src": "4905:12:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10979, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "4897:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "4897:7:9", - "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": 10982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4897:21:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4874:44:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e", - "id": 10984, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4920:53:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c4a83afbdcff2c4ba869dacfa7dabb27b12f774a0707feae827e36773b8166c", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction is stale.\"" - }, - "value": "Timelock::executeTransaction: Transaction is stale." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c4a83afbdcff2c4ba869dacfa7dabb27b12f774a0707feae827e36773b8166c", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction is stale.\"" - } - ], - "id": 10976, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4866:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4866:108:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10986, - "nodeType": "ExpressionStatement", - "src": "4866:108:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10987, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "4987:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10989, - "indexExpression": { - "argumentTypes": null, - "id": 10988, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10948, - "src": "5006:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4987:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 10990, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5016:5:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4987:34:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10992, - "nodeType": "ExpressionStatement", - "src": "4987:34:9" - } - ] - } - }, - { - "assignments": [ - 10996 - ], - "declarations": [ - { - "constant": false, - "id": 10996, - "name": "callData", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "5043:21:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10995, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5043:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10997, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5043:21:9" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10999, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "5085:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 10998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5079:5:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5079:16:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5079:23:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5106:1:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5079:28:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11023, - "nodeType": "Block", - "src": "5155:95:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11009, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10996, - "src": "5169:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11015, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "5220:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11014, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5214:5:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5214:16:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11013, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5204:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5204:27:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5197:6:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes4_$", - "typeString": "type(bytes4)" - }, - "typeName": "bytes4" - }, - "id": 11018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5197:35:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 11019, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "5234:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 11010, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "5180:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5180:16:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5180:59:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5169:70:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11022, - "nodeType": "ExpressionStatement", - "src": "5169:70:9" - } - ] - }, - "id": 11024, - "nodeType": "IfStatement", - "src": "5075:175:9", - "trueBody": { - "id": 11008, - "nodeType": "Block", - "src": "5109:40:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11004, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10996, - "src": "5123:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11005, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "5134:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5123:15:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11007, - "nodeType": "ExpressionStatement", - "src": "5123:15:9" - } - ] - } - }, - { - "assignments": [ - 11026, - 11028 - ], - "declarations": [ - { - "constant": false, - "id": 11026, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "5320:12:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11025, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5320:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11028, - "name": "returnData", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "5334:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11027, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5334:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11036, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11034, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10996, - "src": "5386:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 11032, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10928, - "src": "5379:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11029, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10926, - "src": "5361:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5361:11:9", - "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": 11031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5361:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 11033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5361:24:9", - "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": 11035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5361:34:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5319:76:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11038, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11026, - "src": "5413:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e", - "id": 11039, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5422:63:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c8cfef133518ef6ab39ac5f19562a74f4f875e9130c8117d51f88a557b6e72c9", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction execution reverted.\"" - }, - "value": "Timelock::executeTransaction: Transaction execution reverted." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c8cfef133518ef6ab39ac5f19562a74f4f875e9130c8117d51f88a557b6e72c9", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction execution reverted.\"" - } - ], - "id": 11037, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "5405:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5405:81:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11041, - "nodeType": "ExpressionStatement", - "src": "5405:81:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11043, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10948, - "src": "5521:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11044, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10926, - "src": "5529:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11045, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10928, - "src": "5537:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11046, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "5544:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11047, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "5555:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11048, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "5561:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11042, - "name": "ExecuteTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10650, - "src": "5502:18:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5502:63:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11050, - "nodeType": "EmitStatement", - "src": "5497:68:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 11051, - "name": "returnData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11028, - "src": "5583:10:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 10938, - "id": 11052, - "nodeType": "Return", - "src": "5576:17:9" - } - ] - }, - "documentation": null, - "id": 11054, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10926, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4108:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10925, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4108:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10928, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4132:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10927, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4132:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10930, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4155:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10929, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4155:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10932, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4188:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10931, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4188:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10934, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4215:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4215:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4098:134:9" - }, - "returnParameters": { - "id": 10938, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10937, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4281:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10936, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4281:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4280:14:9" - }, - "scope": 11064, - "src": "4071:1529:9", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11062, - "nodeType": "Block", - "src": "5667:101:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11059, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "5746:5:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5746:15:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11058, - "id": 11061, - "nodeType": "Return", - "src": "5739:22:9" - } - ] - }, - "documentation": null, - "id": 11063, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getBlockTimestamp", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11055, - "nodeType": "ParameterList", - "parameters": [], - "src": "5632:2:9" - }, - "returnParameters": { - "id": 11058, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11057, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11063, - "src": "5658:7:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11056, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5658:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5657:9:9" - }, - "scope": 11064, - "src": "5606:162:9", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 11065, - "src": "401:5369:9" - } - ], - "src": "0:5771:9" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/TimeLock.sol", - "exportedSymbols": { - "Timelock": [ - 11064 - ] - }, - "id": 11065, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 10606, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:9" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 10607, - "nodeType": "ImportDirective", - "scope": 11065, - "sourceUnit": 14993, - "src": "370:29:9", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 11064, - "linearizedBaseContracts": [ - 11064 - ], - "name": "Timelock", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 10610, - "libraryName": { - "contractScope": null, - "id": 10608, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "431:8:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "425:27:9", - "typeName": { - "id": 10609, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "444:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "anonymous": false, - "documentation": null, - "id": 10614, - "name": "NewAdmin", - "nodeType": "EventDefinition", - "parameters": { - "id": 10613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10612, - "indexed": true, - "name": "newAdmin", - "nodeType": "VariableDeclaration", - "scope": 10614, - "src": "473:24:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10611, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "473:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "472:26:9" - }, - "src": "458:41:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10618, - "name": "NewPendingAdmin", - "nodeType": "EventDefinition", - "parameters": { - "id": 10617, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10616, - "indexed": true, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 10618, - "src": "526:31:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10615, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "526:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "525:33:9" - }, - "src": "504:55:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10622, - "name": "NewDelay", - "nodeType": "EventDefinition", - "parameters": { - "id": 10621, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10620, - "indexed": true, - "name": "newDelay", - "nodeType": "VariableDeclaration", - "scope": 10622, - "src": "579:21:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10619, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "579:4:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "578:23:9" - }, - "src": "564:38:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10636, - "name": "CancelTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 10635, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10624, - "indexed": true, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "631:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10623, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "631:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10626, - "indexed": true, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "655:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10625, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "655:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10628, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "679:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10627, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "679:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10630, - "indexed": false, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "694:16:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10629, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "694:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10632, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "713:10:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10631, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "713:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10634, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10636, - "src": "725:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10633, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "725:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "630:107:9" - }, - "src": "607:131:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10650, - "name": "ExecuteTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 10649, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10638, - "indexed": true, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "768:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10637, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "768:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10640, - "indexed": true, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "792:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10639, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "792:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10642, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "816:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10641, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "816:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10644, - "indexed": false, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "831:16:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10643, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "831:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10646, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "850:10:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10645, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "850:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10648, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10650, - "src": "862:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10647, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "862:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "767:107:9" - }, - "src": "743:132:9" - }, - { - "anonymous": false, - "documentation": null, - "id": 10664, - "name": "QueueTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 10663, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10652, - "indexed": true, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "903:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10651, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "903:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10654, - "indexed": true, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "927:22:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10653, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "927:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10656, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "951:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10655, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "951:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10658, - "indexed": false, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "966:16:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10657, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "966:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10660, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "984:10:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10659, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "984:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10662, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10664, - "src": "996:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10661, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "996:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "902:106:9" - }, - "src": "880:129:9" - }, - { - "constant": true, - "id": 10667, - "name": "GRACE_PERIOD", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1015:46:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10665, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1015:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3134", - "id": 10666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1054:7:9", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_1209600_by_1", - "typeString": "int_const 1209600" - }, - "value": "14" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 10676, - "name": "MINIMUM_DELAY", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1067:58:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10668, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1067:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_45000_by_1", - "typeString": "int_const 45000" - }, - "id": 10675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 10669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1107:8:9", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1800_by_1", - "typeString": "int_const 1800" - }, - "id": 10674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_120_by_1", - "typeString": "int_const 120" - }, - "id": 10672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 10670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1118:1:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 10671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1120:2:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "src": "1118:4:9", - "typeDescriptions": { - "typeIdentifier": "t_rational_120_by_1", - "typeString": "int_const 120" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 10673, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1123:2:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "src": "1118:7:9", - "typeDescriptions": { - "typeIdentifier": "t_rational_1800_by_1", - "typeString": "int_const 1800" - } - }, - "src": "1107:18:9", - "typeDescriptions": { - "typeIdentifier": "t_rational_45000_by_1", - "typeString": "int_const 45000" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 10679, - "name": "MAXIMUM_DELAY", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1167:47:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10677, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1167:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3330", - "id": 10678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1207:7:9", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_2592000_by_1", - "typeString": "int_const 2592000" - }, - "value": "30" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10681, - "name": "admin", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1221:20:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10680, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1221:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10683, - "name": "pendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1247:27:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10682, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1247:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10685, - "name": "delay", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1280:20:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10684, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1280:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10687, - "name": "admin_initialized", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1306:29:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 10686, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1306:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10691, - "name": "queuedTransactions", - "nodeType": "VariableDeclaration", - "scope": 11064, - "src": "1342:51:9", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 10690, - "keyType": { - "id": 10688, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1351:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1342:25:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 10689, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1362:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 10707, - "nodeType": "Block", - "src": "1434:311:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10694, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "1654:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10695, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1662:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1662:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1654:18:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10698, - "nodeType": "ExpressionStatement", - "src": "1654:18:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10699, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "1682:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10700, - "name": "MINIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10676, - "src": "1690:13:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1682:21:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10702, - "nodeType": "ExpressionStatement", - "src": "1682:21:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10703, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "1713:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 10704, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1733:5:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1713:25:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10706, - "nodeType": "ExpressionStatement", - "src": "1713:25:9" - } - ] - }, - "documentation": null, - "id": 10708, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10692, - "nodeType": "ParameterList", - "parameters": [], - "src": "1412:2:9" - }, - "returnParameters": { - "id": 10693, - "nodeType": "ParameterList", - "parameters": [], - "src": "1434:0:9" - }, - "scope": 11064, - "src": "1401:344:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10711, - "nodeType": "Block", - "src": "1779:3:9", - "statements": [] - }, - "documentation": null, - "id": 10712, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10709, - "nodeType": "ParameterList", - "parameters": [], - "src": "1759:2:9" - }, - "returnParameters": { - "id": 10710, - "nodeType": "ParameterList", - "parameters": [], - "src": "1779:0:9" - }, - "scope": 11064, - "src": "1751:31:9", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 10749, - "nodeType": "Block", - "src": "1841:361:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 10723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10718, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1859:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1859:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10721, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19282, - "src": "1881:4:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - ], - "id": 10720, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1873:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1873:13:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1859:27:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e", - "id": 10724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1888:51:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e810dcfb9ec7662fa74f0c58d14b8ca36ebffcb4d6cdf3e54d58e4096597d95d", - "typeString": "literal_string \"Timelock::setDelay: Call must come from Timelock.\"" - }, - "value": "Timelock::setDelay: Call must come from Timelock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e810dcfb9ec7662fa74f0c58d14b8ca36ebffcb4d6cdf3e54d58e4096597d95d", - "typeString": "literal_string \"Timelock::setDelay: Call must come from Timelock.\"" - } - ], - "id": 10717, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1851:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1851:89:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10726, - "nodeType": "ExpressionStatement", - "src": "1851:89:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10728, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10714, - "src": "1958:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10729, - "name": "MINIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10676, - "src": "1968:13:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1958:23:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e", - "id": 10731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1983:54:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4198c63548ffd3e47f06dc876a374eb662a4ea6ff5509a211e07dd2b49998b1d", - "typeString": "literal_string \"Timelock::setDelay: Delay must exceed minimum delay.\"" - }, - "value": "Timelock::setDelay: Delay must exceed minimum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4198c63548ffd3e47f06dc876a374eb662a4ea6ff5509a211e07dd2b49998b1d", - "typeString": "literal_string \"Timelock::setDelay: Delay must exceed minimum delay.\"" - } - ], - "id": 10727, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1950:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1950:88:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10733, - "nodeType": "ExpressionStatement", - "src": "1950:88:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10735, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10714, - "src": "2056:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 10736, - "name": "MAXIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10679, - "src": "2066:13:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2056:23:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e", - "id": 10738, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2081:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - }, - "value": "Timelock::setDelay: Delay must not exceed maximum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - } - ], - "id": 10734, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2048:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2048:92:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10740, - "nodeType": "ExpressionStatement", - "src": "2048:92:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10741, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "2150:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10742, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10714, - "src": "2158:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2150:14:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10744, - "nodeType": "ExpressionStatement", - "src": "2150:14:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10746, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "2189:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10745, - "name": "NewDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10622, - "src": "2180:8:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2180:15:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10748, - "nodeType": "EmitStatement", - "src": "2175:20:9" - } - ] - }, - "documentation": null, - "id": 10750, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10714, - "name": "delay_", - "nodeType": "VariableDeclaration", - "scope": 10750, - "src": "1806:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10713, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1806:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1805:16:9" - }, - "returnParameters": { - "id": 10716, - "nodeType": "ParameterList", - "parameters": [], - "src": "1841:0:9" - }, - "scope": 11064, - "src": "1788:414:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10776, - "nodeType": "Block", - "src": "2250:206:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10754, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2268:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2268:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10756, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2282:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2268:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e", - "id": 10758, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2296:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a6d22532620e2c2df8ce400b3f4754629da5ed6321258d3add10ae5aba9450b3", - "typeString": "literal_string \"Timelock::acceptAdmin: Call must come from pendingAdmin.\"" - }, - "value": "Timelock::acceptAdmin: Call must come from pendingAdmin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a6d22532620e2c2df8ce400b3f4754629da5ed6321258d3add10ae5aba9450b3", - "typeString": "literal_string \"Timelock::acceptAdmin: Call must come from pendingAdmin.\"" - } - ], - "id": 10753, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2260:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2260:95:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10760, - "nodeType": "ExpressionStatement", - "src": "2260:95:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10761, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "2365:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10762, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2373:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2373:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2365:18:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10765, - "nodeType": "ExpressionStatement", - "src": "2365:18:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10766, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2393:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 10768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2416:1:9", - "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": 10767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2408:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10769, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2408:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2393:25:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10771, - "nodeType": "ExpressionStatement", - "src": "2393:25:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10773, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "2443:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10772, - "name": "NewAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10614, - "src": "2434:8:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 10774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2434:15:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10775, - "nodeType": "EmitStatement", - "src": "2429:20:9" - } - ] - }, - "documentation": null, - "id": 10777, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10751, - "nodeType": "ParameterList", - "parameters": [], - "src": "2228:2:9" - }, - "returnParameters": { - "id": 10752, - "nodeType": "ParameterList", - "parameters": [], - "src": "2250:0:9" - }, - "scope": 11064, - "src": "2208:248:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10808, - "nodeType": "Block", - "src": "2529:362:9", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 10782, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "2611:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 10798, - "nodeType": "Block", - "src": "2755:47:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10794, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "2767:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 10795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2787:4:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "2767:24:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10797, - "nodeType": "ExpressionStatement", - "src": "2767:24:9" - } - ] - }, - "id": 10799, - "nodeType": "IfStatement", - "src": "2607:195:9", - "trueBody": { - "id": 10793, - "nodeType": "Block", - "src": "2630:119:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 10789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2650:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2650:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10787, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19282, - "src": "2672:4:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Timelock_$11064", - "typeString": "contract Timelock" - } - ], - "id": 10786, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2664:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2664:13:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2650:27:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e", - "id": 10790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2679:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7a0aaea4203d5a5318b76c13dcb2afd3f7e9e71cd6f5f022040411bd080d815", - "typeString": "literal_string \"Timelock::setPendingAdmin: Call must come from Timelock.\"" - }, - "value": "Timelock::setPendingAdmin: Call must come from Timelock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b7a0aaea4203d5a5318b76c13dcb2afd3f7e9e71cd6f5f022040411bd080d815", - "typeString": "literal_string \"Timelock::setPendingAdmin: Call must come from Timelock.\"" - } - ], - "id": 10783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2642:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2642:96:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10792, - "nodeType": "ExpressionStatement", - "src": "2642:96:9" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 10802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10800, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2811:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10801, - "name": "pendingAdmin_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10779, - "src": "2826:13:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2811:28:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10803, - "nodeType": "ExpressionStatement", - "src": "2811:28:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10805, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10683, - "src": "2871:12:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10804, - "name": "NewPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10618, - "src": "2855:15:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 10806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2855:29:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10807, - "nodeType": "EmitStatement", - "src": "2850:34:9" - } - ] - }, - "documentation": null, - "id": 10809, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10780, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10779, - "name": "pendingAdmin_", - "nodeType": "VariableDeclaration", - "scope": 10809, - "src": "2487:21:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10778, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2487:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2486:23:9" - }, - "returnParameters": { - "id": 10781, - "nodeType": "ParameterList", - "parameters": [], - "src": "2529:0:9" - }, - "scope": 11064, - "src": "2462:429:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10873, - "nodeType": "Block", - "src": "3102:465:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10825, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3120:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3120:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10827, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "3134:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3120:19:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 10829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3141:56:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b9bd2ade56c0bd4d6738b7a39a90e136f8901e8e7945a3d237050075ad6fd749", - "typeString": "literal_string \"Timelock::queueTransaction: Call must come from admin.\"" - }, - "value": "Timelock::queueTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b9bd2ade56c0bd4d6738b7a39a90e136f8901e8e7945a3d237050075ad6fd749", - "typeString": "literal_string \"Timelock::queueTransaction: Call must come from admin.\"" - } - ], - "id": 10824, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3112:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3112:86:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10831, - "nodeType": "ExpressionStatement", - "src": "3112:86:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10833, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10819, - "src": "3216:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10837, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10685, - "src": "3247:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10834, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11063, - "src": "3223:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3223:19:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "3223:23:9", - "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": 10838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3223:30:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3216:37:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e", - "id": 10840, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3255:75:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d8f8e6fa46b62e55e6ef89f0d71d2a706a902748f37198aeb3e192bf7bca348c", - "typeString": "literal_string \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"" - }, - "value": "Timelock::queueTransaction: Estimated execution block must satisfy delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d8f8e6fa46b62e55e6ef89f0d71d2a706a902748f37198aeb3e192bf7bca348c", - "typeString": "literal_string \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"" - } - ], - "id": 10832, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3208:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3208:123:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10842, - "nodeType": "ExpressionStatement", - "src": "3208:123:9" - }, - { - "assignments": [ - 10844 - ], - "declarations": [ - { - "constant": false, - "id": 10844, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10873, - "src": "3342:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10843, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3342:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10855, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10848, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10811, - "src": "3380:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10849, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10813, - "src": "3388:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10850, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10815, - "src": "3395:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10851, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10817, - "src": "3406:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10852, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10819, - "src": "3412:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10846, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "3369:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3369:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 10853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3369:47:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 10845, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "3359:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 10854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3359:58:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3342:75:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10856, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "3427:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10858, - "indexExpression": { - "argumentTypes": null, - "id": 10857, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10844, - "src": "3446:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3427:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 10859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3456:4:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "3427:33:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10861, - "nodeType": "ExpressionStatement", - "src": "3427:33:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10863, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10844, - "src": "3493:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 10864, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10811, - "src": "3501:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10865, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10813, - "src": "3509:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10866, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10815, - "src": "3516:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10867, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10817, - "src": "3527:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10868, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10819, - "src": "3533:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10862, - "name": "QueueTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10664, - "src": "3476:16:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 10869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3476:61:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10870, - "nodeType": "EmitStatement", - "src": "3471:66:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10871, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10844, - "src": "3554:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 10823, - "id": 10872, - "nodeType": "Return", - "src": "3547:13:9" - } - ] - }, - "documentation": null, - "id": 10874, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10811, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "2932:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10810, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2932:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10813, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "2956:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10812, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2956:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10815, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "2979:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10814, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2979:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10817, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "3012:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10816, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3012:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10819, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "3039:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10818, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3039:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2922:134:9" - }, - "returnParameters": { - "id": 10823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10822, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10874, - "src": "3089:7:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10821, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3089:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3088:9:9" - }, - "scope": 11064, - "src": "2897:670:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10923, - "nodeType": "Block", - "src": "3753:312:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3771:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3771:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10890, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "3785:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3771:19:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 10892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3792:57:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_135e413b08c779b9b925daaaf6178471ba60ebd33d413d809c76a0d4e8beaf3d", - "typeString": "literal_string \"Timelock::cancelTransaction: Call must come from admin.\"" - }, - "value": "Timelock::cancelTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_135e413b08c779b9b925daaaf6178471ba60ebd33d413d809c76a0d4e8beaf3d", - "typeString": "literal_string \"Timelock::cancelTransaction: Call must come from admin.\"" - } - ], - "id": 10887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3763:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3763:87:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10894, - "nodeType": "ExpressionStatement", - "src": "3763:87:9" - }, - { - "assignments": [ - 10896 - ], - "declarations": [ - { - "constant": false, - "id": 10896, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 10923, - "src": "3861:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10895, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3861:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10907, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10900, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10876, - "src": "3899:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10901, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10878, - "src": "3907:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10902, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10880, - "src": "3914:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10903, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10882, - "src": "3925:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10904, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10884, - "src": "3931:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10898, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "3888:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3888:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 10905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3888:47:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 10897, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "3878:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 10906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3878:58:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3861:75:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10908, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "3946:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10910, - "indexExpression": { - "argumentTypes": null, - "id": 10909, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10896, - "src": "3965:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3946:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 10911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3975:5:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "3946:34:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10913, - "nodeType": "ExpressionStatement", - "src": "3946:34:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10915, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10896, - "src": "4014:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 10916, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10876, - "src": "4022:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10917, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10878, - "src": "4030:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10918, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10880, - "src": "4037:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10919, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10882, - "src": "4048:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10920, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10884, - "src": "4054:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10914, - "name": "CancelTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10636, - "src": "3996:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 10921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3996:62:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10922, - "nodeType": "EmitStatement", - "src": "3991:67:9" - } - ] - }, - "documentation": null, - "id": 10924, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10885, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10876, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3609:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3609:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10878, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3633:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3633:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10880, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3656:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10879, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3656:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10882, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3689:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10881, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3689:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10884, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 10924, - "src": "3716:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10883, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3716:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3599:134:9" - }, - "returnParameters": { - "id": 10886, - "nodeType": "ParameterList", - "parameters": [], - "src": "3753:0:9" - }, - "scope": 11064, - "src": "3573:492:9", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11053, - "nodeType": "Block", - "src": "4299:1301:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10940, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "4317:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4317:10:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10942, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10681, - "src": "4331:5:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4317:19:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 10944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4338:58:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0cbc65ac44dc8b90b8bc4c38c9c6ad704bfeb2c8170538058496c0e805dfa947", - "typeString": "literal_string \"Timelock::executeTransaction: Call must come from admin.\"" - }, - "value": "Timelock::executeTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0cbc65ac44dc8b90b8bc4c38c9c6ad704bfeb2c8170538058496c0e805dfa947", - "typeString": "literal_string \"Timelock::executeTransaction: Call must come from admin.\"" - } - ], - "id": 10939, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4309:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4309:88:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10946, - "nodeType": "ExpressionStatement", - "src": "4309:88:9" - }, - { - "assignments": [ - 10948 - ], - "declarations": [ - { - "constant": false, - "id": 10948, - "name": "txHash", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "4514:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10947, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4514:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10959, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10952, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10926, - "src": "4552:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10953, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10928, - "src": "4560:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10954, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "4567:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 10955, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "4578:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 10956, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "4584:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10950, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "4541:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4541:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 10957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4541:47:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 10949, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4531:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 10958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4531:58:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4514:75:9" - }, - { - "condition": { - "argumentTypes": null, - "id": 10960, - "name": "admin_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10687, - "src": "4603:17:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10994, - "nodeType": "IfStatement", - "src": "4599:433:9", - "trueBody": { - "id": 10993, - "nodeType": "Block", - "src": "4622:410:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10962, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "4642:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10964, - "indexExpression": { - "argumentTypes": null, - "id": 10963, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10948, - "src": "4661:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4642:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e", - "id": 10965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4670:63:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e3bf24eec453753018af1214443c72d8abb3050b249b2b3b9bb2adb04310650", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't been queued.\"" - }, - "value": "Timelock::executeTransaction: Transaction hasn't been queued." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e3bf24eec453753018af1214443c72d8abb3050b249b2b3b9bb2adb04310650", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't been queued.\"" - } - ], - "id": 10961, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4634:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4634:100:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10967, - "nodeType": "ExpressionStatement", - "src": "4634:100:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10969, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11063, - "src": "4754:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4754:19:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10971, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "4777:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4754:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e", - "id": 10973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4782:71:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_381d72a875dbcf282eb0ce43951c66b6c4d7dadc6fdeb9294add773d09cd1687", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\"" - }, - "value": "Timelock::executeTransaction: Transaction hasn't surpassed time lock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_381d72a875dbcf282eb0ce43951c66b6c4d7dadc6fdeb9294add773d09cd1687", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\"" - } - ], - "id": 10968, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4746:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4746:108:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10975, - "nodeType": "ExpressionStatement", - "src": "4746:108:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10977, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11063, - "src": "4874:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4874:19:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10981, - "name": "GRACE_PERIOD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10667, - "src": "4905:12:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10979, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "4897:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "4897:7:9", - "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": 10982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4897:21:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4874:44:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e", - "id": 10984, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4920:53:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c4a83afbdcff2c4ba869dacfa7dabb27b12f774a0707feae827e36773b8166c", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction is stale.\"" - }, - "value": "Timelock::executeTransaction: Transaction is stale." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c4a83afbdcff2c4ba869dacfa7dabb27b12f774a0707feae827e36773b8166c", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction is stale.\"" - } - ], - "id": 10976, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4866:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4866:108:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10986, - "nodeType": "ExpressionStatement", - "src": "4866:108:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 10991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10987, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10691, - "src": "4987:18:9", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 10989, - "indexExpression": { - "argumentTypes": null, - "id": 10988, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10948, - "src": "5006:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4987:26:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 10990, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5016:5:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4987:34:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 10992, - "nodeType": "ExpressionStatement", - "src": "4987:34:9" - } - ] - } - }, - { - "assignments": [ - 10996 - ], - "declarations": [ - { - "constant": false, - "id": 10996, - "name": "callData", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "5043:21:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10995, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5043:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10997, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5043:21:9" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10999, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "5085:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 10998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5079:5:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5079:16:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5079:23:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5106:1:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5079:28:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11023, - "nodeType": "Block", - "src": "5155:95:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11009, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10996, - "src": "5169:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11015, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "5220:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11014, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5214:5:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5214:16:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11013, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5204:9:9", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5204:27:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5197:6:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes4_$", - "typeString": "type(bytes4)" - }, - "typeName": "bytes4" - }, - "id": 11018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5197:35:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 11019, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "5234:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 11010, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "5180:3:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5180:16:9", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5180:59:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5169:70:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11022, - "nodeType": "ExpressionStatement", - "src": "5169:70:9" - } - ] - }, - "id": 11024, - "nodeType": "IfStatement", - "src": "5075:175:9", - "trueBody": { - "id": 11008, - "nodeType": "Block", - "src": "5109:40:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11004, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10996, - "src": "5123:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11005, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "5134:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5123:15:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11007, - "nodeType": "ExpressionStatement", - "src": "5123:15:9" - } - ] - } - }, - { - "assignments": [ - 11026, - 11028 - ], - "declarations": [ - { - "constant": false, - "id": 11026, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "5320:12:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11025, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5320:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11028, - "name": "returnData", - "nodeType": "VariableDeclaration", - "scope": 11053, - "src": "5334:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11027, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5334:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11036, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11034, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10996, - "src": "5386:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 11032, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10928, - "src": "5379:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11029, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10926, - "src": "5361:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5361:11:9", - "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": 11031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5361:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 11033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5361:24:9", - "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": 11035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5361:34:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5319:76:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11038, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11026, - "src": "5413:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e", - "id": 11039, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5422:63:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c8cfef133518ef6ab39ac5f19562a74f4f875e9130c8117d51f88a557b6e72c9", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction execution reverted.\"" - }, - "value": "Timelock::executeTransaction: Transaction execution reverted." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c8cfef133518ef6ab39ac5f19562a74f4f875e9130c8117d51f88a557b6e72c9", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction execution reverted.\"" - } - ], - "id": 11037, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "5405:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5405:81:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11041, - "nodeType": "ExpressionStatement", - "src": "5405:81:9" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11043, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10948, - "src": "5521:6:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11044, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10926, - "src": "5529:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11045, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10928, - "src": "5537:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11046, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10930, - "src": "5544:9:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11047, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10932, - "src": "5555:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11048, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10934, - "src": "5561:3:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11042, - "name": "ExecuteTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10650, - "src": "5502:18:9", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5502:63:9", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11050, - "nodeType": "EmitStatement", - "src": "5497:68:9" - }, - { - "expression": { - "argumentTypes": null, - "id": 11051, - "name": "returnData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11028, - "src": "5583:10:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 10938, - "id": 11052, - "nodeType": "Return", - "src": "5576:17:9" - } - ] - }, - "documentation": null, - "id": 11054, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10926, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4108:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10925, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4108:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10928, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4132:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10927, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4132:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10930, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4155:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 10929, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4155:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10932, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4188:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10931, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4188:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10934, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4215:11:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4215:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4098:134:9" - }, - "returnParameters": { - "id": 10938, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10937, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11054, - "src": "4281:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10936, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4281:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4280:14:9" - }, - "scope": 11064, - "src": "4071:1529:9", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11062, - "nodeType": "Block", - "src": "5667:101:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11059, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "5746:5:9", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5746:15:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11058, - "id": 11061, - "nodeType": "Return", - "src": "5739:22:9" - } - ] - }, - "documentation": null, - "id": 11063, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getBlockTimestamp", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11055, - "nodeType": "ParameterList", - "parameters": [], - "src": "5632:2:9" - }, - "returnParameters": { - "id": 11058, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11057, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11063, - "src": "5658:7:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11056, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5658:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5657:9:9" - }, - "scope": 11064, - "src": "5606:162:9", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 11065, - "src": "401:5369:9" - } - ], - "src": "0:5771:9" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf87": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "CancelTransaction", - "type": "event", - "signature": "0x2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf87" - }, - "0xa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e7": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ExecuteTransaction", - "type": "event", - "signature": "0xa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e7" - }, - "0x71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event", - "signature": "0x71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c" - }, - "0x948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "newDelay", - "type": "uint256" - } - ], - "name": "NewDelay", - "type": "event", - "signature": "0x948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c" - }, - "0x69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a756": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event", - "signature": "0x69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a756" - }, - "0x76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "QueueTransaction", - "type": "event", - "signature": "0x76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f" - } - }, - "links": {}, - "address": "0x0fb022ba3AB3bA40Ba84F24B8eBaE96eEC5D776A", - "transactionHash": "0xd6edad7dae0a7f86a5ce9d5828c0fbb983f6e0ea26e8d96c311fa0f1b41c5778" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.525Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/TimelockInterface.json b/build/contracts/TimelockInterface.json deleted file mode 100644 index e283d75..0000000 --- a/build/contracts/TimelockInterface.json +++ /dev/null @@ -1,34418 +0,0 @@ -{ - "contractName": "TimelockInterface", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "delay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "GRACE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "queuedTransactions", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "queueTransaction", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "cancelTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol\":\"TimelockInterface\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol\":{\"keccak256\":\"0xe33570626516b9d9723cdbf39fb280fbcb93e2bab6ef12c50caff7b83b6e5cba\",\"urls\":[\"bzz-raw://28ce1776967b85b9a12e2aaaf272f956ed88f0ea720f9b91090ee0b2ffb8b7a4\",\"dweb:/ipfs/QmRbswdZGcxpfpy26K8KEdnoPDTVzBwDEDHULgdTbqopRF\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity ^0.5.17;\npragma experimental ABIEncoderV2;\n\n// Original work from Compound: https://github.com/yamound-finance/yamound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol\n// Modified to work in the YAM system\n\n// all votes work on underlying _yamBalances[address], not balanceOf(address)\n\n// Original audit: https://blog.openzeppelin.com/compound-alpha-governance-system-audit/\n// Overview:\n// No Critical\n// High:\n// Issue:\n// Approved proposal may be impossible to queue, cancel or execute\n// Fixed with `proposalMaxOperations`\n// Issue:\n// Queued proposal with repeated actions cannot be executed\n// Fixed by explicitly disallow proposals with repeated actions to be queued in the Timelock contract.\n//\n// Changes made by YAM after audit:\n// Formatting, naming, & uint256 instead of uint\n// Since YAM supply changes, updated quorum & proposal requirements\n// If any uint96, changed to uint256 to match YAM as opposed to comp\n\n\nimport \"../lib/SafeMath.sol\";\n\ncontract GovernorAlpha {\n /// @notice The name of this contract\n string public constant name = \"YAM Governor Alpha\";\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n function quorumVotes() public view returns (uint256) { return SafeMath.div(SafeMath.mul(yam.initSupply(), 4), 100); } // 4% of YAM\n\n /// @notice The number of votes required in order for a voter to become a proposer\n function proposalThreshold() public view returns (uint256) { return SafeMath.div(yam.initSupply(), 100); } // 1% of YAM\n\n /// @notice The maximum number of actions that can be included in a proposal\n function proposalMaxOperations() public pure returns (uint256) { return 10; } // 10 actions\n\n /// @notice The delay before voting on a proposal may take place, once proposed\n function votingDelay() public pure returns (uint256) { return 1; } // 1 block\n\n /// @notice The duration of voting on a proposal, in blocks\n function votingPeriod() public pure returns (uint256) { return 17280; } // ~3 days in blocks (assuming 15s blocks)\n\n /// @notice The address of the Compound Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Compound governance token\n YAMInterface public yam;\n\n /// @notice The address of the Governor Guardian\n address public guardian;\n\n /// @notice The total number of proposals\n uint256 public proposalCount;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint256 id;\n\n /// @notice Creator of the proposal\n address proposer;\n\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint256 eta;\n\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint256 startBlock;\n\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint256 endBlock;\n\n /// @notice Current number of votes in favor of this proposal\n uint256 forVotes;\n\n /// @notice Current number of votes in opposition to this proposal\n uint256 againstVotes;\n\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n\n /// @notice Receipts of ballots for the entire set of voters\n mapping (address => Receipt) receipts;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n\n /// @notice Whether or not the voter supports the proposal\n bool support;\n\n /// @notice The number of votes the voter had, which were cast\n uint256 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The official record of all proposals ever proposed\n mapping (uint256 => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping (address => uint256) public latestProposalIds;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,bool support)\");\n\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(uint256 id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description);\n\n /// @notice An event emitted when a vote has been cast on a proposal\n event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint256 id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint256 id, uint256 eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint256 id);\n\n constructor(address timelock_, address yam_) public {\n timelock = TimelockInterface(timelock_);\n yam = YAMInterface(yam_);\n guardian = msg.sender;\n }\n\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description\n )\n public\n returns (uint256)\n {\n require(yam.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), \"GovernorAlpha::propose: proposer votes below proposal threshold\");\n require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, \"GovernorAlpha::propose: proposal function information arity mismatch\");\n require(targets.length != 0, \"GovernorAlpha::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations(), \"GovernorAlpha::propose: too many actions\");\n\n uint256 latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(proposersLatestProposalState != ProposalState.Active, \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\");\n require(proposersLatestProposalState != ProposalState.Pending, \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\");\n }\n\n uint256 startBlock = add256(block.number, votingDelay());\n uint256 endBlock = add256(startBlock, votingPeriod());\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n canceled: false,\n executed: false\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description\n );\n return newProposal.id;\n }\n\n function queue(uint256 proposalId)\n public\n {\n require(state(proposalId) == ProposalState.Succeeded, \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\");\n Proposal storage proposal = proposals[proposalId];\n uint256 eta = add256(block.timestamp, timelock.delay());\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n _queueOrRevert(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function _queueOrRevert(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n )\n internal\n {\n require(!timelock.queuedTransactions(\n keccak256(\n abi.encode(\n target,\n value,\n signature,\n data,\n eta\n )\n )\n ),\n \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"\n );\n\n timelock.queueTransaction(target, value, signature, data, eta);\n }\n\n function execute(uint256 proposalId)\n public\n payable\n {\n require(state(proposalId) == ProposalState.Queued, \"GovernorAlpha::execute: proposal can only be executed if it is queued\");\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n emit ProposalExecuted(proposalId);\n }\n\n function cancel(uint256 proposalId)\n public\n {\n ProposalState state = state(proposalId);\n require(state != ProposalState.Executed, \"GovernorAlpha::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(msg.sender == guardian || yam.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), \"GovernorAlpha::cancel: proposer above threshold\");\n\n proposal.canceled = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n function getActions(uint256 proposalId)\n public\n view\n returns (\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas\n )\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n function getReceipt(uint256 proposalId, address voter)\n public\n view\n returns (Receipt memory)\n {\n return proposals[proposalId].receipts[voter];\n }\n\n function state(uint256 proposalId)\n public\n view\n returns (ProposalState)\n {\n require(proposalCount >= proposalId && proposalId > 0, \"GovernorAlpha::state: invalid proposal id\");\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n function castVote(uint256 proposalId, bool support)\n public\n {\n return _castVote(msg.sender, proposalId, support);\n }\n\n function castVoteBySig(\n uint256 proposalId,\n bool support,\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n public\n {\n bytes32 domainSeparator = keccak256(\n abi.encode(\n DOMAIN_TYPEHASH,\n keccak256(bytes(name)),\n getChainId(),\n address(this)\n )\n );\n\n bytes32 structHash = keccak256(\n abi.encode(\n BALLOT_TYPEHASH,\n proposalId,\n support\n )\n );\n\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n domainSeparator,\n structHash\n )\n );\n\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorAlpha::castVoteBySig: invalid signature\");\n return _castVote(signatory, proposalId, support);\n }\n\n function _castVote(\n address voter,\n uint256 proposalId,\n bool support\n )\n internal\n {\n require(state(proposalId) == ProposalState.Active, \"GovernorAlpha::_castVote: voting is closed\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorAlpha::_castVote: voter already voted\");\n uint256 votes = yam.getPriorVotes(voter, proposal.startBlock);\n\n if (support) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n emit VoteCast(voter, proposalId, support, votes);\n }\n\n function __acceptAdmin()\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\");\n timelock.acceptAdmin();\n }\n\n function __abdicate()\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__abdicate: sender must be gov guardian\");\n guardian = address(0);\n }\n\n function __queueSetTimelockPendingAdmin(\n address newPendingAdmin,\n uint256 eta\n )\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.queueTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function __executeSetTimelockPendingAdmin(\n address newPendingAdmin,\n uint256 eta\n )\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.executeTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainId() internal pure returns (uint256) {\n uint256 chainId;\n assembly { chainId := chainid() }\n return chainId;\n }\n}\n\ninterface TimelockInterface {\n function delay() external view returns (uint256);\n function GRACE_PERIOD() external view returns (uint256);\n function acceptAdmin() external;\n function queuedTransactions(bytes32 hash) external view returns (bool);\n function queueTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external returns (bytes32);\n function cancelTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external;\n function executeTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external payable returns (bytes memory);\n}\n\ninterface YAMInterface {\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256);\n function initSupply() external view returns (uint256);\n function _acceptGov() external;\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "exportedSymbols": { - "GovernorAlpha": [ - 12250 - ], - "TimelockInterface": [ - 12314 - ], - "YAMInterface": [ - 12332 - ] - }, - "id": 12333, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 11066, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "id": 11067, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:10" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 11068, - "nodeType": "ImportDirective", - "scope": 12333, - "sourceUnit": 14993, - "src": "1007:29:10", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12250, - "linearizedBaseContracts": [ - 12250 - ], - "name": "GovernorAlpha", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 11071, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "1109:50:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 11069, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1109:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "59414d20476f7665726e6f7220416c706861", - "id": 11070, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1139:20:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9", - "typeString": "literal_string \"YAM Governor Alpha\"" - }, - "value": "YAM Governor Alpha" - }, - "visibility": "public" - }, - { - "body": { - "id": 11088, - "nodeType": "Block", - "src": "1351:64:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11080, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1386:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1386:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1386:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "34", - "id": 11083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1404:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 11078, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1373:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:33:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11076, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1360:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1360:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11075, - "id": 11087, - "nodeType": "Return", - "src": "1353:59:10" - } - ] - }, - "documentation": "@notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed", - "id": 11089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "quorumVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11072, - "nodeType": "ParameterList", - "parameters": [], - "src": "1318:2:10" - }, - "returnParameters": { - "id": 11075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11074, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11089, - "src": "1342:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1342:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1341:9:10" - }, - "scope": 12250, - "src": "1298:117:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11102, - "nodeType": "Block", - "src": "1580:47:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11096, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1602:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1602:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1602:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1620:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11094, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1589:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1589:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11093, - "id": 11101, - "nodeType": "Return", - "src": "1582:42:10" - } - ] - }, - "documentation": "@notice The number of votes required in order for a voter to become a proposer", - "id": 11103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11090, - "nodeType": "ParameterList", - "parameters": [], - "src": "1547:2:10" - }, - "returnParameters": { - "id": 11093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11092, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11103, - "src": "1571:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1571:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1570:9:10" - }, - "scope": 12250, - "src": "1521:106:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11110, - "nodeType": "Block", - "src": "1790:14:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 11108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:2:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "functionReturnParameters": 11107, - "id": 11109, - "nodeType": "Return", - "src": "1792:9:10" - } - ] - }, - "documentation": "@notice The maximum number of actions that can be included in a proposal", - "id": 11111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalMaxOperations", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1757:2:10" - }, - "returnParameters": { - "id": 11107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11111, - "src": "1781:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1781:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:9:10" - }, - "scope": 12250, - "src": "1727:77:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11118, - "nodeType": "Block", - "src": "1961:13:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "31", - "id": 11116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1970:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "functionReturnParameters": 11115, - "id": 11117, - "nodeType": "Return", - "src": "1963:8:10" - } - ] - }, - "documentation": "@notice The delay before voting on a proposal may take place, once proposed", - "id": 11119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11112, - "nodeType": "ParameterList", - "parameters": [], - "src": "1928:2:10" - }, - "returnParameters": { - "id": 11115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11114, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11119, - "src": "1952:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1952:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1951:9:10" - }, - "scope": 12250, - "src": "1908:66:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11126, - "nodeType": "Block", - "src": "2109:17:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3137323830", - "id": 11124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2118:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17280_by_1", - "typeString": "int_const 17280" - }, - "value": "17280" - }, - "functionReturnParameters": 11123, - "id": 11125, - "nodeType": "Return", - "src": "2111:12:10" - } - ] - }, - "documentation": "@notice The duration of voting on a proposal, in blocks", - "id": 11127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11120, - "nodeType": "ParameterList", - "parameters": [], - "src": "2076:2:10" - }, - "returnParameters": { - "id": 11123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11122, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11127, - "src": "2100:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2100:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2099:9:10" - }, - "scope": 12250, - "src": "2055:71:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11129, - "name": "timelock", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2237:33:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - }, - "typeName": { - "contractScope": null, - "id": 11128, - "name": "TimelockInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12314, - "src": "2237:17:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11131, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2338:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - }, - "typeName": { - "contractScope": null, - "id": 11130, - "name": "YAMInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12332, - "src": "2338:12:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11133, - "name": "guardian", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2421:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2421:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11135, - "name": "proposalCount", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2497:28:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2497:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Proposal", - "id": 11170, - "members": [ - { - "constant": false, - "id": 11137, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2614:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11136, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11139, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2679:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11138, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2679:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11141, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2818:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2818:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11144, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2918:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2918:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11143, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2918:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11147, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3047:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11145, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3047:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3047:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11150, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3144:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11148, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3144:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11149, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3144:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11153, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3249:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3249:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11152, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11155, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3385:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11154, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3385:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11157, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3505:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3505:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11159, - "name": "forVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3602:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3602:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11161, - "name": "againstVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3704:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3704:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11163, - "name": "canceled", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3807:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11162, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3807:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11165, - "name": "executed", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3903:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11164, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3903:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11169, - "name": "receipts", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3996:37:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "typeName": { - "id": 11168, - "keyType": { - "id": 11166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3996:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "valueType": { - "contractScope": null, - "id": 11167, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "4016:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Proposal", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "2532:1508:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Receipt", - "id": 11177, - "members": [ - { - "constant": false, - "id": 11172, - "name": "hasVoted", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4177:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4177:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11174, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4268:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11173, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4268:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11176, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4362:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4362:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Receipt", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "4096:286:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.ProposalState", - "id": 11186, - "members": [ - { - "id": 11178, - "name": "Pending", - "nodeType": "EnumValue", - "src": "4475:7:10" - }, - { - "id": 11179, - "name": "Active", - "nodeType": "EnumValue", - "src": "4492:6:10" - }, - { - "id": 11180, - "name": "Canceled", - "nodeType": "EnumValue", - "src": "4508:8:10" - }, - { - "id": 11181, - "name": "Defeated", - "nodeType": "EnumValue", - "src": "4526:8:10" - }, - { - "id": 11182, - "name": "Succeeded", - "nodeType": "EnumValue", - "src": "4544:9:10" - }, - { - "id": 11183, - "name": "Queued", - "nodeType": "EnumValue", - "src": "4563:6:10" - }, - { - "id": 11184, - "name": "Expired", - "nodeType": "EnumValue", - "src": "4579:7:10" - }, - { - "id": 11185, - "name": "Executed", - "nodeType": "EnumValue", - "src": "4596:8:10" - } - ], - "name": "ProposalState", - "nodeType": "EnumDefinition", - "src": "4446:164:10" - }, - { - "constant": false, - "id": 11190, - "name": "proposals", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4683:46:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "typeName": { - "id": 11189, - "keyType": { - "id": 11187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4692:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "4683:29:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "valueType": { - "contractScope": null, - "id": 11188, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "4703:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11194, - "name": "latestProposalIds", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4790:53:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 11193, - "keyType": { - "id": 11191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "4790:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 11192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4810:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 11199, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4913:122:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11195, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4913:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 11197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4965:69:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 11196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4955:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4955:80:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 11204, - "name": "BALLOT_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "5122:94:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11200, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5122:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20737570706f727429", - "id": 11202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5174:41:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - }, - "value": "Ballot(uint256 proposalId,bool support)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - } - ], - "id": 11201, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5164:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a new proposal is created", - "id": 11228, - "name": "ProposalCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 11227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11206, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5309:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5309:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11208, - "indexed": false, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5321:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5321:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11211, - "indexed": false, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5339:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5339:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11210, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5339:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11214, - "indexed": false, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5358:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11212, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5358:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11213, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5358:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11217, - "indexed": false, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5373:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5373:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11216, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11220, - "indexed": false, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5394:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11218, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11219, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5394:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11222, - "indexed": false, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5413:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5413:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11224, - "indexed": false, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5433:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5433:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11226, - "indexed": false, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5451:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11225, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5451:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5308:162:10" - }, - "src": "5287:184:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a vote has been cast on a proposal", - "id": 11238, - "name": "VoteCast", - "nodeType": "EventDefinition", - "parameters": { - "id": 11237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11230, - "indexed": false, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5565:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5565:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11232, - "indexed": false, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5580:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5580:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11234, - "indexed": false, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5600:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11233, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5600:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11236, - "indexed": false, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5614:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5564:64:10" - }, - "src": "5550:79:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been canceled", - "id": 11242, - "name": "ProposalCanceled", - "nodeType": "EventDefinition", - "parameters": { - "id": 11241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11240, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11242, - "src": "5725:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5725:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5724:12:10" - }, - "src": "5702:35:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been queued in the Timelock", - "id": 11248, - "name": "ProposalQueued", - "nodeType": "EventDefinition", - "parameters": { - "id": 11247, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11244, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5845:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5845:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11246, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5857:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5857:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5844:25:10" - }, - "src": "5824:46:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been executed in the Timelock", - "id": 11252, - "name": "ProposalExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 11251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11250, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11252, - "src": "5982:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5982:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5981:12:10" - }, - "src": "5959:35:10" - }, - { - "body": { - "id": 11276, - "nodeType": "Block", - "src": "6052:121:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11259, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "6062:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11261, - "name": "timelock_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11254, - "src": "6091:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11260, - "name": "TimelockInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12314, - "src": "6073:17:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_TimelockInterface_$12314_$", - "typeString": "type(contract TimelockInterface)" - } - }, - "id": 11262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6073:28:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "src": "6062:39:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11264, - "nodeType": "ExpressionStatement", - "src": "6062:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11265, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6111:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11267, - "name": "yam_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11256, - "src": "6130:4:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11266, - "name": "YAMInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12332, - "src": "6117:12:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMInterface_$12332_$", - "typeString": "type(contract YAMInterface)" - } - }, - "id": 11268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6117:18:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "src": "6111:24:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11270, - "nodeType": "ExpressionStatement", - "src": "6111:24:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11271, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "6145:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11272, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6156:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6145:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11275, - "nodeType": "ExpressionStatement", - "src": "6145:21:10" - } - ] - }, - "documentation": null, - "id": 11277, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11257, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11254, - "name": "timelock_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6012:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6012:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11256, - "name": "yam_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6031:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11255, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6031:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6011:33:10" - }, - "returnParameters": { - "id": 11258, - "nodeType": "ParameterList", - "parameters": [], - "src": "6052:0:10" - }, - "scope": 12250, - "src": "6000:173:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11456, - "nodeType": "Block", - "src": "6416:2092:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11299, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6452:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6452:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11302, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6471:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6471:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6485:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11301, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "6464:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6464:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11297, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6434:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "6434:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6434:54:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11307, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "6491:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6491:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6434:76:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657220766f7465732062656c6f772070726f706f73616c207468726573686f6c64", - "id": 11310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6512:65:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - }, - "value": "GovernorAlpha::propose: proposer votes below proposal threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - } - ], - "id": 11296, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6426:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6426:152:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11312, - "nodeType": "ExpressionStatement", - "src": "6426:152:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11314, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6596:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6596:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11316, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "6614:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 11317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6614:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6596:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11319, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6631:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6631:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11321, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "6649:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 11322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6649:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6631:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:70:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11325, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6670:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6670:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11327, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "6688:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 11328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6688:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6670:34:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:108:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368", - "id": 11331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6706:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - }, - "value": "GovernorAlpha::propose: proposal function information arity mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - } - ], - "id": 11313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6588:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6588:189:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11333, - "nodeType": "ExpressionStatement", - "src": "6588:189:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11335, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6795:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6795:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6813:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6795:19:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f7669646520616374696f6e73", - "id": 11339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6816:46:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - }, - "value": "GovernorAlpha::propose: must provide actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - } - ], - "id": 11334, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6787:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6787:76:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11341, - "nodeType": "ExpressionStatement", - "src": "6787:76:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11343, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6881:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6881:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11345, - "name": "proposalMaxOperations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11111, - "src": "6899:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6899:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6881:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7920616374696f6e73", - "id": 11348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:42:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - }, - "value": "GovernorAlpha::propose: too many actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - } - ], - "id": 11342, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6873:94:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11350, - "nodeType": "ExpressionStatement", - "src": "6873:94:10" - }, - { - "assignments": [ - 11352 - ], - "declarations": [ - { - "constant": false, - "id": 11352, - "name": "latestProposalId", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "6978:24:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6978:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11357, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11353, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "7005:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11356, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7023:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7023:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7005:29:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6978:56:10" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11358, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7048:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7068:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7048:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 11384, - "nodeType": "IfStatement", - "src": "7044:450:10", - "trueBody": { - "id": 11383, - "nodeType": "Block", - "src": "7071:423:10", - "statements": [ - { - "assignments": [ - 11362 - ], - "declarations": [ - { - "constant": false, - "id": 11362, - "name": "proposersLatestProposalState", - "nodeType": "VariableDeclaration", - "scope": 11383, - "src": "7083:42:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11361, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "7083:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11364, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7134:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11363, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "7128:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7083:68:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11368, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11369, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7203:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7203:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7171:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c7265616479206163746976652070726f706f73616c", - "id": 11372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7225:90:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - } - ], - "id": 11367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7163:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7163:153:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11374, - "nodeType": "ExpressionStatement", - "src": "7163:153:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11376, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7336:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11377, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7368:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7368:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7336:53:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c72656164792070656e64696e672070726f706f73616c", - "id": 11380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7391:91:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - } - ], - "id": 11375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7328:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7328:155:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11382, - "nodeType": "ExpressionStatement", - "src": "7328:155:10" - } - ] - } - }, - { - "assignments": [ - 11386 - ], - "declarations": [ - { - "constant": false, - "id": 11386, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7504:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11385, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7504:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11393, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11388, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "7532:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7532:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11390, - "name": "votingDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11119, - "src": "7546:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7546:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11387, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7525:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7525:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7504:56:10" - }, - { - "assignments": [ - 11395 - ], - "declarations": [ - { - "constant": false, - "id": 11395, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7570:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7570:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11401, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11397, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7596:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11398, - "name": "votingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11127, - "src": "7608:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7608:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11396, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7589:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7589:34:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7570:53:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7634:15:10", - "subExpression": { - "argumentTypes": null, - "id": 11402, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7634:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11404, - "nodeType": "ExpressionStatement", - "src": "7634:15:10" - }, - { - "assignments": [ - 11406 - ], - "declarations": [ - { - "constant": false, - "id": 11406, - "name": "newProposal", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7659:27:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11405, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "7659:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11423, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11408, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7716:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11409, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7753:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7753:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7782:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 11412, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "7806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11413, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "7835:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11414, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "7867:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11415, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "7902:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11416, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7937:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11417, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "7971:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8003:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8032:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8057:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8086:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11407, - "name": "Proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11170, - "src": "7689:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Proposal_$11170_storage_ptr_$", - "typeString": "type(struct GovernorAlpha.Proposal storage pointer)" - } - }, - "id": 11422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "id", - "proposer", - "eta", - "targets", - "values", - "signatures", - "calldatas", - "startBlock", - "endBlock", - "forVotes", - "againstVotes", - "canceled", - "executed" - ], - "nodeType": "FunctionCall", - "src": "7689:413:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7659:443:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11424, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8113:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11427, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11425, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8123:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8123:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8113:25:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11428, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8141:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "src": "8113:39:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11430, - "nodeType": "ExpressionStatement", - "src": "8113:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11431, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "8162:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11434, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11432, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8180:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11433, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "8180:20:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8162:39:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11435, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8204:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11436, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8204:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8162:56:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11438, - "nodeType": "ExpressionStatement", - "src": "8162:56:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11440, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8263:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8263:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11442, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8291:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8291:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11444, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "8315:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11445, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "8336:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11446, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "8356:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11447, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "8380:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11448, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "8403:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11449, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "8427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11450, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11291, - "src": "8449:11:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11439, - "name": "ProposalCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11228, - "src": "8234:15:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,address[] memory,uint256[] memory,string memory[] memory,bytes memory[] memory,uint256,uint256,string memory)" - } - }, - "id": 11451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8234:236:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11452, - "nodeType": "EmitStatement", - "src": "8229:241:10" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11453, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8487:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8487:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11295, - "id": 11455, - "nodeType": "Return", - "src": "8480:21:10" - } - ] - }, - "documentation": null, - "id": 11457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "propose", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11280, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6205:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11278, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6205:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11279, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6205:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11283, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6239:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11281, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6239:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6239:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11286, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6269:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11284, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6269:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11285, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6269:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11289, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6305:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11287, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6305:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11288, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11291, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6339:25:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6339:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6195:175:10" - }, - "returnParameters": { - "id": 11295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6403:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6403:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6402:9:10" - }, - "scope": 12250, - "src": "6179:2329:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11533, - "nodeType": "Block", - "src": "8568:629:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11464, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8592:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11463, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "8586:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8586:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11466, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "8607:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8607:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "8586:44:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c2063616e206f6e6c792062652071756575656420696620697420697320737563636565646564", - "id": 11469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8632:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - }, - "value": "GovernorAlpha::queue: proposal can only be queued if it is succeeded" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - } - ], - "id": 11462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8578:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8578:125:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11471, - "nodeType": "ExpressionStatement", - "src": "8578:125:10" - }, - { - "assignments": [ - 11473 - ], - "declarations": [ - { - "constant": false, - "id": 11473, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8713:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11472, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "8713:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11477, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11474, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8741:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11476, - "indexExpression": { - "argumentTypes": null, - "id": 11475, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8751:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8741:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8713:49:10" - }, - { - "assignments": [ - 11479 - ], - "declarations": [ - { - "constant": false, - "id": 11479, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8772:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11478, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8772:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11481, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "8793:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8793:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11483, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "8810:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delay", - "nodeType": "MemberAccess", - "referencedDeclaration": 12255, - "src": "8810:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11480, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "8786:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8786:41:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8772:55:10" - }, - { - "body": { - "id": 11520, - "nodeType": "Block", - "src": "8891:226:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11501, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8937:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11502, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8937:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11504, - "indexExpression": { - "argumentTypes": null, - "id": 11503, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8954:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8937:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11505, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8974:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "8974:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11508, - "indexExpression": { - "argumentTypes": null, - "id": 11507, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8990:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8974:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11509, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9010:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11510, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "9010:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11512, - "indexExpression": { - "argumentTypes": null, - "id": 11511, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9030:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9010:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11513, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9050:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "9050:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11516, - "indexExpression": { - "argumentTypes": null, - "id": 11515, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9069:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9050:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "id": 11517, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9089:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11500, - "name": "_queueOrRevert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11576, - "src": "8905:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8905:201:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11519, - "nodeType": "ExpressionStatement", - "src": "8905:201:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11492, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8857:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11493, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8861:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11494, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8861:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8861:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8857:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11521, - "initializationExpression": { - "assignments": [ - 11489 - ], - "declarations": [ - { - "constant": false, - "id": 11489, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11521, - "src": "8842:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11488, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8842:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11491, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8842:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8886:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11497, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8886:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11499, - "nodeType": "ExpressionStatement", - "src": "8886:3:10" - }, - "nodeType": "ForStatement", - "src": "8837:280:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11522, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9126:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "9126:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11525, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9141:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9126:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11527, - "nodeType": "ExpressionStatement", - "src": "9126:18:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11529, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "9174:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11530, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9186:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11528, - "name": "ProposalQueued", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11248, - "src": "9159:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 11531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9159:31:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11532, - "nodeType": "EmitStatement", - "src": "9154:36:10" - } - ] - }, - "documentation": null, - "id": 11534, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11459, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11534, - "src": "8529:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8529:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8528:20:10" - }, - "returnParameters": { - "id": 11461, - "nodeType": "ParameterList", - "parameters": [], - "src": "8568:0:10" - }, - "scope": 12250, - "src": "8514:683:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11575, - "nodeType": "Block", - "src": "9382:468:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9400:278:10", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11553, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9507:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11554, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9537:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11555, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11556, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9599:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11557, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9627:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9473:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9473:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9473:177:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "9444:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9444:222:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11548, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9401:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queuedTransactions", - "nodeType": "MemberAccess", - "referencedDeclaration": 12270, - "src": "9401:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 11560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9401:277:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a2070726f706f73616c20616374696f6e20616c72656164792071756575656420617420657461", - "id": 11562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9690:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - }, - "value": "GovernorAlpha::_queueOrRevert: proposal action already queued at eta" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - } - ], - "id": 11547, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9392:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9392:378:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11564, - "nodeType": "ExpressionStatement", - "src": "9392:378:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11568, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9807:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11569, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9815:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11570, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9822:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11571, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9833:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11572, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9839:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11565, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9781:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "9781:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 11573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9781:62:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 11574, - "nodeType": "ExpressionStatement", - "src": "9781:62:10" - } - ] - }, - "documentation": null, - "id": 11576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_queueOrRevert", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11536, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9236:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11535, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9236:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11538, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9260:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9260:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11540, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9283:23:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11539, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9283:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11542, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9316:17:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11541, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9316:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11544, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9343:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9343:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9226:134:10" - }, - "returnParameters": { - "id": 11546, - "nodeType": "ParameterList", - "parameters": [], - "src": "9382:0:10" - }, - "scope": 12250, - "src": "9203:647:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 11651, - "nodeType": "Block", - "src": "9928:519:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11583, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "9952:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11582, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "9946:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9946:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11585, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "9967:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9967:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "9946:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637574656420696620697420697320717565756564", - "id": 11588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9989:71:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - }, - "value": "GovernorAlpha::execute: proposal can only be executed if it is queued" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - } - ], - "id": 11581, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9938:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9938:123:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11590, - "nodeType": "ExpressionStatement", - "src": "9938:123:10" - }, - { - "assignments": [ - 11592 - ], - "declarations": [ - { - "constant": false, - "id": 11592, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11651, - "src": "10071:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11591, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10071:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11596, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11593, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10099:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11595, - "indexExpression": { - "argumentTypes": null, - "id": 11594, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10109:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10099:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10071:49:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11597, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10130:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "10130:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10150:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10130:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11602, - "nodeType": "ExpressionStatement", - "src": "10130:24:10" - }, - { - "body": { - "id": 11645, - "nodeType": "Block", - "src": "10218:180:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11625, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10286:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11626, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10286:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11628, - "indexExpression": { - "argumentTypes": null, - "id": 11627, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10303:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10286:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11629, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10307:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11630, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10307:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11632, - "indexExpression": { - "argumentTypes": null, - "id": 11631, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10323:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10307:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11633, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10327:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "10327:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11636, - "indexExpression": { - "argumentTypes": null, - "id": 11635, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10347:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10327:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11637, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10351:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11638, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "10351:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11640, - "indexExpression": { - "argumentTypes": null, - "id": 11639, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10370:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10351:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11641, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10374:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11642, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "10374:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11620, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10266:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11621, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10266:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11623, - "indexExpression": { - "argumentTypes": null, - "id": 11622, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10282:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10266:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11615, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "10232:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "10232:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10232:33:10", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory))" - } - }, - "id": 11624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:53:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:155:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11644, - "nodeType": "ExpressionStatement", - "src": "10232:155:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11607, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10184:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11608, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10188:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10188:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10188:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10184:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11646, - "initializationExpression": { - "assignments": [ - 11604 - ], - "declarations": [ - { - "constant": false, - "id": 11604, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11646, - "src": "10169:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11603, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10169:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11606, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10181:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10169:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10213:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11612, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10213:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11614, - "nodeType": "ExpressionStatement", - "src": "10213:3:10" - }, - "nodeType": "ForStatement", - "src": "10164:234:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11648, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10429:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11647, - "name": "ProposalExecuted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11252, - "src": "10412:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10412:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11650, - "nodeType": "EmitStatement", - "src": "10407:33:10" - } - ] - }, - "documentation": null, - "id": 11652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "execute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11578, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11652, - "src": "9873:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9872:20:10" - }, - "returnParameters": { - "id": 11580, - "nodeType": "ParameterList", - "parameters": [], - "src": "9928:0:10" - }, - "scope": 12250, - "src": "9856:591:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11746, - "nodeType": "Block", - "src": "10508:698:10", - "statements": [ - { - "assignments": [ - 11658 - ], - "declarations": [ - { - "constant": false, - "id": 11658, - "name": "state", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10518:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11657, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "10518:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11662, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11660, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10546:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11659, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "10540:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10540:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10518:39:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11664, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11658, - "src": "10575:5:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11665, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "10584:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10584:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "10575:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616e63656c2065786563757465642070726f706f73616c", - "id": 11668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10608:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - }, - "value": "GovernorAlpha::cancel: cannot cancel executed proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - } - ], - "id": 11663, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10567:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10567:98:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11670, - "nodeType": "ExpressionStatement", - "src": "10567:98:10" - }, - { - "assignments": [ - 11672 - ], - "declarations": [ - { - "constant": false, - "id": 11672, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10676:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11671, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10676:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11676, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11673, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10704:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11675, - "indexExpression": { - "argumentTypes": null, - "id": 11674, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10714:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10704:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10676:49:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11678, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10743:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10743:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 11680, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "10757:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10743:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11684, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10787:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "10787:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "10813:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10813:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10827:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11686, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "10806:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10806:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11682, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "10769:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "10769:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10769:61:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11692, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "10833:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10833:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10769:83:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10743:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722061626f7665207468726573686f6c64", - "id": 11696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10854:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - }, - "value": "GovernorAlpha::cancel: proposer above threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - } - ], - "id": 11677, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10735:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10735:169:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11698, - "nodeType": "ExpressionStatement", - "src": "10735:169:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11699, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10915:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11701, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "10915:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10935:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10915:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11704, - "nodeType": "ExpressionStatement", - "src": "10915:24:10" - }, - { - "body": { - "id": 11740, - "nodeType": "Block", - "src": "11003:153:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11720, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11044:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11044:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11723, - "indexExpression": { - "argumentTypes": null, - "id": 11722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11061:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11044:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11724, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11065:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11065:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11727, - "indexExpression": { - "argumentTypes": null, - "id": 11726, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11081:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11065:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11728, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11085:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11729, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11085:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11731, - "indexExpression": { - "argumentTypes": null, - "id": 11730, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11105:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11085:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11732, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11109:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11733, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11109:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11735, - "indexExpression": { - "argumentTypes": null, - "id": 11734, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11128:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11109:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11736, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11132:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11737, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "11132:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11717, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "11017:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12298, - "src": "11017:26:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external" - } - }, - "id": 11738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11017:128:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11739, - "nodeType": "ExpressionStatement", - "src": "11017:128:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10969:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11710, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10973:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11711, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10973:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10973:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10969:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11741, - "initializationExpression": { - "assignments": [ - 11706 - ], - "declarations": [ - { - "constant": false, - "id": 11706, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11741, - "src": "10954:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10954:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11708, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10966:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10954:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10998:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10998:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11716, - "nodeType": "ExpressionStatement", - "src": "10998:3:10" - }, - "nodeType": "ForStatement", - "src": "10949:207:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11743, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "11188:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11742, - "name": "ProposalCanceled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11242, - "src": "11171:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11745, - "nodeType": "EmitStatement", - "src": "11166:33:10" - } - ] - }, - "documentation": null, - "id": 11747, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancel", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11655, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11654, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11747, - "src": "10469:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11653, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10469:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10468:20:10" - }, - "returnParameters": { - "id": 11656, - "nodeType": "ParameterList", - "parameters": [], - "src": "10508:0:10" - }, - "scope": 12250, - "src": "10453:753:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11780, - "nodeType": "Block", - "src": "11461:124:10", - "statements": [ - { - "assignments": [ - 11765 - ], - "declarations": [ - { - "constant": false, - "id": 11765, - "name": "p", - "nodeType": "VariableDeclaration", - "scope": 11780, - "src": "11471:18:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11764, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11471:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11769, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11766, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11492:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11768, - "indexExpression": { - "argumentTypes": null, - "id": 11767, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11749, - "src": "11502:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11492:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11471:42:10" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11770, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11531:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11771, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11531:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11772, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11542:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11773, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11542:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11774, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11552:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11552:12:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11776, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11566:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11566:11:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - } - ], - "id": 11778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11530:48:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_storage_$_t_array$_t_uint256_$dyn_storage_$_t_array$_t_string_storage_$dyn_storage_$_t_array$_t_bytes_storage_$dyn_storage_$", - "typeString": "tuple(address[] storage ref,uint256[] storage ref,string storage ref[] storage ref,bytes storage ref[] storage ref)" - } - }, - "functionReturnParameters": 11763, - "id": 11779, - "nodeType": "Return", - "src": "11523:55:10" - } - ] - }, - "documentation": null, - "id": 11781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getActions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11749, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11232:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11232:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11231:20:10" - }, - "returnParameters": { - "id": 11763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11753, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11310:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11310:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11752, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11310:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11756, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11348:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11754, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11348:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11755, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11348:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11759, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11382:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11382:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11758, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11382:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11762, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11422:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11422:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11422:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11296:160:10" - }, - "scope": 12250, - "src": "11212:373:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11797, - "nodeType": "Block", - "src": "11711:61:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11790, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11728:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11792, - "indexExpression": { - "argumentTypes": null, - "id": 11791, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11783, - "src": "11738:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11793, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "11728:30:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 11795, - "indexExpression": { - "argumentTypes": null, - "id": 11794, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11785, - "src": "11759:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:37:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "functionReturnParameters": 11789, - "id": 11796, - "nodeType": "Return", - "src": "11721:44:10" - } - ] - }, - "documentation": null, - "id": 11798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11783, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11611:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11611:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11785, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11631:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11631:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11610:35:10" - }, - "returnParameters": { - "id": 11789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11691:14:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_memory_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 11787, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "11691:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11690:16:10" - }, - "scope": 12250, - "src": "11591:181:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11900, - "nodeType": "Block", - "src": "11877:957:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11806, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "11895:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 11807, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11912:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11895:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11809, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11926:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11926:14:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11895:45:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726f706f73616c206964", - "id": 11813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11942:43:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - }, - "value": "GovernorAlpha::state: invalid proposal id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - } - ], - "id": 11805, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11887:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11887:99:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11815, - "nodeType": "ExpressionStatement", - "src": "11887:99:10" - }, - { - "assignments": [ - 11817 - ], - "declarations": [ - { - "constant": false, - "id": 11817, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11900, - "src": "11996:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11816, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11996:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11821, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11818, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "12024:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11820, - "indexExpression": { - "argumentTypes": null, - "id": 11819, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "12034:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12024:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11996:49:10" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11822, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12059:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11823, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "12059:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11828, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12142:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12142:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11830, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12158:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11831, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "12158:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12142:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11837, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12242:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11839, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12258:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11157, - "src": "12258:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12242:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11846, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12339:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12339:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11848, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "12360:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12339:42:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11851, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12385:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12385:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11853, - "name": "quorumVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11089, - "src": "12405:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12405:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12385:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12339:79:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11861, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12484:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11862, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12484:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12500:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12484:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11869, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11870, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "12568:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12651:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11878, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12677:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12677:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11880, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "12691:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "GRACE_PERIOD", - "nodeType": "MemberAccess", - "referencedDeclaration": 12260, - "src": "12691:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12691:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11877, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "12670:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12670:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12651:64:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11892, - "nodeType": "Block", - "src": "12776:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11889, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12797:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12797:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11891, - "nodeType": "Return", - "src": "12790:27:10" - } - ] - }, - "id": 11893, - "nodeType": "IfStatement", - "src": "12647:181:10", - "trueBody": { - "id": 11888, - "nodeType": "Block", - "src": "12717:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11885, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12738:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11886, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Expired", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12738:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11887, - "nodeType": "Return", - "src": "12731:28:10" - } - ] - } - }, - "id": 11894, - "nodeType": "IfStatement", - "src": "12564:264:10", - "trueBody": { - "id": 11874, - "nodeType": "Block", - "src": "12587:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11871, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12608:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12608:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11873, - "nodeType": "Return", - "src": "12601:29:10" - } - ] - } - }, - "id": 11895, - "nodeType": "IfStatement", - "src": "12480:348:10", - "trueBody": { - "id": 11868, - "nodeType": "Block", - "src": "12503:55:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11865, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12524:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12524:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11867, - "nodeType": "Return", - "src": "12517:30:10" - } - ] - } - }, - "id": 11896, - "nodeType": "IfStatement", - "src": "12335:493:10", - "trueBody": { - "id": 11860, - "nodeType": "Block", - "src": "12420:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11857, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12441:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Defeated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12441:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11859, - "nodeType": "Return", - "src": "12434:29:10" - } - ] - } - }, - "id": 11897, - "nodeType": "IfStatement", - "src": "12238:590:10", - "trueBody": { - "id": 11845, - "nodeType": "Block", - "src": "12277:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11842, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12298:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12298:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11844, - "nodeType": "Return", - "src": "12291:27:10" - } - ] - } - }, - "id": 11898, - "nodeType": "IfStatement", - "src": "12138:690:10", - "trueBody": { - "id": 11836, - "nodeType": "Block", - "src": "12179:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11833, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12200:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12200:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11835, - "nodeType": "Return", - "src": "12193:28:10" - } - ] - } - }, - "id": 11899, - "nodeType": "IfStatement", - "src": "12055:773:10", - "trueBody": { - "id": 11827, - "nodeType": "Block", - "src": "12078:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11824, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12099:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12099:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11826, - "nodeType": "Return", - "src": "12092:29:10" - } - ] - } - } - ] - }, - "documentation": null, - "id": 11901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11800, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11793:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11793:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11792:20:10" - }, - "returnParameters": { - "id": 11804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11858:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11802, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "11858:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11857:15:10" - }, - "scope": 12250, - "src": "11778:1056:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11915, - "nodeType": "Block", - "src": "12911:66:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "12938:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12938:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11911, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11903, - "src": "12950:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11912, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11905, - "src": "12962:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11908, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "12928:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12928:42:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11907, - "id": 11914, - "nodeType": "Return", - "src": "12921:49:10" - } - ] - }, - "documentation": null, - "id": 11916, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11903, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12858:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12858:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11905, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12878:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12878:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12857:34:10" - }, - "returnParameters": { - "id": 11907, - "nodeType": "ParameterList", - "parameters": [], - "src": "12911:0:10" - }, - "scope": 12250, - "src": "12840:137:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11994, - "nodeType": "Block", - "src": "13136:797:10", - "statements": [ - { - "assignments": [ - 11930 - ], - "declarations": [ - { - "constant": false, - "id": 11930, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13146:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11929, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13146:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11947, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11199, - "src": "13223:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11937, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11071, - "src": "13272:4:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - ], - "id": 11936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13266:5:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13266:11:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11935, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13256:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13256:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11940, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12249, - "src": "13296:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11943, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19284, - "src": "13334:4:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - ], - "id": 11942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13326:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13326:13:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 11932, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13195:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13195:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13195:158:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13172:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:191:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13146:217:10" - }, - { - "assignments": [ - 11949 - ], - "declarations": [ - { - "constant": false, - "id": 11949, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13374:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11958, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11953, - "name": "BALLOT_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11204, - "src": "13446:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11954, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13479:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11955, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13507:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 11951, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13418:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13418:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13418:110:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11950, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13395:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13395:143:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13374:164:10" - }, - { - "assignments": [ - 11960 - ], - "declarations": [ - { - "constant": false, - "id": 11960, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13549:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13549:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 11964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13623:10:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 11965, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11930, - "src": "13651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11966, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11949, - "src": "13684:10:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13589:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13589:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13589:119:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13566:152:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13549:169:10" - }, - { - "assignments": [ - 11971 - ], - "declarations": [ - { - "constant": false, - "id": 11971, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13729:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11970, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13729:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11978, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11973, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11960, - "src": "13759:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11974, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11922, - "src": "13767:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 11975, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11924, - "src": "13770:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11976, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11926, - "src": "13773:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11972, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "13749:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 11977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13749:26:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13729:46:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11980, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13793:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 11982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13814:1:10", - "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": 11981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13806:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13793:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e76616c6964207369676e6174757265", - "id": 11985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13818:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - }, - "value": "GovernorAlpha::castVoteBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - } - ], - "id": 11979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "13785:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13785:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11987, - "nodeType": "ExpressionStatement", - "src": "13785:83:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11989, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13895:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11990, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13906:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11991, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13918:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11988, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "13885:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13885:41:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11928, - "id": 11993, - "nodeType": "Return", - "src": "13878:48:10" - } - ] - }, - "documentation": null, - "id": 11995, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVoteBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11927, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11918, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13015:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13015:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11920, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13043:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11919, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13043:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11922, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13065:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 11921, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "13065:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11924, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13082:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11923, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13082:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11926, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13101:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13101:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13005:111:10" - }, - "returnParameters": { - "id": 11928, - "nodeType": "ParameterList", - "parameters": [], - "src": "13136:0:10" - }, - "scope": 12250, - "src": "12983:950:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12093, - "nodeType": "Block", - "src": "14058:746:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 12010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12006, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14082:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12005, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "14076:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 12007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14076:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12008, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "14097:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 12009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14097:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "14076:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6720697320636c6f736564", - "id": 12011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14119:44:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - }, - "value": "GovernorAlpha::_castVote: voting is closed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - } - ], - "id": 12004, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14068:96:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12013, - "nodeType": "ExpressionStatement", - "src": "14068:96:10" - }, - { - "assignments": [ - 12015 - ], - "declarations": [ - { - "constant": false, - "id": 12015, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14174:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 12014, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "14174:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12019, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 12016, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "14202:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 12018, - "indexExpression": { - "argumentTypes": null, - "id": 12017, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14212:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14202:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14174:49:10" - }, - { - "assignments": [ - 12021 - ], - "declarations": [ - { - "constant": false, - "id": 12021, - "name": "receipt", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14233:23:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 12020, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "14233:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12026, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12022, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14259:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "14259:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 12025, - "indexExpression": { - "argumentTypes": null, - "id": 12024, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14277:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14259:24:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14233:50:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12028, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14301:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12029, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14301:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 12030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14321:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14301:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74657220616c726561647920766f746564", - "id": 12032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14328:47:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - }, - "value": "GovernorAlpha::_castVote: voter already voted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - } - ], - "id": 12027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14293:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14293:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12034, - "nodeType": "ExpressionStatement", - "src": "14293:83:10" - }, - { - "assignments": [ - 12036 - ], - "declarations": [ - { - "constant": false, - "id": 12036, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14386:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14386:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12043, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12039, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14420:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12040, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "14427:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12037, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "14402:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 12038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "14402:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 12042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14402:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14386:61:10" - }, - { - "condition": { - "argumentTypes": null, - "id": 12044, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14462:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 12066, - "nodeType": "Block", - "src": "14554:85:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12056, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12058, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14568:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12060, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14599:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12061, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14599:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12062, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14622:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12059, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14592:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14592:36:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14568:60:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12065, - "nodeType": "ExpressionStatement", - "src": "14568:60:10" - } - ] - }, - "id": 12067, - "nodeType": "IfStatement", - "src": "14458:181:10", - "trueBody": { - "id": 12055, - "nodeType": "Block", - "src": "14471:77:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12045, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14485:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14485:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12049, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14512:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12050, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14512:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12051, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14531:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12048, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14505:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14505:32:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14485:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12054, - "nodeType": "ExpressionStatement", - "src": "14485:52:10" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 12072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12068, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14649:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12070, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14649:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 12071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14668:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14649:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12073, - "nodeType": "ExpressionStatement", - "src": "14649:23:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12074, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14682:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "support", - "nodeType": "MemberAccess", - "referencedDeclaration": 11174, - "src": "14682:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12077, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14700:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14682:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12079, - "nodeType": "ExpressionStatement", - "src": "14682:25:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12080, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14717:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12082, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11176, - "src": "14717:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12083, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14733:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14717:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12085, - "nodeType": "ExpressionStatement", - "src": "14717:21:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12087, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14763:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12088, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14770:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12089, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14782:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12090, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14791:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12086, - "name": "VoteCast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11238, - "src": "14754:8:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bool,uint256)" - } - }, - "id": 12091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14754:43:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12092, - "nodeType": "EmitStatement", - "src": "14749:48:10" - } - ] - }, - "documentation": null, - "id": 12094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11997, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13967:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13967:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11999, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13990:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13990:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12001, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "14018:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14018:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13957:79:10" - }, - "returnParameters": { - "id": 12003, - "nodeType": "ParameterList", - "parameters": [], - "src": "14058:0:10" - }, - "scope": 12250, - "src": "13939:865:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12110, - "nodeType": "Block", - "src": "14854:141:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12098, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "14872:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14872:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12100, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "14886:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14872:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14896:59:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__acceptAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - } - ], - "id": 12097, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14864:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14864:92:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12104, - "nodeType": "ExpressionStatement", - "src": "14864:92:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 12105, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "14966:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "acceptAdmin", - "nodeType": "MemberAccess", - "referencedDeclaration": 12263, - "src": "14966:20:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 12108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14966:22:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12109, - "nodeType": "ExpressionStatement", - "src": "14966:22:10" - } - ] - }, - "documentation": null, - "id": 12111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12095, - "nodeType": "ParameterList", - "parameters": [], - "src": "14832:2:10" - }, - "returnParameters": { - "id": 12096, - "nodeType": "ParameterList", - "parameters": [], - "src": "14854:0:10" - }, - "scope": 12250, - "src": "14810:185:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12128, - "nodeType": "Block", - "src": "15042:137:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15060:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15060:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12117, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15074:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15060:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15084:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__abdicate: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - } - ], - "id": 12114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15052:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15052:89:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12121, - "nodeType": "ExpressionStatement", - "src": "15052:89:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12122, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15151:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15170:1:10", - "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": 12123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15162:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15162:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15151:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12127, - "nodeType": "ExpressionStatement", - "src": "15151:21:10" - } - ] - }, - "documentation": null, - "id": 12129, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__abdicate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12112, - "nodeType": "ParameterList", - "parameters": [], - "src": "15020:2:10" - }, - "returnParameters": { - "id": 12113, - "nodeType": "ParameterList", - "parameters": [], - "src": "15042:0:10" - }, - "scope": 12250, - "src": "15001:178:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12159, - "nodeType": "Block", - "src": "15304:245:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12137, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15322:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15322:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12139, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15336:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15322:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15346:76:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12136, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15314:109:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12143, - "nodeType": "ExpressionStatement", - "src": "15314:109:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12148, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15467:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15459:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15459:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15478:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15481:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12154, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12131, - "src": "15520:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15509:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15509:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15509:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12156, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12133, - "src": "15538:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12144, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15433:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "15433:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 12157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15433:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 12158, - "nodeType": "ExpressionStatement", - "src": "15433:109:10" - } - ] - }, - "documentation": null, - "id": 12160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__queueSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12131, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15234:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15234:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12133, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15267:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15267:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15224:60:10" - }, - "returnParameters": { - "id": 12135, - "nodeType": "ParameterList", - "parameters": [], - "src": "15304:0:10" - }, - "scope": 12250, - "src": "15185:364:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12190, - "nodeType": "Block", - "src": "15676:249:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15694:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15694:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12170, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15708:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15694:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15718:78:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12167, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15686:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15686:111:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12174, - "nodeType": "ExpressionStatement", - "src": "15686:111:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12179, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15843:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15835:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15835:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15857:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12185, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12162, - "src": "15896:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12183, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15885:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15885:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15885:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12187, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12164, - "src": "15914:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12175, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15807:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "15807:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 12188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15807:111:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 12189, - "nodeType": "ExpressionStatement", - "src": "15807:111:10" - } - ] - }, - "documentation": null, - "id": 12191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__executeSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12165, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12162, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15606:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15606:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12164, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15639:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12163, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15639:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15596:60:10" - }, - "returnParameters": { - "id": 12166, - "nodeType": "ParameterList", - "parameters": [], - "src": "15676:0:10" - }, - "scope": 12250, - "src": "15555:370:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12215, - "nodeType": "Block", - "src": "16001:98:10", - "statements": [ - { - "assignments": [ - 12201 - ], - "declarations": [ - { - "constant": false, - "id": 12201, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12215, - "src": "16011:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12200, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16011:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12205, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12202, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16023:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12203, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12195, - "src": "16027:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16023:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16011:17:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12207, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16046:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12208, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16051:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16046:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6164646974696f6e206f766572666c6f77", - "id": 12210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16054:19:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - }, - "value": "addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - } - ], - "id": 12206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16038:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16038:36:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12212, - "nodeType": "ExpressionStatement", - "src": "16038:36:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12213, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16091:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12199, - "id": 12214, - "nodeType": "Return", - "src": "16084:8:10" - } - ] - }, - "documentation": null, - "id": 12216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15947:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15947:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15958:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15958:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15946:22:10" - }, - "returnParameters": { - "id": 12199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15992:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15992:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15991:9:10" - }, - "scope": 12250, - "src": "15931:168:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12236, - "nodeType": "Block", - "src": "16175:79:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12226, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16193:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12227, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16198:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16193:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7375627472616374696f6e20756e646572666c6f77", - "id": 12229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16201:23:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - }, - "value": "subtraction underflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - } - ], - "id": 12225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16185:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16185:40:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12231, - "nodeType": "ExpressionStatement", - "src": "16185:40:10" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12232, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16242:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12233, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16246:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12224, - "id": 12235, - "nodeType": "Return", - "src": "16235:12:10" - } - ] - }, - "documentation": null, - "id": 12237, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12218, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16121:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16121:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12220, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16132:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16132:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16120:22:10" - }, - "returnParameters": { - "id": 12224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12223, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16166:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16166:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16165:9:10" - }, - "scope": 12250, - "src": "16105:149:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12248, - "nodeType": "Block", - "src": "16314:98:10", - "statements": [ - { - "assignments": [ - 12243 - ], - "declarations": [ - { - "constant": false, - "id": 12243, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 12248, - "src": "16324:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16324:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16324:15:10" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 12243, - "isOffset": false, - "isSlot": false, - "src": "16360:7:10", - "valueSize": 1 - } - } - ], - "id": 12245, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "16349:33:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12246, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12243, - "src": "16398:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12241, - "id": 12247, - "nodeType": "Return", - "src": "16391:14:10" - } - ] - }, - "documentation": null, - "id": 12249, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12238, - "nodeType": "ParameterList", - "parameters": [], - "src": "16279:2:10" - }, - "returnParameters": { - "id": 12241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12240, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12249, - "src": "16305:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16304:9:10" - }, - "scope": 12250, - "src": "16260:152:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 12333, - "src": "1038:15376:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12314, - "linearizedBaseContracts": [ - 12314 - ], - "name": "TimelockInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12255, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12251, - "nodeType": "ParameterList", - "parameters": [], - "src": "16464:2:10" - }, - "returnParameters": { - "id": 12254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12253, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12255, - "src": "16490:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16490:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:9:10" - }, - "scope": 12314, - "src": "16450:49:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12260, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "GRACE_PERIOD", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12256, - "nodeType": "ParameterList", - "parameters": [], - "src": "16525:2:10" - }, - "returnParameters": { - "id": 12259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12260, - "src": "16551:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16551:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16550:9:10" - }, - "scope": 12314, - "src": "16504:56:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12263, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12261, - "nodeType": "ParameterList", - "parameters": [], - "src": "16585:2:10" - }, - "returnParameters": { - "id": 12262, - "nodeType": "ParameterList", - "parameters": [], - "src": "16596:0:10" - }, - "scope": 12314, - "src": "16565:32:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12270, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queuedTransactions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12265, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16630:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12264, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16630:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16629:14:10" - }, - "returnParameters": { - "id": 12269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12268, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16667:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16667:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16666:6:10" - }, - "scope": 12314, - "src": "16602:71:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12285, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12272, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16704:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12271, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16704:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12274, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16720:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12273, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16720:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12276, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16735:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12275, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16735:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12278, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16762:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12277, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16762:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12280, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16783:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16783:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16703:92:10" - }, - "returnParameters": { - "id": 12284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16814:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12282, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16814:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16813:9:10" - }, - "scope": 12314, - "src": "16678:145:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12298, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12296, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12287, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16855:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16855:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12289, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16871:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16871:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12291, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16886:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16886:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16913:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16913:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12295, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16934:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16934:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16854:92:10" - }, - "returnParameters": { - "id": 12297, - "nodeType": "ParameterList", - "parameters": [], - "src": "16955:0:10" - }, - "scope": 12314, - "src": "16828:128:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12313, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12300, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "16989:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16989:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12302, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17005:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12304, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17020:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12303, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17020:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12306, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17047:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17047:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12308, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17068:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16988:92:10" - }, - "returnParameters": { - "id": 12312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17107:12:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17107:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17106:14:10" - }, - "scope": 12314, - "src": "16961:160:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "16416:707:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12332, - "linearizedBaseContracts": [ - 12332 - ], - "name": "YAMInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12323, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12316, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17177:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17177:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12318, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17194:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17194:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17176:38:10" - }, - "returnParameters": { - "id": 12322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17238:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17238:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17237:9:10" - }, - "scope": 12332, - "src": "17154:93:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12328, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12324, - "nodeType": "ParameterList", - "parameters": [], - "src": "17271:2:10" - }, - "returnParameters": { - "id": 12327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12328, - "src": "17297:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17297:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17296:9:10" - }, - "scope": 12332, - "src": "17252:54:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12331, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12329, - "nodeType": "ParameterList", - "parameters": [], - "src": "17330:2:10" - }, - "returnParameters": { - "id": 12330, - "nodeType": "ParameterList", - "parameters": [], - "src": "17341:0:10" - }, - "scope": 12332, - "src": "17311:31:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "17125:219:10" - } - ], - "src": "0:17345:10" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "exportedSymbols": { - "GovernorAlpha": [ - 12250 - ], - "TimelockInterface": [ - 12314 - ], - "YAMInterface": [ - 12332 - ] - }, - "id": 12333, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 11066, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "id": 11067, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:10" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 11068, - "nodeType": "ImportDirective", - "scope": 12333, - "sourceUnit": 14993, - "src": "1007:29:10", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12250, - "linearizedBaseContracts": [ - 12250 - ], - "name": "GovernorAlpha", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 11071, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "1109:50:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 11069, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1109:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "59414d20476f7665726e6f7220416c706861", - "id": 11070, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1139:20:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9", - "typeString": "literal_string \"YAM Governor Alpha\"" - }, - "value": "YAM Governor Alpha" - }, - "visibility": "public" - }, - { - "body": { - "id": 11088, - "nodeType": "Block", - "src": "1351:64:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11080, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1386:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1386:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1386:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "34", - "id": 11083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1404:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 11078, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1373:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:33:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11076, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1360:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1360:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11075, - "id": 11087, - "nodeType": "Return", - "src": "1353:59:10" - } - ] - }, - "documentation": "@notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed", - "id": 11089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "quorumVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11072, - "nodeType": "ParameterList", - "parameters": [], - "src": "1318:2:10" - }, - "returnParameters": { - "id": 11075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11074, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11089, - "src": "1342:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1342:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1341:9:10" - }, - "scope": 12250, - "src": "1298:117:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11102, - "nodeType": "Block", - "src": "1580:47:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11096, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1602:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1602:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1602:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1620:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11094, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1589:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1589:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11093, - "id": 11101, - "nodeType": "Return", - "src": "1582:42:10" - } - ] - }, - "documentation": "@notice The number of votes required in order for a voter to become a proposer", - "id": 11103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11090, - "nodeType": "ParameterList", - "parameters": [], - "src": "1547:2:10" - }, - "returnParameters": { - "id": 11093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11092, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11103, - "src": "1571:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1571:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1570:9:10" - }, - "scope": 12250, - "src": "1521:106:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11110, - "nodeType": "Block", - "src": "1790:14:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 11108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:2:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "functionReturnParameters": 11107, - "id": 11109, - "nodeType": "Return", - "src": "1792:9:10" - } - ] - }, - "documentation": "@notice The maximum number of actions that can be included in a proposal", - "id": 11111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalMaxOperations", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1757:2:10" - }, - "returnParameters": { - "id": 11107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11111, - "src": "1781:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1781:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:9:10" - }, - "scope": 12250, - "src": "1727:77:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11118, - "nodeType": "Block", - "src": "1961:13:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "31", - "id": 11116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1970:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "functionReturnParameters": 11115, - "id": 11117, - "nodeType": "Return", - "src": "1963:8:10" - } - ] - }, - "documentation": "@notice The delay before voting on a proposal may take place, once proposed", - "id": 11119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11112, - "nodeType": "ParameterList", - "parameters": [], - "src": "1928:2:10" - }, - "returnParameters": { - "id": 11115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11114, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11119, - "src": "1952:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1952:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1951:9:10" - }, - "scope": 12250, - "src": "1908:66:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11126, - "nodeType": "Block", - "src": "2109:17:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3137323830", - "id": 11124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2118:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17280_by_1", - "typeString": "int_const 17280" - }, - "value": "17280" - }, - "functionReturnParameters": 11123, - "id": 11125, - "nodeType": "Return", - "src": "2111:12:10" - } - ] - }, - "documentation": "@notice The duration of voting on a proposal, in blocks", - "id": 11127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11120, - "nodeType": "ParameterList", - "parameters": [], - "src": "2076:2:10" - }, - "returnParameters": { - "id": 11123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11122, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11127, - "src": "2100:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2100:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2099:9:10" - }, - "scope": 12250, - "src": "2055:71:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11129, - "name": "timelock", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2237:33:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - }, - "typeName": { - "contractScope": null, - "id": 11128, - "name": "TimelockInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12314, - "src": "2237:17:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11131, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2338:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - }, - "typeName": { - "contractScope": null, - "id": 11130, - "name": "YAMInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12332, - "src": "2338:12:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11133, - "name": "guardian", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2421:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2421:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11135, - "name": "proposalCount", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2497:28:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2497:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Proposal", - "id": 11170, - "members": [ - { - "constant": false, - "id": 11137, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2614:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11136, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11139, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2679:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11138, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2679:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11141, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2818:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2818:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11144, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2918:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2918:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11143, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2918:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11147, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3047:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11145, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3047:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3047:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11150, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3144:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11148, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3144:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11149, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3144:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11153, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3249:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3249:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11152, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11155, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3385:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11154, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3385:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11157, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3505:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3505:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11159, - "name": "forVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3602:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3602:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11161, - "name": "againstVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3704:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3704:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11163, - "name": "canceled", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3807:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11162, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3807:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11165, - "name": "executed", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3903:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11164, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3903:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11169, - "name": "receipts", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3996:37:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "typeName": { - "id": 11168, - "keyType": { - "id": 11166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3996:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "valueType": { - "contractScope": null, - "id": 11167, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "4016:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Proposal", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "2532:1508:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Receipt", - "id": 11177, - "members": [ - { - "constant": false, - "id": 11172, - "name": "hasVoted", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4177:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4177:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11174, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4268:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11173, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4268:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11176, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4362:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4362:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Receipt", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "4096:286:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.ProposalState", - "id": 11186, - "members": [ - { - "id": 11178, - "name": "Pending", - "nodeType": "EnumValue", - "src": "4475:7:10" - }, - { - "id": 11179, - "name": "Active", - "nodeType": "EnumValue", - "src": "4492:6:10" - }, - { - "id": 11180, - "name": "Canceled", - "nodeType": "EnumValue", - "src": "4508:8:10" - }, - { - "id": 11181, - "name": "Defeated", - "nodeType": "EnumValue", - "src": "4526:8:10" - }, - { - "id": 11182, - "name": "Succeeded", - "nodeType": "EnumValue", - "src": "4544:9:10" - }, - { - "id": 11183, - "name": "Queued", - "nodeType": "EnumValue", - "src": "4563:6:10" - }, - { - "id": 11184, - "name": "Expired", - "nodeType": "EnumValue", - "src": "4579:7:10" - }, - { - "id": 11185, - "name": "Executed", - "nodeType": "EnumValue", - "src": "4596:8:10" - } - ], - "name": "ProposalState", - "nodeType": "EnumDefinition", - "src": "4446:164:10" - }, - { - "constant": false, - "id": 11190, - "name": "proposals", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4683:46:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "typeName": { - "id": 11189, - "keyType": { - "id": 11187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4692:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "4683:29:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "valueType": { - "contractScope": null, - "id": 11188, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "4703:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11194, - "name": "latestProposalIds", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4790:53:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 11193, - "keyType": { - "id": 11191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "4790:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 11192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4810:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 11199, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4913:122:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11195, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4913:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 11197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4965:69:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 11196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4955:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4955:80:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 11204, - "name": "BALLOT_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "5122:94:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11200, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5122:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20737570706f727429", - "id": 11202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5174:41:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - }, - "value": "Ballot(uint256 proposalId,bool support)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - } - ], - "id": 11201, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5164:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a new proposal is created", - "id": 11228, - "name": "ProposalCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 11227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11206, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5309:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5309:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11208, - "indexed": false, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5321:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5321:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11211, - "indexed": false, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5339:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5339:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11210, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5339:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11214, - "indexed": false, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5358:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11212, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5358:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11213, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5358:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11217, - "indexed": false, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5373:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5373:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11216, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11220, - "indexed": false, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5394:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11218, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11219, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5394:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11222, - "indexed": false, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5413:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5413:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11224, - "indexed": false, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5433:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5433:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11226, - "indexed": false, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5451:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11225, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5451:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5308:162:10" - }, - "src": "5287:184:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a vote has been cast on a proposal", - "id": 11238, - "name": "VoteCast", - "nodeType": "EventDefinition", - "parameters": { - "id": 11237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11230, - "indexed": false, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5565:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5565:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11232, - "indexed": false, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5580:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5580:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11234, - "indexed": false, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5600:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11233, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5600:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11236, - "indexed": false, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5614:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5564:64:10" - }, - "src": "5550:79:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been canceled", - "id": 11242, - "name": "ProposalCanceled", - "nodeType": "EventDefinition", - "parameters": { - "id": 11241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11240, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11242, - "src": "5725:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5725:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5724:12:10" - }, - "src": "5702:35:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been queued in the Timelock", - "id": 11248, - "name": "ProposalQueued", - "nodeType": "EventDefinition", - "parameters": { - "id": 11247, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11244, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5845:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5845:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11246, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5857:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5857:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5844:25:10" - }, - "src": "5824:46:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been executed in the Timelock", - "id": 11252, - "name": "ProposalExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 11251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11250, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11252, - "src": "5982:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5982:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5981:12:10" - }, - "src": "5959:35:10" - }, - { - "body": { - "id": 11276, - "nodeType": "Block", - "src": "6052:121:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11259, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "6062:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11261, - "name": "timelock_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11254, - "src": "6091:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11260, - "name": "TimelockInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12314, - "src": "6073:17:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_TimelockInterface_$12314_$", - "typeString": "type(contract TimelockInterface)" - } - }, - "id": 11262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6073:28:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "src": "6062:39:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11264, - "nodeType": "ExpressionStatement", - "src": "6062:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11265, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6111:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11267, - "name": "yam_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11256, - "src": "6130:4:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11266, - "name": "YAMInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12332, - "src": "6117:12:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMInterface_$12332_$", - "typeString": "type(contract YAMInterface)" - } - }, - "id": 11268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6117:18:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "src": "6111:24:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11270, - "nodeType": "ExpressionStatement", - "src": "6111:24:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11271, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "6145:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11272, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6156:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6145:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11275, - "nodeType": "ExpressionStatement", - "src": "6145:21:10" - } - ] - }, - "documentation": null, - "id": 11277, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11257, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11254, - "name": "timelock_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6012:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6012:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11256, - "name": "yam_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6031:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11255, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6031:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6011:33:10" - }, - "returnParameters": { - "id": 11258, - "nodeType": "ParameterList", - "parameters": [], - "src": "6052:0:10" - }, - "scope": 12250, - "src": "6000:173:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11456, - "nodeType": "Block", - "src": "6416:2092:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11299, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6452:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6452:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11302, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6471:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6471:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6485:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11301, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "6464:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6464:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11297, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6434:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "6434:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6434:54:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11307, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "6491:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6491:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6434:76:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657220766f7465732062656c6f772070726f706f73616c207468726573686f6c64", - "id": 11310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6512:65:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - }, - "value": "GovernorAlpha::propose: proposer votes below proposal threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - } - ], - "id": 11296, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6426:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6426:152:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11312, - "nodeType": "ExpressionStatement", - "src": "6426:152:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11314, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6596:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6596:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11316, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "6614:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 11317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6614:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6596:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11319, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6631:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6631:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11321, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "6649:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 11322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6649:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6631:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:70:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11325, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6670:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6670:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11327, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "6688:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 11328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6688:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6670:34:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:108:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368", - "id": 11331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6706:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - }, - "value": "GovernorAlpha::propose: proposal function information arity mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - } - ], - "id": 11313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6588:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6588:189:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11333, - "nodeType": "ExpressionStatement", - "src": "6588:189:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11335, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6795:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6795:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6813:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6795:19:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f7669646520616374696f6e73", - "id": 11339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6816:46:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - }, - "value": "GovernorAlpha::propose: must provide actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - } - ], - "id": 11334, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6787:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6787:76:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11341, - "nodeType": "ExpressionStatement", - "src": "6787:76:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11343, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6881:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6881:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11345, - "name": "proposalMaxOperations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11111, - "src": "6899:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6899:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6881:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7920616374696f6e73", - "id": 11348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:42:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - }, - "value": "GovernorAlpha::propose: too many actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - } - ], - "id": 11342, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6873:94:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11350, - "nodeType": "ExpressionStatement", - "src": "6873:94:10" - }, - { - "assignments": [ - 11352 - ], - "declarations": [ - { - "constant": false, - "id": 11352, - "name": "latestProposalId", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "6978:24:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6978:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11357, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11353, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "7005:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11356, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7023:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7023:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7005:29:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6978:56:10" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11358, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7048:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7068:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7048:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 11384, - "nodeType": "IfStatement", - "src": "7044:450:10", - "trueBody": { - "id": 11383, - "nodeType": "Block", - "src": "7071:423:10", - "statements": [ - { - "assignments": [ - 11362 - ], - "declarations": [ - { - "constant": false, - "id": 11362, - "name": "proposersLatestProposalState", - "nodeType": "VariableDeclaration", - "scope": 11383, - "src": "7083:42:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11361, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "7083:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11364, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7134:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11363, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "7128:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7083:68:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11368, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11369, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7203:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7203:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7171:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c7265616479206163746976652070726f706f73616c", - "id": 11372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7225:90:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - } - ], - "id": 11367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7163:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7163:153:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11374, - "nodeType": "ExpressionStatement", - "src": "7163:153:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11376, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7336:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11377, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7368:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7368:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7336:53:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c72656164792070656e64696e672070726f706f73616c", - "id": 11380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7391:91:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - } - ], - "id": 11375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7328:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7328:155:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11382, - "nodeType": "ExpressionStatement", - "src": "7328:155:10" - } - ] - } - }, - { - "assignments": [ - 11386 - ], - "declarations": [ - { - "constant": false, - "id": 11386, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7504:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11385, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7504:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11393, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11388, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "7532:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7532:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11390, - "name": "votingDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11119, - "src": "7546:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7546:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11387, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7525:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7525:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7504:56:10" - }, - { - "assignments": [ - 11395 - ], - "declarations": [ - { - "constant": false, - "id": 11395, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7570:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7570:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11401, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11397, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7596:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11398, - "name": "votingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11127, - "src": "7608:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7608:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11396, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7589:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7589:34:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7570:53:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7634:15:10", - "subExpression": { - "argumentTypes": null, - "id": 11402, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7634:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11404, - "nodeType": "ExpressionStatement", - "src": "7634:15:10" - }, - { - "assignments": [ - 11406 - ], - "declarations": [ - { - "constant": false, - "id": 11406, - "name": "newProposal", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7659:27:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11405, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "7659:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11423, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11408, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7716:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11409, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7753:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7753:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7782:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 11412, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "7806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11413, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "7835:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11414, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "7867:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11415, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "7902:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11416, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7937:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11417, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "7971:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8003:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8032:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8057:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8086:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11407, - "name": "Proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11170, - "src": "7689:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Proposal_$11170_storage_ptr_$", - "typeString": "type(struct GovernorAlpha.Proposal storage pointer)" - } - }, - "id": 11422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "id", - "proposer", - "eta", - "targets", - "values", - "signatures", - "calldatas", - "startBlock", - "endBlock", - "forVotes", - "againstVotes", - "canceled", - "executed" - ], - "nodeType": "FunctionCall", - "src": "7689:413:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7659:443:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11424, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8113:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11427, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11425, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8123:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8123:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8113:25:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11428, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8141:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "src": "8113:39:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11430, - "nodeType": "ExpressionStatement", - "src": "8113:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11431, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "8162:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11434, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11432, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8180:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11433, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "8180:20:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8162:39:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11435, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8204:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11436, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8204:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8162:56:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11438, - "nodeType": "ExpressionStatement", - "src": "8162:56:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11440, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8263:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8263:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11442, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8291:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8291:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11444, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "8315:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11445, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "8336:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11446, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "8356:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11447, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "8380:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11448, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "8403:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11449, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "8427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11450, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11291, - "src": "8449:11:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11439, - "name": "ProposalCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11228, - "src": "8234:15:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,address[] memory,uint256[] memory,string memory[] memory,bytes memory[] memory,uint256,uint256,string memory)" - } - }, - "id": 11451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8234:236:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11452, - "nodeType": "EmitStatement", - "src": "8229:241:10" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11453, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8487:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8487:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11295, - "id": 11455, - "nodeType": "Return", - "src": "8480:21:10" - } - ] - }, - "documentation": null, - "id": 11457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "propose", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11280, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6205:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11278, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6205:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11279, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6205:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11283, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6239:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11281, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6239:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6239:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11286, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6269:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11284, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6269:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11285, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6269:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11289, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6305:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11287, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6305:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11288, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11291, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6339:25:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6339:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6195:175:10" - }, - "returnParameters": { - "id": 11295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6403:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6403:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6402:9:10" - }, - "scope": 12250, - "src": "6179:2329:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11533, - "nodeType": "Block", - "src": "8568:629:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11464, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8592:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11463, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "8586:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8586:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11466, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "8607:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8607:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "8586:44:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c2063616e206f6e6c792062652071756575656420696620697420697320737563636565646564", - "id": 11469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8632:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - }, - "value": "GovernorAlpha::queue: proposal can only be queued if it is succeeded" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - } - ], - "id": 11462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8578:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8578:125:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11471, - "nodeType": "ExpressionStatement", - "src": "8578:125:10" - }, - { - "assignments": [ - 11473 - ], - "declarations": [ - { - "constant": false, - "id": 11473, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8713:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11472, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "8713:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11477, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11474, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8741:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11476, - "indexExpression": { - "argumentTypes": null, - "id": 11475, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8751:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8741:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8713:49:10" - }, - { - "assignments": [ - 11479 - ], - "declarations": [ - { - "constant": false, - "id": 11479, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8772:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11478, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8772:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11481, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "8793:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8793:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11483, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "8810:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delay", - "nodeType": "MemberAccess", - "referencedDeclaration": 12255, - "src": "8810:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11480, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "8786:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8786:41:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8772:55:10" - }, - { - "body": { - "id": 11520, - "nodeType": "Block", - "src": "8891:226:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11501, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8937:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11502, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8937:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11504, - "indexExpression": { - "argumentTypes": null, - "id": 11503, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8954:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8937:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11505, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8974:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "8974:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11508, - "indexExpression": { - "argumentTypes": null, - "id": 11507, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8990:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8974:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11509, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9010:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11510, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "9010:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11512, - "indexExpression": { - "argumentTypes": null, - "id": 11511, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9030:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9010:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11513, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9050:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "9050:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11516, - "indexExpression": { - "argumentTypes": null, - "id": 11515, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9069:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9050:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "id": 11517, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9089:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11500, - "name": "_queueOrRevert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11576, - "src": "8905:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8905:201:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11519, - "nodeType": "ExpressionStatement", - "src": "8905:201:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11492, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8857:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11493, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8861:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11494, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8861:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8861:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8857:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11521, - "initializationExpression": { - "assignments": [ - 11489 - ], - "declarations": [ - { - "constant": false, - "id": 11489, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11521, - "src": "8842:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11488, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8842:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11491, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8842:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8886:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11497, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8886:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11499, - "nodeType": "ExpressionStatement", - "src": "8886:3:10" - }, - "nodeType": "ForStatement", - "src": "8837:280:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11522, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9126:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "9126:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11525, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9141:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9126:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11527, - "nodeType": "ExpressionStatement", - "src": "9126:18:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11529, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "9174:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11530, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9186:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11528, - "name": "ProposalQueued", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11248, - "src": "9159:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 11531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9159:31:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11532, - "nodeType": "EmitStatement", - "src": "9154:36:10" - } - ] - }, - "documentation": null, - "id": 11534, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11459, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11534, - "src": "8529:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8529:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8528:20:10" - }, - "returnParameters": { - "id": 11461, - "nodeType": "ParameterList", - "parameters": [], - "src": "8568:0:10" - }, - "scope": 12250, - "src": "8514:683:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11575, - "nodeType": "Block", - "src": "9382:468:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9400:278:10", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11553, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9507:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11554, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9537:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11555, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11556, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9599:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11557, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9627:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9473:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9473:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9473:177:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "9444:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9444:222:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11548, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9401:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queuedTransactions", - "nodeType": "MemberAccess", - "referencedDeclaration": 12270, - "src": "9401:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 11560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9401:277:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a2070726f706f73616c20616374696f6e20616c72656164792071756575656420617420657461", - "id": 11562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9690:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - }, - "value": "GovernorAlpha::_queueOrRevert: proposal action already queued at eta" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - } - ], - "id": 11547, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9392:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9392:378:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11564, - "nodeType": "ExpressionStatement", - "src": "9392:378:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11568, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9807:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11569, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9815:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11570, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9822:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11571, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9833:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11572, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9839:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11565, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9781:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "9781:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 11573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9781:62:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 11574, - "nodeType": "ExpressionStatement", - "src": "9781:62:10" - } - ] - }, - "documentation": null, - "id": 11576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_queueOrRevert", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11536, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9236:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11535, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9236:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11538, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9260:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9260:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11540, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9283:23:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11539, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9283:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11542, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9316:17:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11541, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9316:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11544, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9343:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9343:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9226:134:10" - }, - "returnParameters": { - "id": 11546, - "nodeType": "ParameterList", - "parameters": [], - "src": "9382:0:10" - }, - "scope": 12250, - "src": "9203:647:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 11651, - "nodeType": "Block", - "src": "9928:519:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11583, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "9952:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11582, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "9946:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9946:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11585, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "9967:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9967:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "9946:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637574656420696620697420697320717565756564", - "id": 11588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9989:71:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - }, - "value": "GovernorAlpha::execute: proposal can only be executed if it is queued" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - } - ], - "id": 11581, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9938:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9938:123:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11590, - "nodeType": "ExpressionStatement", - "src": "9938:123:10" - }, - { - "assignments": [ - 11592 - ], - "declarations": [ - { - "constant": false, - "id": 11592, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11651, - "src": "10071:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11591, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10071:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11596, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11593, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10099:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11595, - "indexExpression": { - "argumentTypes": null, - "id": 11594, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10109:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10099:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10071:49:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11597, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10130:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "10130:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10150:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10130:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11602, - "nodeType": "ExpressionStatement", - "src": "10130:24:10" - }, - { - "body": { - "id": 11645, - "nodeType": "Block", - "src": "10218:180:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11625, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10286:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11626, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10286:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11628, - "indexExpression": { - "argumentTypes": null, - "id": 11627, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10303:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10286:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11629, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10307:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11630, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10307:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11632, - "indexExpression": { - "argumentTypes": null, - "id": 11631, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10323:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10307:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11633, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10327:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "10327:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11636, - "indexExpression": { - "argumentTypes": null, - "id": 11635, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10347:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10327:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11637, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10351:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11638, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "10351:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11640, - "indexExpression": { - "argumentTypes": null, - "id": 11639, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10370:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10351:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11641, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10374:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11642, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "10374:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11620, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10266:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11621, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10266:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11623, - "indexExpression": { - "argumentTypes": null, - "id": 11622, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10282:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10266:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11615, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "10232:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "10232:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10232:33:10", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory))" - } - }, - "id": 11624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:53:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:155:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11644, - "nodeType": "ExpressionStatement", - "src": "10232:155:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11607, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10184:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11608, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10188:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10188:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10188:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10184:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11646, - "initializationExpression": { - "assignments": [ - 11604 - ], - "declarations": [ - { - "constant": false, - "id": 11604, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11646, - "src": "10169:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11603, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10169:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11606, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10181:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10169:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10213:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11612, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10213:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11614, - "nodeType": "ExpressionStatement", - "src": "10213:3:10" - }, - "nodeType": "ForStatement", - "src": "10164:234:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11648, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10429:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11647, - "name": "ProposalExecuted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11252, - "src": "10412:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10412:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11650, - "nodeType": "EmitStatement", - "src": "10407:33:10" - } - ] - }, - "documentation": null, - "id": 11652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "execute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11578, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11652, - "src": "9873:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9872:20:10" - }, - "returnParameters": { - "id": 11580, - "nodeType": "ParameterList", - "parameters": [], - "src": "9928:0:10" - }, - "scope": 12250, - "src": "9856:591:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11746, - "nodeType": "Block", - "src": "10508:698:10", - "statements": [ - { - "assignments": [ - 11658 - ], - "declarations": [ - { - "constant": false, - "id": 11658, - "name": "state", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10518:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11657, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "10518:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11662, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11660, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10546:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11659, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "10540:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10540:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10518:39:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11664, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11658, - "src": "10575:5:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11665, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "10584:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10584:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "10575:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616e63656c2065786563757465642070726f706f73616c", - "id": 11668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10608:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - }, - "value": "GovernorAlpha::cancel: cannot cancel executed proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - } - ], - "id": 11663, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10567:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10567:98:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11670, - "nodeType": "ExpressionStatement", - "src": "10567:98:10" - }, - { - "assignments": [ - 11672 - ], - "declarations": [ - { - "constant": false, - "id": 11672, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10676:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11671, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10676:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11676, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11673, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10704:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11675, - "indexExpression": { - "argumentTypes": null, - "id": 11674, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10714:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10704:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10676:49:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11678, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10743:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10743:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 11680, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "10757:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10743:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11684, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10787:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "10787:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "10813:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10813:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10827:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11686, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "10806:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10806:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11682, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "10769:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "10769:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10769:61:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11692, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "10833:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10833:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10769:83:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10743:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722061626f7665207468726573686f6c64", - "id": 11696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10854:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - }, - "value": "GovernorAlpha::cancel: proposer above threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - } - ], - "id": 11677, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10735:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10735:169:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11698, - "nodeType": "ExpressionStatement", - "src": "10735:169:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11699, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10915:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11701, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "10915:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10935:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10915:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11704, - "nodeType": "ExpressionStatement", - "src": "10915:24:10" - }, - { - "body": { - "id": 11740, - "nodeType": "Block", - "src": "11003:153:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11720, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11044:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11044:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11723, - "indexExpression": { - "argumentTypes": null, - "id": 11722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11061:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11044:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11724, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11065:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11065:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11727, - "indexExpression": { - "argumentTypes": null, - "id": 11726, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11081:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11065:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11728, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11085:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11729, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11085:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11731, - "indexExpression": { - "argumentTypes": null, - "id": 11730, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11105:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11085:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11732, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11109:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11733, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11109:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11735, - "indexExpression": { - "argumentTypes": null, - "id": 11734, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11128:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11109:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11736, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11132:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11737, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "11132:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11717, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "11017:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12298, - "src": "11017:26:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external" - } - }, - "id": 11738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11017:128:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11739, - "nodeType": "ExpressionStatement", - "src": "11017:128:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10969:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11710, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10973:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11711, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10973:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10973:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10969:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11741, - "initializationExpression": { - "assignments": [ - 11706 - ], - "declarations": [ - { - "constant": false, - "id": 11706, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11741, - "src": "10954:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10954:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11708, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10966:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10954:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10998:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10998:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11716, - "nodeType": "ExpressionStatement", - "src": "10998:3:10" - }, - "nodeType": "ForStatement", - "src": "10949:207:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11743, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "11188:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11742, - "name": "ProposalCanceled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11242, - "src": "11171:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11745, - "nodeType": "EmitStatement", - "src": "11166:33:10" - } - ] - }, - "documentation": null, - "id": 11747, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancel", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11655, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11654, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11747, - "src": "10469:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11653, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10469:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10468:20:10" - }, - "returnParameters": { - "id": 11656, - "nodeType": "ParameterList", - "parameters": [], - "src": "10508:0:10" - }, - "scope": 12250, - "src": "10453:753:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11780, - "nodeType": "Block", - "src": "11461:124:10", - "statements": [ - { - "assignments": [ - 11765 - ], - "declarations": [ - { - "constant": false, - "id": 11765, - "name": "p", - "nodeType": "VariableDeclaration", - "scope": 11780, - "src": "11471:18:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11764, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11471:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11769, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11766, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11492:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11768, - "indexExpression": { - "argumentTypes": null, - "id": 11767, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11749, - "src": "11502:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11492:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11471:42:10" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11770, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11531:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11771, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11531:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11772, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11542:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11773, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11542:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11774, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11552:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11552:12:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11776, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11566:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11566:11:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - } - ], - "id": 11778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11530:48:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_storage_$_t_array$_t_uint256_$dyn_storage_$_t_array$_t_string_storage_$dyn_storage_$_t_array$_t_bytes_storage_$dyn_storage_$", - "typeString": "tuple(address[] storage ref,uint256[] storage ref,string storage ref[] storage ref,bytes storage ref[] storage ref)" - } - }, - "functionReturnParameters": 11763, - "id": 11779, - "nodeType": "Return", - "src": "11523:55:10" - } - ] - }, - "documentation": null, - "id": 11781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getActions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11749, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11232:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11232:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11231:20:10" - }, - "returnParameters": { - "id": 11763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11753, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11310:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11310:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11752, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11310:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11756, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11348:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11754, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11348:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11755, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11348:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11759, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11382:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11382:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11758, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11382:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11762, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11422:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11422:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11422:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11296:160:10" - }, - "scope": 12250, - "src": "11212:373:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11797, - "nodeType": "Block", - "src": "11711:61:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11790, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11728:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11792, - "indexExpression": { - "argumentTypes": null, - "id": 11791, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11783, - "src": "11738:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11793, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "11728:30:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 11795, - "indexExpression": { - "argumentTypes": null, - "id": 11794, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11785, - "src": "11759:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:37:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "functionReturnParameters": 11789, - "id": 11796, - "nodeType": "Return", - "src": "11721:44:10" - } - ] - }, - "documentation": null, - "id": 11798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11783, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11611:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11611:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11785, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11631:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11631:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11610:35:10" - }, - "returnParameters": { - "id": 11789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11691:14:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_memory_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 11787, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "11691:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11690:16:10" - }, - "scope": 12250, - "src": "11591:181:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11900, - "nodeType": "Block", - "src": "11877:957:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11806, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "11895:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 11807, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11912:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11895:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11809, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11926:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11926:14:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11895:45:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726f706f73616c206964", - "id": 11813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11942:43:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - }, - "value": "GovernorAlpha::state: invalid proposal id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - } - ], - "id": 11805, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11887:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11887:99:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11815, - "nodeType": "ExpressionStatement", - "src": "11887:99:10" - }, - { - "assignments": [ - 11817 - ], - "declarations": [ - { - "constant": false, - "id": 11817, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11900, - "src": "11996:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11816, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11996:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11821, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11818, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "12024:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11820, - "indexExpression": { - "argumentTypes": null, - "id": 11819, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "12034:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12024:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11996:49:10" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11822, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12059:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11823, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "12059:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11828, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12142:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12142:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11830, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12158:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11831, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "12158:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12142:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11837, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12242:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11839, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12258:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11157, - "src": "12258:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12242:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11846, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12339:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12339:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11848, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "12360:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12339:42:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11851, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12385:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12385:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11853, - "name": "quorumVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11089, - "src": "12405:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12405:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12385:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12339:79:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11861, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12484:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11862, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12484:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12500:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12484:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11869, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11870, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "12568:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12651:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11878, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12677:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12677:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11880, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "12691:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "GRACE_PERIOD", - "nodeType": "MemberAccess", - "referencedDeclaration": 12260, - "src": "12691:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12691:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11877, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "12670:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12670:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12651:64:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11892, - "nodeType": "Block", - "src": "12776:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11889, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12797:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12797:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11891, - "nodeType": "Return", - "src": "12790:27:10" - } - ] - }, - "id": 11893, - "nodeType": "IfStatement", - "src": "12647:181:10", - "trueBody": { - "id": 11888, - "nodeType": "Block", - "src": "12717:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11885, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12738:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11886, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Expired", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12738:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11887, - "nodeType": "Return", - "src": "12731:28:10" - } - ] - } - }, - "id": 11894, - "nodeType": "IfStatement", - "src": "12564:264:10", - "trueBody": { - "id": 11874, - "nodeType": "Block", - "src": "12587:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11871, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12608:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12608:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11873, - "nodeType": "Return", - "src": "12601:29:10" - } - ] - } - }, - "id": 11895, - "nodeType": "IfStatement", - "src": "12480:348:10", - "trueBody": { - "id": 11868, - "nodeType": "Block", - "src": "12503:55:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11865, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12524:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12524:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11867, - "nodeType": "Return", - "src": "12517:30:10" - } - ] - } - }, - "id": 11896, - "nodeType": "IfStatement", - "src": "12335:493:10", - "trueBody": { - "id": 11860, - "nodeType": "Block", - "src": "12420:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11857, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12441:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Defeated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12441:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11859, - "nodeType": "Return", - "src": "12434:29:10" - } - ] - } - }, - "id": 11897, - "nodeType": "IfStatement", - "src": "12238:590:10", - "trueBody": { - "id": 11845, - "nodeType": "Block", - "src": "12277:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11842, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12298:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12298:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11844, - "nodeType": "Return", - "src": "12291:27:10" - } - ] - } - }, - "id": 11898, - "nodeType": "IfStatement", - "src": "12138:690:10", - "trueBody": { - "id": 11836, - "nodeType": "Block", - "src": "12179:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11833, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12200:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12200:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11835, - "nodeType": "Return", - "src": "12193:28:10" - } - ] - } - }, - "id": 11899, - "nodeType": "IfStatement", - "src": "12055:773:10", - "trueBody": { - "id": 11827, - "nodeType": "Block", - "src": "12078:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11824, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12099:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12099:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11826, - "nodeType": "Return", - "src": "12092:29:10" - } - ] - } - } - ] - }, - "documentation": null, - "id": 11901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11800, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11793:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11793:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11792:20:10" - }, - "returnParameters": { - "id": 11804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11858:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11802, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "11858:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11857:15:10" - }, - "scope": 12250, - "src": "11778:1056:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11915, - "nodeType": "Block", - "src": "12911:66:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "12938:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12938:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11911, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11903, - "src": "12950:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11912, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11905, - "src": "12962:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11908, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "12928:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12928:42:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11907, - "id": 11914, - "nodeType": "Return", - "src": "12921:49:10" - } - ] - }, - "documentation": null, - "id": 11916, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11903, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12858:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12858:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11905, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12878:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12878:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12857:34:10" - }, - "returnParameters": { - "id": 11907, - "nodeType": "ParameterList", - "parameters": [], - "src": "12911:0:10" - }, - "scope": 12250, - "src": "12840:137:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11994, - "nodeType": "Block", - "src": "13136:797:10", - "statements": [ - { - "assignments": [ - 11930 - ], - "declarations": [ - { - "constant": false, - "id": 11930, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13146:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11929, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13146:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11947, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11199, - "src": "13223:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11937, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11071, - "src": "13272:4:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - ], - "id": 11936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13266:5:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13266:11:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11935, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13256:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13256:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11940, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12249, - "src": "13296:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11943, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19284, - "src": "13334:4:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - ], - "id": 11942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13326:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13326:13:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 11932, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13195:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13195:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13195:158:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13172:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:191:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13146:217:10" - }, - { - "assignments": [ - 11949 - ], - "declarations": [ - { - "constant": false, - "id": 11949, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13374:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11958, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11953, - "name": "BALLOT_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11204, - "src": "13446:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11954, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13479:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11955, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13507:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 11951, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13418:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13418:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13418:110:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11950, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13395:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13395:143:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13374:164:10" - }, - { - "assignments": [ - 11960 - ], - "declarations": [ - { - "constant": false, - "id": 11960, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13549:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13549:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 11964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13623:10:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 11965, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11930, - "src": "13651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11966, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11949, - "src": "13684:10:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13589:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13589:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13589:119:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13566:152:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13549:169:10" - }, - { - "assignments": [ - 11971 - ], - "declarations": [ - { - "constant": false, - "id": 11971, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13729:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11970, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13729:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11978, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11973, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11960, - "src": "13759:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11974, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11922, - "src": "13767:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 11975, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11924, - "src": "13770:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11976, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11926, - "src": "13773:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11972, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "13749:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 11977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13749:26:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13729:46:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11980, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13793:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 11982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13814:1:10", - "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": 11981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13806:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13793:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e76616c6964207369676e6174757265", - "id": 11985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13818:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - }, - "value": "GovernorAlpha::castVoteBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - } - ], - "id": 11979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "13785:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13785:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11987, - "nodeType": "ExpressionStatement", - "src": "13785:83:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11989, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13895:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11990, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13906:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11991, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13918:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11988, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "13885:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13885:41:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11928, - "id": 11993, - "nodeType": "Return", - "src": "13878:48:10" - } - ] - }, - "documentation": null, - "id": 11995, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVoteBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11927, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11918, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13015:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13015:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11920, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13043:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11919, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13043:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11922, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13065:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 11921, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "13065:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11924, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13082:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11923, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13082:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11926, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13101:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13101:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13005:111:10" - }, - "returnParameters": { - "id": 11928, - "nodeType": "ParameterList", - "parameters": [], - "src": "13136:0:10" - }, - "scope": 12250, - "src": "12983:950:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12093, - "nodeType": "Block", - "src": "14058:746:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 12010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12006, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14082:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12005, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "14076:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 12007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14076:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12008, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "14097:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 12009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14097:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "14076:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6720697320636c6f736564", - "id": 12011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14119:44:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - }, - "value": "GovernorAlpha::_castVote: voting is closed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - } - ], - "id": 12004, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14068:96:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12013, - "nodeType": "ExpressionStatement", - "src": "14068:96:10" - }, - { - "assignments": [ - 12015 - ], - "declarations": [ - { - "constant": false, - "id": 12015, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14174:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 12014, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "14174:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12019, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 12016, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "14202:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 12018, - "indexExpression": { - "argumentTypes": null, - "id": 12017, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14212:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14202:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14174:49:10" - }, - { - "assignments": [ - 12021 - ], - "declarations": [ - { - "constant": false, - "id": 12021, - "name": "receipt", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14233:23:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 12020, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "14233:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12026, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12022, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14259:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "14259:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 12025, - "indexExpression": { - "argumentTypes": null, - "id": 12024, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14277:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14259:24:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14233:50:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12028, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14301:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12029, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14301:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 12030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14321:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14301:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74657220616c726561647920766f746564", - "id": 12032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14328:47:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - }, - "value": "GovernorAlpha::_castVote: voter already voted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - } - ], - "id": 12027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14293:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14293:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12034, - "nodeType": "ExpressionStatement", - "src": "14293:83:10" - }, - { - "assignments": [ - 12036 - ], - "declarations": [ - { - "constant": false, - "id": 12036, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14386:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14386:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12043, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12039, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14420:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12040, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "14427:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12037, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "14402:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 12038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "14402:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 12042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14402:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14386:61:10" - }, - { - "condition": { - "argumentTypes": null, - "id": 12044, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14462:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 12066, - "nodeType": "Block", - "src": "14554:85:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12056, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12058, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14568:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12060, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14599:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12061, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14599:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12062, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14622:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12059, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14592:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14592:36:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14568:60:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12065, - "nodeType": "ExpressionStatement", - "src": "14568:60:10" - } - ] - }, - "id": 12067, - "nodeType": "IfStatement", - "src": "14458:181:10", - "trueBody": { - "id": 12055, - "nodeType": "Block", - "src": "14471:77:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12045, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14485:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14485:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12049, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14512:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12050, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14512:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12051, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14531:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12048, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14505:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14505:32:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14485:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12054, - "nodeType": "ExpressionStatement", - "src": "14485:52:10" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 12072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12068, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14649:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12070, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14649:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 12071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14668:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14649:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12073, - "nodeType": "ExpressionStatement", - "src": "14649:23:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12074, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14682:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "support", - "nodeType": "MemberAccess", - "referencedDeclaration": 11174, - "src": "14682:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12077, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14700:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14682:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12079, - "nodeType": "ExpressionStatement", - "src": "14682:25:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12080, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14717:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12082, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11176, - "src": "14717:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12083, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14733:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14717:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12085, - "nodeType": "ExpressionStatement", - "src": "14717:21:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12087, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14763:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12088, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14770:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12089, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14782:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12090, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14791:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12086, - "name": "VoteCast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11238, - "src": "14754:8:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bool,uint256)" - } - }, - "id": 12091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14754:43:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12092, - "nodeType": "EmitStatement", - "src": "14749:48:10" - } - ] - }, - "documentation": null, - "id": 12094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11997, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13967:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13967:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11999, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13990:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13990:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12001, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "14018:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14018:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13957:79:10" - }, - "returnParameters": { - "id": 12003, - "nodeType": "ParameterList", - "parameters": [], - "src": "14058:0:10" - }, - "scope": 12250, - "src": "13939:865:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12110, - "nodeType": "Block", - "src": "14854:141:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12098, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "14872:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14872:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12100, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "14886:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14872:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14896:59:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__acceptAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - } - ], - "id": 12097, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14864:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14864:92:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12104, - "nodeType": "ExpressionStatement", - "src": "14864:92:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 12105, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "14966:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "acceptAdmin", - "nodeType": "MemberAccess", - "referencedDeclaration": 12263, - "src": "14966:20:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 12108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14966:22:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12109, - "nodeType": "ExpressionStatement", - "src": "14966:22:10" - } - ] - }, - "documentation": null, - "id": 12111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12095, - "nodeType": "ParameterList", - "parameters": [], - "src": "14832:2:10" - }, - "returnParameters": { - "id": 12096, - "nodeType": "ParameterList", - "parameters": [], - "src": "14854:0:10" - }, - "scope": 12250, - "src": "14810:185:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12128, - "nodeType": "Block", - "src": "15042:137:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15060:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15060:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12117, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15074:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15060:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15084:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__abdicate: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - } - ], - "id": 12114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15052:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15052:89:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12121, - "nodeType": "ExpressionStatement", - "src": "15052:89:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12122, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15151:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15170:1:10", - "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": 12123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15162:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15162:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15151:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12127, - "nodeType": "ExpressionStatement", - "src": "15151:21:10" - } - ] - }, - "documentation": null, - "id": 12129, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__abdicate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12112, - "nodeType": "ParameterList", - "parameters": [], - "src": "15020:2:10" - }, - "returnParameters": { - "id": 12113, - "nodeType": "ParameterList", - "parameters": [], - "src": "15042:0:10" - }, - "scope": 12250, - "src": "15001:178:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12159, - "nodeType": "Block", - "src": "15304:245:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12137, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15322:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15322:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12139, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15336:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15322:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15346:76:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12136, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15314:109:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12143, - "nodeType": "ExpressionStatement", - "src": "15314:109:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12148, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15467:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15459:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15459:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15478:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15481:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12154, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12131, - "src": "15520:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15509:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15509:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15509:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12156, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12133, - "src": "15538:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12144, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15433:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "15433:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 12157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15433:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 12158, - "nodeType": "ExpressionStatement", - "src": "15433:109:10" - } - ] - }, - "documentation": null, - "id": 12160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__queueSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12131, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15234:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15234:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12133, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15267:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15267:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15224:60:10" - }, - "returnParameters": { - "id": 12135, - "nodeType": "ParameterList", - "parameters": [], - "src": "15304:0:10" - }, - "scope": 12250, - "src": "15185:364:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12190, - "nodeType": "Block", - "src": "15676:249:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15694:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15694:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12170, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15708:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15694:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15718:78:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12167, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15686:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15686:111:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12174, - "nodeType": "ExpressionStatement", - "src": "15686:111:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12179, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15843:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15835:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15835:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15857:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12185, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12162, - "src": "15896:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12183, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15885:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15885:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15885:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12187, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12164, - "src": "15914:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12175, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15807:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "15807:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 12188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15807:111:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 12189, - "nodeType": "ExpressionStatement", - "src": "15807:111:10" - } - ] - }, - "documentation": null, - "id": 12191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__executeSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12165, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12162, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15606:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15606:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12164, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15639:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12163, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15639:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15596:60:10" - }, - "returnParameters": { - "id": 12166, - "nodeType": "ParameterList", - "parameters": [], - "src": "15676:0:10" - }, - "scope": 12250, - "src": "15555:370:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12215, - "nodeType": "Block", - "src": "16001:98:10", - "statements": [ - { - "assignments": [ - 12201 - ], - "declarations": [ - { - "constant": false, - "id": 12201, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12215, - "src": "16011:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12200, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16011:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12205, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12202, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16023:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12203, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12195, - "src": "16027:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16023:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16011:17:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12207, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16046:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12208, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16051:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16046:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6164646974696f6e206f766572666c6f77", - "id": 12210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16054:19:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - }, - "value": "addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - } - ], - "id": 12206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16038:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16038:36:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12212, - "nodeType": "ExpressionStatement", - "src": "16038:36:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12213, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16091:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12199, - "id": 12214, - "nodeType": "Return", - "src": "16084:8:10" - } - ] - }, - "documentation": null, - "id": 12216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15947:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15947:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15958:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15958:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15946:22:10" - }, - "returnParameters": { - "id": 12199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15992:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15992:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15991:9:10" - }, - "scope": 12250, - "src": "15931:168:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12236, - "nodeType": "Block", - "src": "16175:79:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12226, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16193:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12227, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16198:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16193:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7375627472616374696f6e20756e646572666c6f77", - "id": 12229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16201:23:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - }, - "value": "subtraction underflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - } - ], - "id": 12225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16185:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16185:40:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12231, - "nodeType": "ExpressionStatement", - "src": "16185:40:10" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12232, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16242:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12233, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16246:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12224, - "id": 12235, - "nodeType": "Return", - "src": "16235:12:10" - } - ] - }, - "documentation": null, - "id": 12237, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12218, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16121:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16121:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12220, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16132:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16132:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16120:22:10" - }, - "returnParameters": { - "id": 12224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12223, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16166:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16166:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16165:9:10" - }, - "scope": 12250, - "src": "16105:149:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12248, - "nodeType": "Block", - "src": "16314:98:10", - "statements": [ - { - "assignments": [ - 12243 - ], - "declarations": [ - { - "constant": false, - "id": 12243, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 12248, - "src": "16324:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16324:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16324:15:10" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 12243, - "isOffset": false, - "isSlot": false, - "src": "16360:7:10", - "valueSize": 1 - } - } - ], - "id": 12245, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "16349:33:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12246, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12243, - "src": "16398:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12241, - "id": 12247, - "nodeType": "Return", - "src": "16391:14:10" - } - ] - }, - "documentation": null, - "id": 12249, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12238, - "nodeType": "ParameterList", - "parameters": [], - "src": "16279:2:10" - }, - "returnParameters": { - "id": 12241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12240, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12249, - "src": "16305:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16304:9:10" - }, - "scope": 12250, - "src": "16260:152:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 12333, - "src": "1038:15376:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12314, - "linearizedBaseContracts": [ - 12314 - ], - "name": "TimelockInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12255, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12251, - "nodeType": "ParameterList", - "parameters": [], - "src": "16464:2:10" - }, - "returnParameters": { - "id": 12254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12253, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12255, - "src": "16490:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16490:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:9:10" - }, - "scope": 12314, - "src": "16450:49:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12260, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "GRACE_PERIOD", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12256, - "nodeType": "ParameterList", - "parameters": [], - "src": "16525:2:10" - }, - "returnParameters": { - "id": 12259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12260, - "src": "16551:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16551:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16550:9:10" - }, - "scope": 12314, - "src": "16504:56:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12263, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12261, - "nodeType": "ParameterList", - "parameters": [], - "src": "16585:2:10" - }, - "returnParameters": { - "id": 12262, - "nodeType": "ParameterList", - "parameters": [], - "src": "16596:0:10" - }, - "scope": 12314, - "src": "16565:32:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12270, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queuedTransactions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12265, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16630:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12264, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16630:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16629:14:10" - }, - "returnParameters": { - "id": 12269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12268, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16667:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16667:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16666:6:10" - }, - "scope": 12314, - "src": "16602:71:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12285, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12272, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16704:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12271, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16704:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12274, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16720:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12273, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16720:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12276, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16735:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12275, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16735:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12278, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16762:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12277, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16762:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12280, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16783:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16783:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16703:92:10" - }, - "returnParameters": { - "id": 12284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16814:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12282, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16814:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16813:9:10" - }, - "scope": 12314, - "src": "16678:145:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12298, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12296, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12287, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16855:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16855:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12289, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16871:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16871:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12291, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16886:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16886:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16913:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16913:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12295, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16934:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16934:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16854:92:10" - }, - "returnParameters": { - "id": 12297, - "nodeType": "ParameterList", - "parameters": [], - "src": "16955:0:10" - }, - "scope": 12314, - "src": "16828:128:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12313, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12300, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "16989:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16989:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12302, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17005:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12304, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17020:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12303, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17020:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12306, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17047:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17047:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12308, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17068:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16988:92:10" - }, - "returnParameters": { - "id": 12312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17107:12:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17107:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17106:14:10" - }, - "scope": 12314, - "src": "16961:160:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "16416:707:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12332, - "linearizedBaseContracts": [ - 12332 - ], - "name": "YAMInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12323, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12316, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17177:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17177:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12318, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17194:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17194:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17176:38:10" - }, - "returnParameters": { - "id": 12322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17238:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17238:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17237:9:10" - }, - "scope": 12332, - "src": "17154:93:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12328, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12324, - "nodeType": "ParameterList", - "parameters": [], - "src": "17271:2:10" - }, - "returnParameters": { - "id": 12327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12328, - "src": "17297:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17297:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17296:9:10" - }, - "scope": 12332, - "src": "17252:54:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12331, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12329, - "nodeType": "ParameterList", - "parameters": [], - "src": "17330:2:10" - }, - "returnParameters": { - "id": 12330, - "nodeType": "ParameterList", - "parameters": [], - "src": "17341:0:10" - }, - "scope": 12332, - "src": "17311:31:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "17125:219:10" - } - ], - "src": "0:17345:10" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.025Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/UniswapPair.json b/build/contracts/UniswapPair.json deleted file mode 100644 index 6cb16be..0000000 --- a/build/contracts/UniswapPair.json +++ /dev/null @@ -1,6412 +0,0 @@ -{ - "contractName": "UniswapPair", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0In", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1In", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0Out", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1Out", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "Swap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint112", - "name": "reserve0", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "uint112", - "name": "reserve1", - "type": "uint112" - } - ], - "name": "Sync", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MINIMUM_LIQUIDITY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "token0", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "token1", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getReserves", - "outputs": [ - { - "internalType": "uint112", - "name": "reserve0", - "type": "uint112" - }, - { - "internalType": "uint112", - "name": "reserve1", - "type": "uint112" - }, - { - "internalType": "uint32", - "name": "blockTimestampLast", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "price0CumulativeLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "price1CumulativeLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount0Out", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Out", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "swap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "skim", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "sync", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve0\",\"type\":\"uint112\"},{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve1\",\"type\":\"uint112\"}],\"name\":\"Sync\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MINIMUM_LIQUIDITY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getReserves\",\"outputs\":[{\"internalType\":\"uint112\",\"name\":\"reserve0\",\"type\":\"uint112\"},{\"internalType\":\"uint112\",\"name\":\"reserve1\",\"type\":\"uint112\"},{\"internalType\":\"uint32\",\"name\":\"blockTimestampLast\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"price0CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"price1CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"skim\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"sync\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol\":\"UniswapPair\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol\":{\"keccak256\":\"0x311645a7312f2ef6eaf48ef2837e7f0cf9310ecb99d6400a1a31021c44e0f027\",\"urls\":[\"bzz-raw://99307e4540dbcf1cbdf07f0e25d063d2cdc97890e92b31b555fef7d114eea4e5\",\"dweb:/ipfs/QmYUoD5sGSUTBZWRbDEBpjfWP1VcGp9m3semMf3oGFQHJt\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity >=0.5.0;\n\ninterface UniswapPair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "exportedSymbols": { - "UniswapPair": [ - 14581 - ] - }, - "id": 14582, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14341, - "literals": [ - "solidity", - ">=", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:24:16" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 14581, - "linearizedBaseContracts": [ - 14581 - ], - "name": "UniswapPair", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 14349, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 14348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14343, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "69:21:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14342, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "69:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14345, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "92:23:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14344, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "92:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14347, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "117:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14346, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "117:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "68:60:16" - }, - "src": "54:75:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14357, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 14356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14351, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "149:20:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14350, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "149:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14353, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "171:18:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14352, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "171:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14355, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "191:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14354, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "191:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "148:54:16" - }, - "src": "134:69:16" - }, - { - "body": null, - "documentation": null, - "id": 14362, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "name", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14358, - "nodeType": "ParameterList", - "parameters": [], - "src": "222:2:16" - }, - "returnParameters": { - "id": 14361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14360, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14362, - "src": "248:13:16", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14359, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "248:6:16", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "247:15:16" - }, - "scope": 14581, - "src": "209:54:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14367, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "symbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14363, - "nodeType": "ParameterList", - "parameters": [], - "src": "283:2:16" - }, - "returnParameters": { - "id": 14366, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14365, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14367, - "src": "309:13:16", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14364, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "309:6:16", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "308:15:16" - }, - "scope": 14581, - "src": "268:56:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14372, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "decimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14368, - "nodeType": "ParameterList", - "parameters": [], - "src": "346:2:16" - }, - "returnParameters": { - "id": 14371, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14370, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14372, - "src": "372:5:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 14369, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "372:5:16", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "371:7:16" - }, - "scope": 14581, - "src": "329:50:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14377, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14373, - "nodeType": "ParameterList", - "parameters": [], - "src": "404:2:16" - }, - "returnParameters": { - "id": 14376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14377, - "src": "430:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14374, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "430:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "429:6:16" - }, - "scope": 14581, - "src": "384:52:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14384, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14379, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14384, - "src": "460:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "460:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "459:15:16" - }, - "returnParameters": { - "id": 14383, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14382, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14384, - "src": "498:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14381, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "498:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "497:6:16" - }, - "scope": 14581, - "src": "441:63:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14393, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14389, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14386, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14393, - "src": "528:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14385, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "528:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14388, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14393, - "src": "543:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "543:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:32:16" - }, - "returnParameters": { - "id": 14392, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14391, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14393, - "src": "583:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14390, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "583:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "582:6:16" - }, - "scope": 14581, - "src": "509:80:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14402, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14395, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14402, - "src": "612:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14394, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "612:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14397, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14402, - "src": "629:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14396, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "629:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "611:29:16" - }, - "returnParameters": { - "id": 14401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14400, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14402, - "src": "659:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14399, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "659:4:16", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "658:6:16" - }, - "scope": 14581, - "src": "595:70:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14411, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14404, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14411, - "src": "688:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14403, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "688:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14406, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14411, - "src": "700:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14405, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "700:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "687:24:16" - }, - "returnParameters": { - "id": 14410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14411, - "src": "730:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14408, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "730:4:16", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "729:6:16" - }, - "scope": 14581, - "src": "670:66:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14422, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14418, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14413, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "763:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14412, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "763:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14415, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "777:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14414, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "777:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14417, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "789:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14416, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "789:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "762:38:16" - }, - "returnParameters": { - "id": 14421, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14420, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "819:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14419, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "819:4:16", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "818:6:16" - }, - "scope": 14581, - "src": "741:84:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14427, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "DOMAIN_SEPARATOR", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14423, - "nodeType": "ParameterList", - "parameters": [], - "src": "856:2:16" - }, - "returnParameters": { - "id": 14426, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14425, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14427, - "src": "882:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14424, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "882:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "881:9:16" - }, - "scope": 14581, - "src": "831:60:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14432, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "PERMIT_TYPEHASH", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14428, - "nodeType": "ParameterList", - "parameters": [], - "src": "920:2:16" - }, - "returnParameters": { - "id": 14431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14430, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14432, - "src": "946:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14429, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "946:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "945:9:16" - }, - "scope": 14581, - "src": "896:59:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14439, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "nonces", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14434, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14439, - "src": "976:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14433, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "976:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "975:15:16" - }, - "returnParameters": { - "id": 14438, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14437, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14439, - "src": "1014:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14436, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1014:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1013:6:16" - }, - "scope": 14581, - "src": "960:60:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14456, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "permit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14454, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14441, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1042:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14440, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1042:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14443, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1057:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14442, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1057:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14445, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1074:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14444, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1074:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14447, - "name": "deadline", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1086:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14446, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1086:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14449, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1101:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 14448, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1101:5:16", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14451, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1110:9:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14450, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1110:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14453, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1121:9:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14452, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1121:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1041:90:16" - }, - "returnParameters": { - "id": 14455, - "nodeType": "ParameterList", - "parameters": [], - "src": "1140:0:16" - }, - "scope": 14581, - "src": "1026:115:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": null, - "id": 14464, - "name": "Mint", - "nodeType": "EventDefinition", - "parameters": { - "id": 14463, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14458, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14464, - "src": "1158:22:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14457, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1158:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14460, - "indexed": false, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 14464, - "src": "1182:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14459, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1182:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14462, - "indexed": false, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 14464, - "src": "1196:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14461, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1196:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1157:52:16" - }, - "src": "1147:63:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14474, - "name": "Burn", - "nodeType": "EventDefinition", - "parameters": { - "id": 14473, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14466, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1226:22:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14465, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1226:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14468, - "indexed": false, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1250:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14467, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1250:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14470, - "indexed": false, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1264:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14469, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1264:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14472, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1278:18:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14471, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1278:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1225:72:16" - }, - "src": "1215:83:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14488, - "name": "Swap", - "nodeType": "EventDefinition", - "parameters": { - "id": 14487, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14476, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1323:22:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1323:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14478, - "indexed": false, - "name": "amount0In", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1355:14:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14477, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1355:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14480, - "indexed": false, - "name": "amount1In", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1379:14:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14479, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1379:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14482, - "indexed": false, - "name": "amount0Out", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1403:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14481, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1403:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14484, - "indexed": false, - "name": "amount1Out", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1428:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14483, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1428:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14486, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1453:18:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14485, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1453:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1313:164:16" - }, - "src": "1303:175:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14494, - "name": "Sync", - "nodeType": "EventDefinition", - "parameters": { - "id": 14493, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14490, - "indexed": false, - "name": "reserve0", - "nodeType": "VariableDeclaration", - "scope": 14494, - "src": "1494:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14489, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1494:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14492, - "indexed": false, - "name": "reserve1", - "nodeType": "VariableDeclaration", - "scope": 14494, - "src": "1512:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14491, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1512:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1493:36:16" - }, - "src": "1483:47:16" - }, - { - "body": null, - "documentation": null, - "id": 14499, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "MINIMUM_LIQUIDITY", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14495, - "nodeType": "ParameterList", - "parameters": [], - "src": "1562:2:16" - }, - "returnParameters": { - "id": 14498, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14497, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14499, - "src": "1588:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14496, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1588:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1587:6:16" - }, - "scope": 14581, - "src": "1536:58:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14504, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "factory", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14500, - "nodeType": "ParameterList", - "parameters": [], - "src": "1615:2:16" - }, - "returnParameters": { - "id": 14503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14502, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14504, - "src": "1641:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14501, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1641:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1640:9:16" - }, - "scope": 14581, - "src": "1599:51:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14509, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "token0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14505, - "nodeType": "ParameterList", - "parameters": [], - "src": "1670:2:16" - }, - "returnParameters": { - "id": 14508, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14507, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14509, - "src": "1696:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14506, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1696:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1695:9:16" - }, - "scope": 14581, - "src": "1655:50:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14514, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "token1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14510, - "nodeType": "ParameterList", - "parameters": [], - "src": "1725:2:16" - }, - "returnParameters": { - "id": 14513, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14512, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14514, - "src": "1751:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14511, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1751:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1750:9:16" - }, - "scope": 14581, - "src": "1710:50:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14523, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getReserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14515, - "nodeType": "ParameterList", - "parameters": [], - "src": "1785:2:16" - }, - "returnParameters": { - "id": 14522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14517, - "name": "reserve0", - "nodeType": "VariableDeclaration", - "scope": 14523, - "src": "1811:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14516, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1811:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14519, - "name": "reserve1", - "nodeType": "VariableDeclaration", - "scope": 14523, - "src": "1829:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14518, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1829:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14521, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 14523, - "src": "1847:25:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 14520, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1847:6:16", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1810:63:16" - }, - "scope": 14581, - "src": "1765:109:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14528, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "price0CumulativeLast", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14524, - "nodeType": "ParameterList", - "parameters": [], - "src": "1908:2:16" - }, - "returnParameters": { - "id": 14527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14526, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14528, - "src": "1934:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14525, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1934:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1933:6:16" - }, - "scope": 14581, - "src": "1879:61:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14533, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "price1CumulativeLast", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14529, - "nodeType": "ParameterList", - "parameters": [], - "src": "1974:2:16" - }, - "returnParameters": { - "id": 14532, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14531, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14533, - "src": "2000:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14530, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2000:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1999:6:16" - }, - "scope": 14581, - "src": "1945:61:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14538, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "kLast", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14534, - "nodeType": "ParameterList", - "parameters": [], - "src": "2025:2:16" - }, - "returnParameters": { - "id": 14537, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14536, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14538, - "src": "2051:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14535, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2051:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2050:6:16" - }, - "scope": 14581, - "src": "2011:46:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14545, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14541, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14540, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14545, - "src": "2077:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14539, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2077:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2076:12:16" - }, - "returnParameters": { - "id": 14544, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14543, - "name": "liquidity", - "nodeType": "VariableDeclaration", - "scope": 14545, - "src": "2107:14:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14542, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2107:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2106:16:16" - }, - "scope": 14581, - "src": "2063:60:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14554, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "burn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14547, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14554, - "src": "2142:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14546, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2142:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2141:12:16" - }, - "returnParameters": { - "id": 14553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14550, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 14554, - "src": "2172:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14549, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2172:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14552, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 14554, - "src": "2186:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14551, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2186:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2171:28:16" - }, - "scope": 14581, - "src": "2128:72:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14565, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "swap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14563, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14556, - "name": "amount0Out", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2219:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14555, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2219:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14558, - "name": "amount1Out", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2236:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14557, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2236:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14560, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2253:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14559, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2253:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14562, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2265:19:16", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 14561, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2265:5:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:67:16" - }, - "returnParameters": { - "id": 14564, - "nodeType": "ParameterList", - "parameters": [], - "src": "2294:0:16" - }, - "scope": 14581, - "src": "2205:90:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14570, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "skim", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14568, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14567, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14570, - "src": "2314:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14566, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2314:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2313:12:16" - }, - "returnParameters": { - "id": 14569, - "nodeType": "ParameterList", - "parameters": [], - "src": "2334:0:16" - }, - "scope": 14581, - "src": "2300:35:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14573, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "sync", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14571, - "nodeType": "ParameterList", - "parameters": [], - "src": "2353:2:16" - }, - "returnParameters": { - "id": 14572, - "nodeType": "ParameterList", - "parameters": [], - "src": "2364:0:16" - }, - "scope": 14581, - "src": "2340:25:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14580, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14578, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14575, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14580, - "src": "2391:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14574, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2391:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14577, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14580, - "src": "2400:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14576, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2400:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2390:18:16" - }, - "returnParameters": { - "id": 14579, - "nodeType": "ParameterList", - "parameters": [], - "src": "2417:0:16" - }, - "scope": 14581, - "src": "2371:47:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 14582, - "src": "26:2394:16" - } - ], - "src": "0:2421:16" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "exportedSymbols": { - "UniswapPair": [ - 14581 - ] - }, - "id": 14582, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14341, - "literals": [ - "solidity", - ">=", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:24:16" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 14581, - "linearizedBaseContracts": [ - 14581 - ], - "name": "UniswapPair", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 14349, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 14348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14343, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "69:21:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14342, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "69:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14345, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "92:23:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14344, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "92:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14347, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14349, - "src": "117:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14346, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "117:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "68:60:16" - }, - "src": "54:75:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14357, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 14356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14351, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "149:20:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14350, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "149:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14353, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "171:18:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14352, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "171:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14355, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14357, - "src": "191:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14354, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "191:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "148:54:16" - }, - "src": "134:69:16" - }, - { - "body": null, - "documentation": null, - "id": 14362, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "name", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14358, - "nodeType": "ParameterList", - "parameters": [], - "src": "222:2:16" - }, - "returnParameters": { - "id": 14361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14360, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14362, - "src": "248:13:16", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14359, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "248:6:16", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "247:15:16" - }, - "scope": 14581, - "src": "209:54:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14367, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "symbol", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14363, - "nodeType": "ParameterList", - "parameters": [], - "src": "283:2:16" - }, - "returnParameters": { - "id": 14366, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14365, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14367, - "src": "309:13:16", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14364, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "309:6:16", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "308:15:16" - }, - "scope": 14581, - "src": "268:56:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14372, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "decimals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14368, - "nodeType": "ParameterList", - "parameters": [], - "src": "346:2:16" - }, - "returnParameters": { - "id": 14371, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14370, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14372, - "src": "372:5:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 14369, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "372:5:16", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "371:7:16" - }, - "scope": 14581, - "src": "329:50:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14377, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14373, - "nodeType": "ParameterList", - "parameters": [], - "src": "404:2:16" - }, - "returnParameters": { - "id": 14376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14377, - "src": "430:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14374, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "430:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "429:6:16" - }, - "scope": 14581, - "src": "384:52:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14384, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14379, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14384, - "src": "460:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "460:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "459:15:16" - }, - "returnParameters": { - "id": 14383, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14382, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14384, - "src": "498:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14381, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "498:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "497:6:16" - }, - "scope": 14581, - "src": "441:63:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14393, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14389, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14386, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14393, - "src": "528:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14385, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "528:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14388, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14393, - "src": "543:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "543:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:32:16" - }, - "returnParameters": { - "id": 14392, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14391, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14393, - "src": "583:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14390, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "583:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "582:6:16" - }, - "scope": 14581, - "src": "509:80:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14402, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14395, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14402, - "src": "612:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14394, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "612:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14397, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14402, - "src": "629:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14396, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "629:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "611:29:16" - }, - "returnParameters": { - "id": 14401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14400, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14402, - "src": "659:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14399, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "659:4:16", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "658:6:16" - }, - "scope": 14581, - "src": "595:70:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14411, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14404, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14411, - "src": "688:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14403, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "688:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14406, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14411, - "src": "700:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14405, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "700:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "687:24:16" - }, - "returnParameters": { - "id": 14410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14411, - "src": "730:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14408, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "730:4:16", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "729:6:16" - }, - "scope": 14581, - "src": "670:66:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14422, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14418, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14413, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "763:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14412, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "763:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14415, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "777:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14414, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "777:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14417, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "789:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14416, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "789:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "762:38:16" - }, - "returnParameters": { - "id": 14421, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14420, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14422, - "src": "819:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14419, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "819:4:16", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "818:6:16" - }, - "scope": 14581, - "src": "741:84:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14427, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "DOMAIN_SEPARATOR", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14423, - "nodeType": "ParameterList", - "parameters": [], - "src": "856:2:16" - }, - "returnParameters": { - "id": 14426, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14425, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14427, - "src": "882:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14424, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "882:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "881:9:16" - }, - "scope": 14581, - "src": "831:60:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14432, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "PERMIT_TYPEHASH", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14428, - "nodeType": "ParameterList", - "parameters": [], - "src": "920:2:16" - }, - "returnParameters": { - "id": 14431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14430, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14432, - "src": "946:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14429, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "946:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "945:9:16" - }, - "scope": 14581, - "src": "896:59:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14439, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "nonces", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14434, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14439, - "src": "976:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14433, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "976:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "975:15:16" - }, - "returnParameters": { - "id": 14438, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14437, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14439, - "src": "1014:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14436, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1014:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1013:6:16" - }, - "scope": 14581, - "src": "960:60:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14456, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "permit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14454, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14441, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1042:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14440, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1042:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14443, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1057:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14442, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1057:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14445, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1074:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14444, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1074:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14447, - "name": "deadline", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1086:13:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14446, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1086:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14449, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1101:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 14448, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1101:5:16", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14451, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1110:9:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14450, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1110:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14453, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 14456, - "src": "1121:9:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 14452, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1121:7:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1041:90:16" - }, - "returnParameters": { - "id": 14455, - "nodeType": "ParameterList", - "parameters": [], - "src": "1140:0:16" - }, - "scope": 14581, - "src": "1026:115:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": null, - "id": 14464, - "name": "Mint", - "nodeType": "EventDefinition", - "parameters": { - "id": 14463, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14458, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14464, - "src": "1158:22:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14457, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1158:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14460, - "indexed": false, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 14464, - "src": "1182:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14459, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1182:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14462, - "indexed": false, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 14464, - "src": "1196:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14461, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1196:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1157:52:16" - }, - "src": "1147:63:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14474, - "name": "Burn", - "nodeType": "EventDefinition", - "parameters": { - "id": 14473, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14466, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1226:22:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14465, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1226:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14468, - "indexed": false, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1250:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14467, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1250:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14470, - "indexed": false, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1264:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14469, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1264:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14472, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14474, - "src": "1278:18:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14471, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1278:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1225:72:16" - }, - "src": "1215:83:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14488, - "name": "Swap", - "nodeType": "EventDefinition", - "parameters": { - "id": 14487, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14476, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1323:22:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1323:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14478, - "indexed": false, - "name": "amount0In", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1355:14:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14477, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1355:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14480, - "indexed": false, - "name": "amount1In", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1379:14:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14479, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1379:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14482, - "indexed": false, - "name": "amount0Out", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1403:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14481, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1403:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14484, - "indexed": false, - "name": "amount1Out", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1428:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14483, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1428:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14486, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14488, - "src": "1453:18:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14485, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1453:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1313:164:16" - }, - "src": "1303:175:16" - }, - { - "anonymous": false, - "documentation": null, - "id": 14494, - "name": "Sync", - "nodeType": "EventDefinition", - "parameters": { - "id": 14493, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14490, - "indexed": false, - "name": "reserve0", - "nodeType": "VariableDeclaration", - "scope": 14494, - "src": "1494:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14489, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1494:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14492, - "indexed": false, - "name": "reserve1", - "nodeType": "VariableDeclaration", - "scope": 14494, - "src": "1512:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14491, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1512:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1493:36:16" - }, - "src": "1483:47:16" - }, - { - "body": null, - "documentation": null, - "id": 14499, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "MINIMUM_LIQUIDITY", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14495, - "nodeType": "ParameterList", - "parameters": [], - "src": "1562:2:16" - }, - "returnParameters": { - "id": 14498, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14497, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14499, - "src": "1588:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14496, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1588:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1587:6:16" - }, - "scope": 14581, - "src": "1536:58:16", - "stateMutability": "pure", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14504, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "factory", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14500, - "nodeType": "ParameterList", - "parameters": [], - "src": "1615:2:16" - }, - "returnParameters": { - "id": 14503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14502, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14504, - "src": "1641:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14501, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1641:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1640:9:16" - }, - "scope": 14581, - "src": "1599:51:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14509, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "token0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14505, - "nodeType": "ParameterList", - "parameters": [], - "src": "1670:2:16" - }, - "returnParameters": { - "id": 14508, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14507, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14509, - "src": "1696:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14506, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1696:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1695:9:16" - }, - "scope": 14581, - "src": "1655:50:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14514, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "token1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14510, - "nodeType": "ParameterList", - "parameters": [], - "src": "1725:2:16" - }, - "returnParameters": { - "id": 14513, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14512, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14514, - "src": "1751:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14511, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1751:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1750:9:16" - }, - "scope": 14581, - "src": "1710:50:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14523, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getReserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14515, - "nodeType": "ParameterList", - "parameters": [], - "src": "1785:2:16" - }, - "returnParameters": { - "id": 14522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14517, - "name": "reserve0", - "nodeType": "VariableDeclaration", - "scope": 14523, - "src": "1811:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14516, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1811:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14519, - "name": "reserve1", - "nodeType": "VariableDeclaration", - "scope": 14523, - "src": "1829:16:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 14518, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "1829:7:16", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14521, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 14523, - "src": "1847:25:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 14520, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1847:6:16", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1810:63:16" - }, - "scope": 14581, - "src": "1765:109:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14528, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "price0CumulativeLast", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14524, - "nodeType": "ParameterList", - "parameters": [], - "src": "1908:2:16" - }, - "returnParameters": { - "id": 14527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14526, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14528, - "src": "1934:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14525, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1934:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1933:6:16" - }, - "scope": 14581, - "src": "1879:61:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14533, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "price1CumulativeLast", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14529, - "nodeType": "ParameterList", - "parameters": [], - "src": "1974:2:16" - }, - "returnParameters": { - "id": 14532, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14531, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14533, - "src": "2000:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14530, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2000:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1999:6:16" - }, - "scope": 14581, - "src": "1945:61:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14538, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "kLast", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14534, - "nodeType": "ParameterList", - "parameters": [], - "src": "2025:2:16" - }, - "returnParameters": { - "id": 14537, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14536, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14538, - "src": "2051:4:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14535, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2051:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2050:6:16" - }, - "scope": 14581, - "src": "2011:46:16", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14545, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14541, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14540, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14545, - "src": "2077:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14539, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2077:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2076:12:16" - }, - "returnParameters": { - "id": 14544, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14543, - "name": "liquidity", - "nodeType": "VariableDeclaration", - "scope": 14545, - "src": "2107:14:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14542, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2107:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2106:16:16" - }, - "scope": 14581, - "src": "2063:60:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14554, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "burn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14547, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14554, - "src": "2142:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14546, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2142:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2141:12:16" - }, - "returnParameters": { - "id": 14553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14550, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 14554, - "src": "2172:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14549, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2172:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14552, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 14554, - "src": "2186:12:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14551, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2186:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2171:28:16" - }, - "scope": 14581, - "src": "2128:72:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14565, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "swap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14563, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14556, - "name": "amount0Out", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2219:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14555, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2219:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14558, - "name": "amount1Out", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2236:15:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14557, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2236:4:16", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14560, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2253:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14559, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2253:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14562, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 14565, - "src": "2265:19:16", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 14561, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2265:5:16", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:67:16" - }, - "returnParameters": { - "id": 14564, - "nodeType": "ParameterList", - "parameters": [], - "src": "2294:0:16" - }, - "scope": 14581, - "src": "2205:90:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14570, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "skim", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14568, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14567, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 14570, - "src": "2314:10:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14566, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2314:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2313:12:16" - }, - "returnParameters": { - "id": 14569, - "nodeType": "ParameterList", - "parameters": [], - "src": "2334:0:16" - }, - "scope": 14581, - "src": "2300:35:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14573, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "sync", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14571, - "nodeType": "ParameterList", - "parameters": [], - "src": "2353:2:16" - }, - "returnParameters": { - "id": 14572, - "nodeType": "ParameterList", - "parameters": [], - "src": "2364:0:16" - }, - "scope": 14581, - "src": "2340:25:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 14580, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14578, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14575, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14580, - "src": "2391:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14574, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2391:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14577, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14580, - "src": "2400:7:16", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14576, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2400:7:16", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2390:18:16" - }, - "returnParameters": { - "id": 14579, - "nodeType": "ParameterList", - "parameters": [], - "src": "2417:0:16" - }, - "scope": 14581, - "src": "2371:47:16", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 14582, - "src": "26:2394:16" - } - ], - "src": "0:2421:16" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-09T23:21:18.188Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/UniswapV2OracleLibrary.json b/build/contracts/UniswapV2OracleLibrary.json deleted file mode 100644 index 2096cf3..0000000 --- a/build/contracts/UniswapV2OracleLibrary.json +++ /dev/null @@ -1,3234 +0,0 @@ -{ - "contractName": "UniswapV2OracleLibrary", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol\":\"UniswapV2OracleLibrary\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Babylonian.sol\":{\"keccak256\":\"0xad37a774ad6a438432acb1a475b71b2991a41ba98f1cd814c6d78f9109370a38\",\"urls\":[\"bzz-raw://0f1fbfda71c124ef0436d4e0fe1d0ee9440e2d169ba5ecb890d3d5089ccdd185\",\"dweb:/ipfs/QmXvHC7AfnhNoXEi2tCDRVgHcWuADfHToyCUYZ2tG5Pgen\"]},\"/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol\":{\"keccak256\":\"0x589aacdc69a24cc0500bc13581b34d4431ee972333fa288a9b42a4d14707e003\",\"urls\":[\"bzz-raw://965edb53f5f0d9e23f7878ae95809239b26604420b0111f7b9cb199d21b84afe\",\"dweb:/ipfs/QmYkGQ6xPsNFfdkJr76vGoCehffXspqKyoGZ5utGJoWNuc\"]},\"/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol\":{\"keccak256\":\"0x311645a7312f2ef6eaf48ef2837e7f0cf9310ecb99d6400a1a31021c44e0f027\",\"urls\":[\"bzz-raw://99307e4540dbcf1cbdf07f0e25d063d2cdc97890e92b31b555fef7d114eea4e5\",\"dweb:/ipfs/QmYUoD5sGSUTBZWRbDEBpjfWP1VcGp9m3semMf3oGFQHJt\"]},\"/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol\":{\"keccak256\":\"0x3627b23a33510ccbdf47a9bc92528a78cd58b4ee7732e9a3f2563990ec652da9\",\"urls\":[\"bzz-raw://4d314b46efcc60cca53b1a9f4379d9aeccb744a9911ae5296c17d9cf284b8524\",\"dweb:/ipfs/QmZnSs4mQQw56DKpmnsPfd6PwgMQQHfT8wbyp6smT4pEL5\"]}},\"version\":1}", - "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820216401d67aadab479eab3535746e535d6176332e5d88a9a680ce2dff7894f45064736f6c63430005110032", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820216401d67aadab479eab3535746e535d6176332e5d88a9a680ce2dff7894f45064736f6c63430005110032", - "sourceMap": "177:1841:19:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", - "deployedSourceMap": "177:1841:19:-;;;;;;;;", - "source": "pragma solidity >=0.5.0;\n\nimport './IUniswapV2Pair.sol';\nimport './FixedPoint.sol';\n\n// library with helper methods for oracles that are concerned with computing average prices\nlibrary UniswapV2OracleLibrary {\n using FixedPoint for *;\n\n // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]\n function currentBlockTimestamp() internal view returns (uint32) {\n return uint32(block.timestamp % 2 ** 32);\n }\n\n // produces the cumulative price using counterfactuals to save gas and avoid a call to sync.\n function currentCumulativePrices(\n address pair,\n bool isToken0\n ) internal view returns (uint priceCumulative, uint32 blockTimestamp) {\n blockTimestamp = currentBlockTimestamp();\n (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = UniswapPair(pair).getReserves();\n if (isToken0) {\n priceCumulative = UniswapPair(pair).price0CumulativeLast();\n\n // if time has elapsed since the last update on the pair, mock the accumulated price values\n if (blockTimestampLast != blockTimestamp) {\n // subtraction overflow is desired\n uint32 timeElapsed = blockTimestamp - blockTimestampLast;\n // addition overflow is desired\n // counterfactual\n priceCumulative += uint(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;\n }\n } else {\n priceCumulative = UniswapPair(pair).price1CumulativeLast();\n // if time has elapsed since the last update on the pair, mock the accumulated price values\n if (blockTimestampLast != blockTimestamp) {\n // subtraction overflow is desired\n uint32 timeElapsed = blockTimestamp - blockTimestampLast;\n // addition overflow is desired\n // counterfactual\n priceCumulative += uint(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;\n }\n }\n\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol", - "exportedSymbols": { - "UniswapV2OracleLibrary": [ - 15092 - ] - }, - "id": 15093, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14975, - "literals": [ - "solidity", - ">=", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:24:19" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "file": "./IUniswapV2Pair.sol", - "id": 14976, - "nodeType": "ImportDirective", - "scope": 15093, - "sourceUnit": 14582, - "src": "26:30:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol", - "file": "./FixedPoint.sol", - "id": 14977, - "nodeType": "ImportDirective", - "scope": 15093, - "sourceUnit": 14271, - "src": "57:26:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 15092, - "linearizedBaseContracts": [ - 15092 - ], - "name": "UniswapV2OracleLibrary", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 14979, - "libraryName": { - "contractScope": null, - "id": 14978, - "name": "FixedPoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14270, - "src": "220:10:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_FixedPoint_$14270", - "typeString": "library FixedPoint" - } - }, - "nodeType": "UsingForDirective", - "src": "214:23:19", - "typeName": null - }, - { - "body": { - "id": 14993, - "nodeType": "Block", - "src": "419:57:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14985, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "443:5:19", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 14986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "443:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - }, - "id": 14989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 14987, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "461:1:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 14988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "466:2:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "461:7:19", - "typeDescriptions": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - } - }, - "src": "443:25:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14984, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "436:6:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 14991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "436:33:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "functionReturnParameters": 14983, - "id": 14992, - "nodeType": "Return", - "src": "429:40:19" - } - ] - }, - "documentation": null, - "id": 14994, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "currentBlockTimestamp", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14980, - "nodeType": "ParameterList", - "parameters": [], - "src": "385:2:19" - }, - "returnParameters": { - "id": 14983, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14982, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14994, - "src": "411:6:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 14981, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "411:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "410:8:19" - }, - "scope": 15092, - "src": "355:121:19", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 15090, - "nodeType": "Block", - "src": "731:1285:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15005, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "741:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 15006, - "name": "currentBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14994, - "src": "758:21:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint32_$", - "typeString": "function () view returns (uint32)" - } - }, - "id": 15007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "758:23:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "741:40:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 15009, - "nodeType": "ExpressionStatement", - "src": "741:40:19" - }, - { - "assignments": [ - 15011, - 15013, - 15015 - ], - "declarations": [ - { - "constant": false, - "id": 15011, - "name": "reserve0", - "nodeType": "VariableDeclaration", - "scope": 15090, - "src": "792:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 15010, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "792:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15013, - "name": "reserve1", - "nodeType": "VariableDeclaration", - "scope": 15090, - "src": "810:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 15012, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "810:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15015, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 15090, - "src": "828:25:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15014, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "828:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15021, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15017, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14996, - "src": "869:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15016, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14581, - "src": "857:11:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14581_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "857:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14581", - "typeString": "contract UniswapPair" - } - }, - "id": 15019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 14523, - "src": "857:29:19", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "function () view external returns (uint112,uint112,uint32)" - } - }, - "id": 15020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "857:31:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "tuple(uint112,uint112,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "791:97:19" - }, - { - "condition": { - "argumentTypes": null, - "id": 15022, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14998, - "src": "902:8:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15088, - "nodeType": "Block", - "src": "1464:545:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15056, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "1476:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15058, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14996, - "src": "1506:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15057, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14581, - "src": "1494:11:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14581_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1494:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14581", - "typeString": "contract UniswapPair" - } - }, - "id": 15060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "price1CumulativeLast", - "nodeType": "MemberAccess", - "referencedDeclaration": 14533, - "src": "1494:38:19", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1494:40:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1476:58:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15063, - "nodeType": "ExpressionStatement", - "src": "1476:58:19" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15064, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1652:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 15065, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1674:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1652:36:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15087, - "nodeType": "IfStatement", - "src": "1648:351:19", - "trueBody": { - "id": 15086, - "nodeType": "Block", - "src": "1690:309:19", - "statements": [ - { - "assignments": [ - 15068 - ], - "declarations": [ - { - "constant": false, - "id": 15068, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 15086, - "src": "1755:18:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15067, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1755:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15072, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15069, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1776:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 15070, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1793:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1776:35:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1755:56:19" - }, - { - "expression": { - "argumentTypes": null, - "id": 15084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15073, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "1905:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15077, - "name": "reserve1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15013, - "src": "1949:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - { - "argumentTypes": null, - "id": 15078, - "name": "reserve0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15011, - "src": "1959:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "expression": { - "argumentTypes": null, - "id": 15075, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14270, - "src": "1929:10:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14270_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 15076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "fraction", - "nodeType": "MemberAccess", - "referencedDeclaration": 14192, - "src": "1929:19:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint112_$_t_uint112_$returns$_t_struct$_uq112x112_$14047_memory_ptr_$", - "typeString": "function (uint112,uint112) pure returns (struct FixedPoint.uq112x112 memory)" - } - }, - "id": 15079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1929:39:19", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 15080, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1929:42:19", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 15074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1924:4:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 15081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1924:48:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 15082, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15068, - "src": "1975:11:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1924:62:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1905:81:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15085, - "nodeType": "ExpressionStatement", - "src": "1905:81:19" - } - ] - } - } - ] - }, - "id": 15089, - "nodeType": "IfStatement", - "src": "898:1111:19", - "trueBody": { - "id": 15055, - "nodeType": "Block", - "src": "912:546:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15023, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "924:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15025, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14996, - "src": "954:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15024, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14581, - "src": "942:11:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14581_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "942:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14581", - "typeString": "contract UniswapPair" - } - }, - "id": 15027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "price0CumulativeLast", - "nodeType": "MemberAccess", - "referencedDeclaration": 14528, - "src": "942:38:19", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "942:40:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "924:58:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15030, - "nodeType": "ExpressionStatement", - "src": "924:58:19" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15031, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1101:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 15032, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1123:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1101:36:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15054, - "nodeType": "IfStatement", - "src": "1097:351:19", - "trueBody": { - "id": 15053, - "nodeType": "Block", - "src": "1139:309:19", - "statements": [ - { - "assignments": [ - 15035 - ], - "declarations": [ - { - "constant": false, - "id": 15035, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 15053, - "src": "1204:18:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15034, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1204:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15039, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15036, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1225:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 15037, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1242:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1225:35:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1204:56:19" - }, - { - "expression": { - "argumentTypes": null, - "id": 15051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15040, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "1354:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15044, - "name": "reserve1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15013, - "src": "1398:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - { - "argumentTypes": null, - "id": 15045, - "name": "reserve0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15011, - "src": "1408:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "expression": { - "argumentTypes": null, - "id": 15042, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14270, - "src": "1378:10:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14270_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 15043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "fraction", - "nodeType": "MemberAccess", - "referencedDeclaration": 14192, - "src": "1378:19:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint112_$_t_uint112_$returns$_t_struct$_uq112x112_$14047_memory_ptr_$", - "typeString": "function (uint112,uint112) pure returns (struct FixedPoint.uq112x112 memory)" - } - }, - "id": 15046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1378:39:19", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 15047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1378:42:19", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 15041, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1373:4:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 15048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:48:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 15049, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15035, - "src": "1424:11:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1373:62:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1354:81:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15052, - "nodeType": "ExpressionStatement", - "src": "1354:81:19" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 15091, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "currentCumulativePrices", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14999, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14996, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "621:12:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14995, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "621:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14998, - "name": "isToken0", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "643:13:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14997, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "643:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "611:51:19" - }, - "returnParameters": { - "id": 15004, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15001, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "686:20:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15000, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "686:4:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15003, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "708:21:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15002, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "708:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "685:45:19" - }, - "scope": 15092, - "src": "579:1437:19", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 15093, - "src": "177:1841:19" - } - ], - "src": "0:2019:19" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol", - "exportedSymbols": { - "UniswapV2OracleLibrary": [ - 15092 - ] - }, - "id": 15093, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 14975, - "literals": [ - "solidity", - ">=", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:24:19" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "file": "./IUniswapV2Pair.sol", - "id": 14976, - "nodeType": "ImportDirective", - "scope": 15093, - "sourceUnit": 14582, - "src": "26:30:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol", - "file": "./FixedPoint.sol", - "id": 14977, - "nodeType": "ImportDirective", - "scope": 15093, - "sourceUnit": 14271, - "src": "57:26:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 15092, - "linearizedBaseContracts": [ - 15092 - ], - "name": "UniswapV2OracleLibrary", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 14979, - "libraryName": { - "contractScope": null, - "id": 14978, - "name": "FixedPoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14270, - "src": "220:10:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_FixedPoint_$14270", - "typeString": "library FixedPoint" - } - }, - "nodeType": "UsingForDirective", - "src": "214:23:19", - "typeName": null - }, - { - "body": { - "id": 14993, - "nodeType": "Block", - "src": "419:57:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 14990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 14985, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "443:5:19", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 14986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "443:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - }, - "id": 14989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 14987, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "461:1:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 14988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "466:2:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "461:7:19", - "typeDescriptions": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - } - }, - "src": "443:25:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 14984, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "436:6:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 14991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "436:33:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "functionReturnParameters": 14983, - "id": 14992, - "nodeType": "Return", - "src": "429:40:19" - } - ] - }, - "documentation": null, - "id": 14994, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "currentBlockTimestamp", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14980, - "nodeType": "ParameterList", - "parameters": [], - "src": "385:2:19" - }, - "returnParameters": { - "id": 14983, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14982, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 14994, - "src": "411:6:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 14981, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "411:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "410:8:19" - }, - "scope": 15092, - "src": "355:121:19", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 15090, - "nodeType": "Block", - "src": "731:1285:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15005, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "741:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 15006, - "name": "currentBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14994, - "src": "758:21:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint32_$", - "typeString": "function () view returns (uint32)" - } - }, - "id": 15007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "758:23:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "741:40:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 15009, - "nodeType": "ExpressionStatement", - "src": "741:40:19" - }, - { - "assignments": [ - 15011, - 15013, - 15015 - ], - "declarations": [ - { - "constant": false, - "id": 15011, - "name": "reserve0", - "nodeType": "VariableDeclaration", - "scope": 15090, - "src": "792:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 15010, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "792:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15013, - "name": "reserve1", - "nodeType": "VariableDeclaration", - "scope": 15090, - "src": "810:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - "typeName": { - "id": 15012, - "name": "uint112", - "nodeType": "ElementaryTypeName", - "src": "810:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15015, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 15090, - "src": "828:25:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15014, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "828:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15021, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15017, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14996, - "src": "869:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15016, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14581, - "src": "857:11:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14581_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "857:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14581", - "typeString": "contract UniswapPair" - } - }, - "id": 15019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 14523, - "src": "857:29:19", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "function () view external returns (uint112,uint112,uint32)" - } - }, - "id": 15020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "857:31:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "tuple(uint112,uint112,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "791:97:19" - }, - { - "condition": { - "argumentTypes": null, - "id": 15022, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14998, - "src": "902:8:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15088, - "nodeType": "Block", - "src": "1464:545:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15056, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "1476:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15058, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14996, - "src": "1506:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15057, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14581, - "src": "1494:11:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14581_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1494:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14581", - "typeString": "contract UniswapPair" - } - }, - "id": 15060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "price1CumulativeLast", - "nodeType": "MemberAccess", - "referencedDeclaration": 14533, - "src": "1494:38:19", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1494:40:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1476:58:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15063, - "nodeType": "ExpressionStatement", - "src": "1476:58:19" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15064, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1652:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 15065, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1674:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1652:36:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15087, - "nodeType": "IfStatement", - "src": "1648:351:19", - "trueBody": { - "id": 15086, - "nodeType": "Block", - "src": "1690:309:19", - "statements": [ - { - "assignments": [ - 15068 - ], - "declarations": [ - { - "constant": false, - "id": 15068, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 15086, - "src": "1755:18:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15067, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1755:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15072, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15069, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1776:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 15070, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1793:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1776:35:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1755:56:19" - }, - { - "expression": { - "argumentTypes": null, - "id": 15084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15073, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "1905:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15077, - "name": "reserve1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15013, - "src": "1949:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - { - "argumentTypes": null, - "id": 15078, - "name": "reserve0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15011, - "src": "1959:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "expression": { - "argumentTypes": null, - "id": 15075, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14270, - "src": "1929:10:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14270_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 15076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "fraction", - "nodeType": "MemberAccess", - "referencedDeclaration": 14192, - "src": "1929:19:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint112_$_t_uint112_$returns$_t_struct$_uq112x112_$14047_memory_ptr_$", - "typeString": "function (uint112,uint112) pure returns (struct FixedPoint.uq112x112 memory)" - } - }, - "id": 15079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1929:39:19", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 15080, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1929:42:19", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 15074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1924:4:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 15081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1924:48:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 15082, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15068, - "src": "1975:11:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1924:62:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1905:81:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15085, - "nodeType": "ExpressionStatement", - "src": "1905:81:19" - } - ] - } - } - ] - }, - "id": 15089, - "nodeType": "IfStatement", - "src": "898:1111:19", - "trueBody": { - "id": 15055, - "nodeType": "Block", - "src": "912:546:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15023, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "924:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15025, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14996, - "src": "954:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15024, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14581, - "src": "942:11:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14581_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "942:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14581", - "typeString": "contract UniswapPair" - } - }, - "id": 15027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "price0CumulativeLast", - "nodeType": "MemberAccess", - "referencedDeclaration": 14528, - "src": "942:38:19", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "942:40:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "924:58:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15030, - "nodeType": "ExpressionStatement", - "src": "924:58:19" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15031, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1101:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 15032, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1123:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1101:36:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15054, - "nodeType": "IfStatement", - "src": "1097:351:19", - "trueBody": { - "id": 15053, - "nodeType": "Block", - "src": "1139:309:19", - "statements": [ - { - "assignments": [ - 15035 - ], - "declarations": [ - { - "constant": false, - "id": 15035, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 15053, - "src": "1204:18:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15034, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1204:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15039, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15036, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15003, - "src": "1225:14:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 15037, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15015, - "src": "1242:18:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1225:35:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1204:56:19" - }, - { - "expression": { - "argumentTypes": null, - "id": 15051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15040, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15001, - "src": "1354:15:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15044, - "name": "reserve1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15013, - "src": "1398:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - }, - { - "argumentTypes": null, - "id": 15045, - "name": "reserve0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15011, - "src": "1408:8:19", - "typeDescriptions": { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - }, - { - "typeIdentifier": "t_uint112", - "typeString": "uint112" - } - ], - "expression": { - "argumentTypes": null, - "id": 15042, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14270, - "src": "1378:10:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14270_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 15043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "fraction", - "nodeType": "MemberAccess", - "referencedDeclaration": 14192, - "src": "1378:19:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint112_$_t_uint112_$returns$_t_struct$_uq112x112_$14047_memory_ptr_$", - "typeString": "function (uint112,uint112) pure returns (struct FixedPoint.uq112x112 memory)" - } - }, - "id": 15046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1378:39:19", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14047_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "id": 15047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_x", - "nodeType": "MemberAccess", - "referencedDeclaration": 14046, - "src": "1378:42:19", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "id": 15041, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1373:4:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 15048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:48:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 15049, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15035, - "src": "1424:11:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "1373:62:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1354:81:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15052, - "nodeType": "ExpressionStatement", - "src": "1354:81:19" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 15091, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "currentCumulativePrices", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 14999, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14996, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "621:12:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 14995, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "621:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 14998, - "name": "isToken0", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "643:13:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 14997, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "643:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "611:51:19" - }, - "returnParameters": { - "id": 15004, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15001, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "686:20:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15000, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "686:4:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15003, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 15091, - "src": "708:21:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15002, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "708:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "685:45:19" - }, - "scope": 15092, - "src": "579:1437:19", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 15093, - "src": "177:1841:19" - } - ], - "src": "0:2019:19" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-09T23:21:18.203Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAM.json b/build/contracts/YAM.json deleted file mode 100644 index d1d1aed..0000000 --- a/build/contracts/YAM.json +++ /dev/null @@ -1,21671 +0,0 @@ -{ - "contractName": "YAM", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "BASE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "incentivizer_", - "type": "address" - } - ], - "name": "_setIncentivizer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "incentivizer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "internalDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "indexDelta", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "positive", - "type": "bool" - } - ], - "name": "rebase", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamsScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address", - "name": "initial_owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initSupply_", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldIncentivizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newIncentivizer\",\"type\":\"address\"}],\"name\":\"NewIncentivizer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevYamsScalingFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newYamsScalingFactor\",\"type\":\"uint256\"}],\"name\":\"Rebase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"incentivizer_\",\"type\":\"address\"}],\"name\":\"_setIncentivizer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"incentivizer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"initial_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initSupply_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"internalDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexDelta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"positive\",\"type\":\"bool\"}],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamsScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_setIncentivizer(address)\":{\"params\":{\"incentivizer_\":\"The address of the rebaser contract to use for authentication.\"}},\"_setPendingGov(address)\":{\"params\":{\"pendingGov_\":\"The address of the rebaser contract to use for authentication.\"}},\"_setRebaser(address)\":{\"params\":{\"rebaser_\":\"The address of the rebaser contract to use for authentication.\"}},\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner has allowed to a spender.\",\"params\":{\"owner_\":\"The address which owns the funds.\",\"spender\":\"The address which will spend the funds.\"},\"return\":\"The number of tokens still available for the spender.\"},\"approve(address,uint256)\":{\"details\":\"Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. This method is included for ERC20 compatibility. increaseAllowance and decreaseAllowance should be used instead. Changing an allowance with this method brings the risk that someone may transfer both the old and the new allowance - if they are both greater than zero - if a transfer transaction is mined before the later approve() call is mined.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"}},\"balanceOf(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"The balance of the specified address.\"},\"balanceOfUnderlying(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"The underlying balance of the specified address.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Decrease the amount of tokens that an owner has allowed to a spender.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"subtractedValue\":\"The amount of tokens to decrease the allowance by.\"}},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\",\"expiry\":\"The time at which to expire the signature\",\"nonce\":\"The contract state required to match the signature\",\"r\":\"Half of the ECDSA signature pair\",\"s\":\"Half of the ECDSA signature pair\",\"v\":\"The recovery byte of the signature\"}},\"delegates(address)\":{\"params\":{\"delegator\":\"The address to get delegatee for\"}},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"The address to get votes balance\"},\"return\":\"The number of current votes for `account`\"},\"getPriorVotes(address,uint256)\":{\"details\":\"Block number must be a finalized block or else this function will revert to prevent misinformation.\",\"params\":{\"account\":\"The address of the account to check\",\"blockNumber\":\"The block number to get the vote balance at\"},\"return\":\"The number of votes the account had as of the given block\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.\",\"params\":{\"addedValue\":\"The amount of tokens to increase the allowance by.\",\"spender\":\"The address which will spend the funds.\"}},\"initialize(string,string,uint8,address,uint256)\":{\"params\":{\"decimals_\":\"ERC-20 decimal precision of this token\",\"name_\":\"ERC-20 name of this token\",\"symbol_\":\"ERC-20 symbol of this token\"}},\"mint(address,uint256)\":{\"details\":\"Limited to onlyMinter modifier\"},\"rebase(uint256,uint256,bool)\":{\"details\":\"The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi\"},\"transfer(address,uint256)\":{\"details\":\"Transfer tokens to a specified address.\",\"params\":{\"to\":\"The address to transfer to.\",\"value\":\"The amount to be transferred.\"},\"return\":\"True on success, false otherwise.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfer tokens from one address to another.\",\"params\":{\"from\":\"The address you want to send tokens from.\",\"to\":\"The address you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"}}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"lets msg.sender accept governance \"},\"_setIncentivizer(address)\":{\"notice\":\"sets the incentivizer\"},\"_setPendingGov(address)\":{\"notice\":\"sets the pendingGov\"},\"_setRebaser(address)\":{\"notice\":\"sets the rebaser\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Currently returns the internal storage amount\"},\"delegate(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Delegates votes from signatory to `delegatee`\"},\"delegates(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"getCurrentVotes(address)\":{\"notice\":\"Gets the current votes balance for `account`\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"Determine the prior number of votes for an account as of a block number\"},\"initialize(string,string,uint8,address,uint256)\":{\"notice\":\"Initialize the new money market\"},\"maxScalingFactor()\":{\"notice\":\"Computes the current max scaling factor\"},\"mint(address,uint256)\":{\"notice\":\"Mints new tokens, increasing totalSupply, initSupply, and a users balance.\"},\"rebase(uint256,uint256,bool)\":{\"notice\":\"Initiates a new rebase operation, provided the minimum time period has elapsed.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":\"YAM\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":{\"keccak256\":\"0x37805294539ffc72da1145dce61bffee4437b329f5aee47e4ff3c24b805fb734\",\"urls\":[\"bzz-raw://13ffb729ad13edf89c0c21f4e01d66a58de29fc0741ac1a98b5f24be66f31fbd\",\"dweb:/ipfs/QmUvabJwLsrEYstkwbCB5gF1MPH2HuJvYrf2TDDb44MazA\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612e81806100206000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c80636fc6407c1161017b578063a457c2d7116100d8578063dd62ed3e1161008c578063ec342ad011610071578063ec342ad014610ac0578063f1127ed814610ac8578063fa8f345514610b27576102ad565b8063dd62ed3e14610a7d578063e7a324dc14610ab8576102ad565b8063b4b5ea57116100bd578063b4b5ea57146109ee578063b6fa857614610a21578063c3cda52014610a29576102ad565b8063a457c2d71461097c578063a9059cbb146109b5576102ad565b80637af548c11161012f57806395d89b411161011457806395d89b411461093957806397d63f931461094157806398dca21014610949576102ad565b80637af548c1146108db5780637ecebe0014610906576102ad565b806370a082311161016057806370a082311461083c57806373f03dff1461086f578063782d6fe1146108a2576102ad565b80636fc6407c146107e85780636fcfff45146107f0576102ad565b806325240810116102295780634bda2e20116101dd5780635c19a95c116101c25780635c19a95c1461065c57806364dd48f51461068f5780636c94522114610697576102ad565b80634bda2e2014610621578063587cde1e14610629576102ad565b8063395093511161020e578063395093511461057c5780633af9e669146105b557806340c10f19146105e8576102ad565b80632524081014610556578063313ce5671461055e576102ad565b806312d43a511161028057806318160ddd1161026557806318160ddd1461050357806320606b701461050b57806323b872dd14610513576102ad565b806312d43a51146103c75780631624f6c6146103cf576102ad565b806306fdde03146102b2578063095ea7b31461032f57806311d3e6c41461037c57806311fd8a8314610396575b600080fd5b6102ba610b5a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102f45781810151838201526020016102dc565b50505050905090810190601f1680156103215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103686004803603604081101561034557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c05565b604080519115158252519081900360200190f35b610384610c79565b60408051918252519081900360200190f35b61039e610c89565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e610ca5565b610501600480360360608110156103e557600080fd5b81019060208101813564010000000081111561040057600080fd5b82018360208201111561041257600080fd5b8035906020019184600183028401116401000000008311171561043457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561048757600080fd5b82018360208201111561049957600080fd5b803590602001918460018302840111640100000000831117156104bb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610cc69050565b005b610384610d93565b610384610d99565b6103686004803603606081101561052957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610db4565b61039e610fc6565b610566610fe2565b6040805160ff9092168252519081900360200190f35b6103686004803603604081101561059257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610feb565b610384600480360360208110156105cb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661109e565b610368600480360360408110156105fe57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356110c6565b6105016111ab565b61039e6004803603602081101561063f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112ee565b6105016004803603602081101561067257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611319565b610384611326565b610501600480360360a08110156106ad57600080fd5b8101906020810181356401000000008111156106c857600080fd5b8201836020820111156106da57600080fd5b803590602001918460018302840111640100000000831117156106fc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561074f57600080fd5b82018360208201111561076157600080fd5b8035906020019184600183028401116401000000008311171561078357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff169060400135611334565b61039e61142f565b6108236004803603602081101561080657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661144b565b6040805163ffffffff9092168252519081900360200190f35b6103846004803603602081101561085257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611463565b6105016004803603602081101561088557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114ae565b610384600480360360408110156108b857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561155f565b610384600480360360608110156108f157600080fd5b50803590602081013590604001351515611829565b6103846004803603602081101561091c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611991565b6102ba6119a3565b610384611a19565b6105016004803603602081101561095f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a1f565b6103686004803603604081101561099257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611ad0565b610368600480360360408110156109cb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611bf3565b61038460048036036020811015610a0457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d6a565b610384611e05565b610501600480360360c0811015610a3f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611e0b565b61038460048036036040811015610a9357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166121c2565b6103846121fa565b610384612215565b610b0760048036036040811015610ade57600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16612221565b6040805163ffffffff909316835260208301919091528051918290030190f35b61050160048036036020811015610b3d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661224e565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610bfd5780601f10610bd257610100808354040283529160200191610bfd565b820191906000526020600020905b815481529060010190602001808311610be057829003601f168201915b505050505081565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000610c836122ff565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60085415610d3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251610d48906001906020860190612c3b565b508151610d5c906002906020850190612c3b565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b604051806043612d5782396043019050604051809103902081565b60008273ffffffffffffffffffffffffffffffffffffffff8116610dd757600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415610dfa57600080fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a60209081526040808320338452909152902054610e3b908463ffffffff61233216565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60209081526040808320338452909152812091909155600854610e9c90610e908669d3c21bcecceda100000063ffffffff61237416565b9063ffffffff6123e716565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260096020526040902054909150610ed5908263ffffffff61233216565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600960205260408082209390935590871681522054610f17908263ffffffff61242916565b73ffffffffffffffffffffffffffffffffffffffff80871660008181526009602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a373ffffffffffffffffffffffffffffffffffffffff8087166000908152600c6020526040808220548884168352912054610fba9291821691168361249d565b50600195945050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205461102c908363ffffffff61242916565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331480611106575060065473ffffffffffffffffffffffffffffffffffffffff1633145b8061112d5750600354610100900473ffffffffffffffffffffffffffffffffffffffff1633145b61119857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74206d696e74657200000000000000000000000000000000000000000000604482015290519081900360640190fd5b6111a2838361268f565b50600192915050565b60045473ffffffffffffffffffffffffffffffffffffffff16331461123157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380546004805473ffffffffffffffffffffffffffffffffffffffff8181166101009081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff861617958690557fffffffffffffffffffffffff000000000000000000000000000000000000000090921690925560408051938290048316808552919094049091166020830152825190927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523928290030190a150565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600c60205260409020541690565b61132333826127fa565b50565b69d3c21bcecceda100000081565b600081116113a357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f3020696e697420737570706c7900000000000000000000000000000000000000604482015290519081900360640190fd5b6113ae858585610cc6565b6113d5670de0b6b3a764000069d3c21bcecceda10000005b8391900463ffffffff61237416565b600b556007819055670de0b6b3a764000060088190556113ff9069d3c21bcecceda10000006113c6565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526009602052604090209190915550505050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b60085473ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408120549091610c739169d3c21bcecceda100000091610e90919063ffffffff61237416565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146114d757600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60004382106115b9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612d316026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205463ffffffff16806115f4576000915050610c73565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601811685529252909120541683106116b95773ffffffffffffffffffffffffffffffffffffffff84166000908152600d602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff16835292905220600101549050610c73565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832083805290915290205463ffffffff16831015611701576000915050610c73565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff1611156117e557600282820363ffffffff16048103611751612cb9565b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600d6020908152604080832063ffffffff8086168552908352928190208151808301909252805490931680825260019093015491810191909152908714156117c057602001519450610c739350505050565b805163ffffffff168711156117d7578193506117de565b6001820392505b5050611727565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff9094168352929052206001015491505092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331461185057600080fd5b826118a157600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a15060075461198a565b600854826118df576118d7670de0b6b3a7640000610e906118c8828863ffffffff61233216565b6008549063ffffffff61237416565b600855611929565b6000611900670de0b6b3a7640000610e906118c8828963ffffffff61242916565b905061190a6122ff565b81101561191b576008819055611927565b6119236122ff565b6008555b505b600854600b5461193e9163ffffffff61237416565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610bfd5780601f10610bd257610100808354040283529160200191610bfd565b600b5481565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314611a4857600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896929181900390910190a15050565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054808310611b3e57336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611b80565b611b4e818463ffffffff61233216565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008273ffffffffffffffffffffffffffffffffffffffff8116611c1657600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415611c3957600080fd5b600854600090611c5d90610e908669d3c21bcecceda100000063ffffffff61237416565b33600090815260096020526040902054909150611c80908263ffffffff61233216565b336000908152600960205260408082209290925573ffffffffffffffffffffffffffffffffffffffff871681522054611cbf908263ffffffff61242916565b73ffffffffffffffffffffffffffffffffffffffff86166000818152600960209081526040918290209390935580518781529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3336000908152600c60205260408082205473ffffffffffffffffffffffffffffffffffffffff88811684529190922054611d5f92821691168361249d565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e602052604081205463ffffffff1680611da257600061198a565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101549392505050565b60085481565b60006040518080612d57604391396043019050604051809103902060016040518082805460018160011615610100020316600290048015611e835780601f10611e61576101008083540402835291820191611e83565b820191906000526020600020905b815481529060010190602001808311611e6f575b50509150506040518091039020611e9861289f565b30604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405160208183030381529060405280519060200120905060006040518080612e13603a91396040805191829003603a01822060208084019190915273ffffffffffffffffffffffffffffffffffffffff8c1683830152606083018b905260808084018b90528251808503909101815260a0840183528051908201207f190100000000000000000000000000000000000000000000000000000000000060c085015260c2840187905260e2808501829052835180860390910181526101028501808552815191840191909120600091829052610122860180865281905260ff8c1661014287015261016286018b905261018286018a9052935191965092945091926001926101a280830193927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa158015612036573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166120cd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612d0c6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600f602052604090208054600181019091558914612152576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612ceb6021913960400191505060405180910390fd5b874211156121ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612dbb6025913960400191505060405180910390fd5b6121b5818b6127fa565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60405180603a612e138239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461227757600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161232c57fe5b04905090565b600061198a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506128a3565b60008261238357506000610c73565b8282028284828161239057fe5b041461198a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612d9a6021913960400191505060405180910390fd5b600061198a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612954565b60008282018381101561198a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156124d95750600081115b1561268a5773ffffffffffffffffffffffffffffffffffffffff8316156125b65773ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081205463ffffffff169081612533576000612590565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006125a4828563ffffffff61233216565b90506125b2868484846129d3565b5050505b73ffffffffffffffffffffffffffffffffffffffff82161561268a5773ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604081205463ffffffff16908161260b576000612668565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b9050600061267c828563ffffffff61242916565b90506121ba858484846129d3565b505050565b6007546126a2908263ffffffff61242916565b6007556008546000906126c990610e908469d3c21bcecceda100000063ffffffff61237416565b600b549091506126df908263ffffffff61242916565b600b556126ea6122ff565b600854111561275a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178207363616c696e6720666163746f7220746f6f206c6f77000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054612790908263ffffffff61242916565b73ffffffffffffffffffffffffffffffffffffffff841660008181526009602090815260409182902093909355805191825291810184905281517f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885929181900390910190a1505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600c6020818152604080842080546009845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461289982848361249d565b50505050565b4690565b6000818484111561294c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156129115781810151838201526020016128f9565b50505050905090810190601f16801561293e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836129bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156129115781810151838201526020016128f9565b5060008385816129c957fe5b0495945050505050565b60006129f743604051806060016040528060338152602001612de060339139612bc3565b905060008463ffffffff16118015612a6b575073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15612ad35773ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612b6c565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600d84528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009182161787559251600196870155908152600e9092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612c33576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156129115781810151838201526020016128f9565b509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c7c57805160ff1916838001178555612ca9565b82800160010185558215612ca9579182015b82811115612ca9578251825591602001919060010190612c8e565b50612cb5929150612cd0565b5090565b604080518082019091526000808252602082015290565b610c8691905b80821115612cb55760008155600101612cd656fe59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e636559414d3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726559414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e6564454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7759414d3a3a64656c656761746542795369673a207369676e6174757265206578706972656459414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747344656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a72315820e049ab46d2a1bc251ad7f7fd1a1b2ba7bdd8d5e33a5e1702ce9e93b2a3c5197c64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c80636fc6407c1161017b578063a457c2d7116100d8578063dd62ed3e1161008c578063ec342ad011610071578063ec342ad014610ac0578063f1127ed814610ac8578063fa8f345514610b27576102ad565b8063dd62ed3e14610a7d578063e7a324dc14610ab8576102ad565b8063b4b5ea57116100bd578063b4b5ea57146109ee578063b6fa857614610a21578063c3cda52014610a29576102ad565b8063a457c2d71461097c578063a9059cbb146109b5576102ad565b80637af548c11161012f57806395d89b411161011457806395d89b411461093957806397d63f931461094157806398dca21014610949576102ad565b80637af548c1146108db5780637ecebe0014610906576102ad565b806370a082311161016057806370a082311461083c57806373f03dff1461086f578063782d6fe1146108a2576102ad565b80636fc6407c146107e85780636fcfff45146107f0576102ad565b806325240810116102295780634bda2e20116101dd5780635c19a95c116101c25780635c19a95c1461065c57806364dd48f51461068f5780636c94522114610697576102ad565b80634bda2e2014610621578063587cde1e14610629576102ad565b8063395093511161020e578063395093511461057c5780633af9e669146105b557806340c10f19146105e8576102ad565b80632524081014610556578063313ce5671461055e576102ad565b806312d43a511161028057806318160ddd1161026557806318160ddd1461050357806320606b701461050b57806323b872dd14610513576102ad565b806312d43a51146103c75780631624f6c6146103cf576102ad565b806306fdde03146102b2578063095ea7b31461032f57806311d3e6c41461037c57806311fd8a8314610396575b600080fd5b6102ba610b5a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102f45781810151838201526020016102dc565b50505050905090810190601f1680156103215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103686004803603604081101561034557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c05565b604080519115158252519081900360200190f35b610384610c79565b60408051918252519081900360200190f35b61039e610c89565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e610ca5565b610501600480360360608110156103e557600080fd5b81019060208101813564010000000081111561040057600080fd5b82018360208201111561041257600080fd5b8035906020019184600183028401116401000000008311171561043457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561048757600080fd5b82018360208201111561049957600080fd5b803590602001918460018302840111640100000000831117156104bb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610cc69050565b005b610384610d93565b610384610d99565b6103686004803603606081101561052957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610db4565b61039e610fc6565b610566610fe2565b6040805160ff9092168252519081900360200190f35b6103686004803603604081101561059257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610feb565b610384600480360360208110156105cb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661109e565b610368600480360360408110156105fe57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356110c6565b6105016111ab565b61039e6004803603602081101561063f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112ee565b6105016004803603602081101561067257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611319565b610384611326565b610501600480360360a08110156106ad57600080fd5b8101906020810181356401000000008111156106c857600080fd5b8201836020820111156106da57600080fd5b803590602001918460018302840111640100000000831117156106fc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561074f57600080fd5b82018360208201111561076157600080fd5b8035906020019184600183028401116401000000008311171561078357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff169060400135611334565b61039e61142f565b6108236004803603602081101561080657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661144b565b6040805163ffffffff9092168252519081900360200190f35b6103846004803603602081101561085257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611463565b6105016004803603602081101561088557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114ae565b610384600480360360408110156108b857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561155f565b610384600480360360608110156108f157600080fd5b50803590602081013590604001351515611829565b6103846004803603602081101561091c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611991565b6102ba6119a3565b610384611a19565b6105016004803603602081101561095f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a1f565b6103686004803603604081101561099257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611ad0565b610368600480360360408110156109cb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611bf3565b61038460048036036020811015610a0457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d6a565b610384611e05565b610501600480360360c0811015610a3f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611e0b565b61038460048036036040811015610a9357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166121c2565b6103846121fa565b610384612215565b610b0760048036036040811015610ade57600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16612221565b6040805163ffffffff909316835260208301919091528051918290030190f35b61050160048036036020811015610b3d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661224e565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610bfd5780601f10610bd257610100808354040283529160200191610bfd565b820191906000526020600020905b815481529060010190602001808311610be057829003601f168201915b505050505081565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000610c836122ff565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60085415610d3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251610d48906001906020860190612c3b565b508151610d5c906002906020850190612c3b565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b604051806043612d5782396043019050604051809103902081565b60008273ffffffffffffffffffffffffffffffffffffffff8116610dd757600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415610dfa57600080fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a60209081526040808320338452909152902054610e3b908463ffffffff61233216565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60209081526040808320338452909152812091909155600854610e9c90610e908669d3c21bcecceda100000063ffffffff61237416565b9063ffffffff6123e716565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260096020526040902054909150610ed5908263ffffffff61233216565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600960205260408082209390935590871681522054610f17908263ffffffff61242916565b73ffffffffffffffffffffffffffffffffffffffff80871660008181526009602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a373ffffffffffffffffffffffffffffffffffffffff8087166000908152600c6020526040808220548884168352912054610fba9291821691168361249d565b50600195945050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205461102c908363ffffffff61242916565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331480611106575060065473ffffffffffffffffffffffffffffffffffffffff1633145b8061112d5750600354610100900473ffffffffffffffffffffffffffffffffffffffff1633145b61119857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74206d696e74657200000000000000000000000000000000000000000000604482015290519081900360640190fd5b6111a2838361268f565b50600192915050565b60045473ffffffffffffffffffffffffffffffffffffffff16331461123157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380546004805473ffffffffffffffffffffffffffffffffffffffff8181166101009081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff861617958690557fffffffffffffffffffffffff000000000000000000000000000000000000000090921690925560408051938290048316808552919094049091166020830152825190927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523928290030190a150565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600c60205260409020541690565b61132333826127fa565b50565b69d3c21bcecceda100000081565b600081116113a357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f3020696e697420737570706c7900000000000000000000000000000000000000604482015290519081900360640190fd5b6113ae858585610cc6565b6113d5670de0b6b3a764000069d3c21bcecceda10000005b8391900463ffffffff61237416565b600b556007819055670de0b6b3a764000060088190556113ff9069d3c21bcecceda10000006113c6565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526009602052604090209190915550505050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b60085473ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408120549091610c739169d3c21bcecceda100000091610e90919063ffffffff61237416565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146114d757600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60004382106115b9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612d316026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205463ffffffff16806115f4576000915050610c73565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601811685529252909120541683106116b95773ffffffffffffffffffffffffffffffffffffffff84166000908152600d602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff16835292905220600101549050610c73565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832083805290915290205463ffffffff16831015611701576000915050610c73565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff1611156117e557600282820363ffffffff16048103611751612cb9565b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600d6020908152604080832063ffffffff8086168552908352928190208151808301909252805490931680825260019093015491810191909152908714156117c057602001519450610c739350505050565b805163ffffffff168711156117d7578193506117de565b6001820392505b5050611727565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff9094168352929052206001015491505092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331461185057600080fd5b826118a157600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a15060075461198a565b600854826118df576118d7670de0b6b3a7640000610e906118c8828863ffffffff61233216565b6008549063ffffffff61237416565b600855611929565b6000611900670de0b6b3a7640000610e906118c8828963ffffffff61242916565b905061190a6122ff565b81101561191b576008819055611927565b6119236122ff565b6008555b505b600854600b5461193e9163ffffffff61237416565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610bfd5780601f10610bd257610100808354040283529160200191610bfd565b600b5481565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314611a4857600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896929181900390910190a15050565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054808310611b3e57336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611b80565b611b4e818463ffffffff61233216565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008273ffffffffffffffffffffffffffffffffffffffff8116611c1657600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415611c3957600080fd5b600854600090611c5d90610e908669d3c21bcecceda100000063ffffffff61237416565b33600090815260096020526040902054909150611c80908263ffffffff61233216565b336000908152600960205260408082209290925573ffffffffffffffffffffffffffffffffffffffff871681522054611cbf908263ffffffff61242916565b73ffffffffffffffffffffffffffffffffffffffff86166000818152600960209081526040918290209390935580518781529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3336000908152600c60205260408082205473ffffffffffffffffffffffffffffffffffffffff88811684529190922054611d5f92821691168361249d565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e602052604081205463ffffffff1680611da257600061198a565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101549392505050565b60085481565b60006040518080612d57604391396043019050604051809103902060016040518082805460018160011615610100020316600290048015611e835780601f10611e61576101008083540402835291820191611e83565b820191906000526020600020905b815481529060010190602001808311611e6f575b50509150506040518091039020611e9861289f565b30604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405160208183030381529060405280519060200120905060006040518080612e13603a91396040805191829003603a01822060208084019190915273ffffffffffffffffffffffffffffffffffffffff8c1683830152606083018b905260808084018b90528251808503909101815260a0840183528051908201207f190100000000000000000000000000000000000000000000000000000000000060c085015260c2840187905260e2808501829052835180860390910181526101028501808552815191840191909120600091829052610122860180865281905260ff8c1661014287015261016286018b905261018286018a9052935191965092945091926001926101a280830193927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa158015612036573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166120cd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612d0c6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600f602052604090208054600181019091558914612152576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612ceb6021913960400191505060405180910390fd5b874211156121ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612dbb6025913960400191505060405180910390fd5b6121b5818b6127fa565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60405180603a612e138239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461227757600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161232c57fe5b04905090565b600061198a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506128a3565b60008261238357506000610c73565b8282028284828161239057fe5b041461198a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612d9a6021913960400191505060405180910390fd5b600061198a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612954565b60008282018381101561198a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156124d95750600081115b1561268a5773ffffffffffffffffffffffffffffffffffffffff8316156125b65773ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081205463ffffffff169081612533576000612590565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006125a4828563ffffffff61233216565b90506125b2868484846129d3565b5050505b73ffffffffffffffffffffffffffffffffffffffff82161561268a5773ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604081205463ffffffff16908161260b576000612668565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b9050600061267c828563ffffffff61242916565b90506121ba858484846129d3565b505050565b6007546126a2908263ffffffff61242916565b6007556008546000906126c990610e908469d3c21bcecceda100000063ffffffff61237416565b600b549091506126df908263ffffffff61242916565b600b556126ea6122ff565b600854111561275a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178207363616c696e6720666163746f7220746f6f206c6f77000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054612790908263ffffffff61242916565b73ffffffffffffffffffffffffffffffffffffffff841660008181526009602090815260409182902093909355805191825291810184905281517f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885929181900390910190a1505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600c6020818152604080842080546009845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461289982848361249d565b50505050565b4690565b6000818484111561294c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156129115781810151838201526020016128f9565b50505050905090810190601f16801561293e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836129bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156129115781810151838201526020016128f9565b5060008385816129c957fe5b0495945050505050565b60006129f743604051806060016040528060338152602001612de060339139612bc3565b905060008463ffffffff16118015612a6b575073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15612ad35773ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612b6c565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600d84528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009182161787559251600196870155908152600e9092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612c33576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156129115781810151838201526020016128f9565b509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c7c57805160ff1916838001178555612ca9565b82800160010185558215612ca9579182015b82811115612ca9578251825591602001919060010190612c8e565b50612cb5929150612cd0565b5090565b604080518082019091526000808252602082015290565b610c8691905b80821115612cb55760008155600101612cd656fe59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e636559414d3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726559414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e6564454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7759414d3a3a64656c656761746542795369673a207369676e6174757265206578706972656459414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747344656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a72315820e049ab46d2a1bc251ad7f7fd1a1b2ba7bdd8d5e33a5e1702ce9e93b2a3c5197c64736f6c63430005110032", - "sourceMap": "10442:887:22:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10442:887:22;;;;;;;", - "deployedSourceMap": "10442:887:22:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10442:887:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;330:18:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;330:18:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6006:228:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6006:228:22;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;966:131;;;:::i;:::-;;;;;;;;;;;;;;;;793:22:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;602:18;;;:::i;611:279:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;611:279:22;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;;;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;-1:-1:-1;;;611:279:22;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;611:279:22:i;:::-;;971:26:28;;;:::i;685:122:26:-;;;:::i;3662:652:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3662:652:22;;;;;;;;;;;;;;;;;;:::i;695:25:28:-;;;:::i;516:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6598:337:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6598:337:22;;;;;;;;;:::i;4773:135::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4773:135:22;;;;:::i;1584:160::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1584:160:22;;;;;;;;;:::i;8873:228::-;;;:::i;698:143:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;698:143:25;;;;:::i;979:102::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;979:102:25;;;;:::i;1083:49:28:-;;;:::i;10695:632:22:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;10695:632:22;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;10695:632:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10695:632:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10695:632:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10695:632:22;;;;;;;;-1:-1:-1;10695:632:22;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;10695:632:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10695:632:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10695:632:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10695:632:22;;-1:-1:-1;;;10695:632:22;;;;;-1:-1:-1;;10695:632:22;;;;;;;;;;;:::i;885:27:28:-;;;:::i;566:49:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;566:49:26;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4426:170:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4426:170:22;;;;:::i;8579:223::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8579:223:22;;;;:::i;3500:1216:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3500:1216:25;;;;;;;;;:::i;9478:960:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9478:960:22;;;;;;;;;;;;;;:::i;1093:39:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1093:39:26;;;;:::i;421:20:28:-;;;:::i;1498:25::-;;;:::i;8199:241:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8199:241:22;;;;:::i;7189:502::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7189:502:22;;;;;;;;;:::i;2588:825::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2588:825:22;;;;;;;;;:::i;2830:248:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2830:248:25;;;;:::i;1319:32:28:-;;;:::i;1504:1132:25:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1504:1132:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5207:170:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5207:170:22;;;;;;;;;;;:::i;898:117:26:-;;;:::i;1196:37:28:-;;;:::i;430:70:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;430:70:26;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;7860:196:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7860:196:22;;;;:::i;330:18:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6006:228:22:-;6127:10;6089:4;6109:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;;:46;;;6170:36;;;;;;;6089:4;;6109:38;;6127:10;;6170:36;;;;;;;;-1:-1:-1;6223:4:22;6006:228;;;;;:::o;966:131::-;1041:7;1071:19;:17;:19::i;:::-;1064:26;;966:131;;:::o;793:22:28:-;;;;;;:::o;602:18::-;;;;;;;;;:::o;611:279:22:-;759:17;;:22;751:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;815:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;837:16:22;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;863:8:22;:20;;;;;;;;;;;;;;;-1:-1:-1;;611:279:22:o;971:26:28:-;;;;:::o;685:122:26:-;727:80;;;;;;;;;;;;;;;;;;685:122;:::o;3662:652:22:-;3786:4;3765:2;530:18;;;522:27;;;;;;567:19;;;581:4;567:19;;559:28;;;;;;3874:23;;;;;;;:17;:23;;;;;;;;3898:10;3874:35;;;;;;;;:46;;3914:5;3874:46;:39;:46;:::i;:::-;3836:23;;;;;;;:17;:23;;;;;;;;3860:10;3836:35;;;;;;;:84;;;;4011:17;;3979:50;;:27;:5;1126:6:28;3979:27:22;:9;:27;:::i;:::-;:31;:50;:31;:50;:::i;:::-;4086:18;;;;;;;:12;:18;;;;;;3960:69;;-1:-1:-1;4086:32:22;;3960:69;4086:32;:22;:32;:::i;:::-;4065:18;;;;;;;;:12;:18;;;;;;:53;;;;4147:16;;;;;;;:30;;4168:8;4147:30;:20;:30;:::i;:::-;4128:16;;;;;;;;:12;:16;;;;;;;;;:49;;;;4192:25;;;;;;;4128:16;;4192:25;;;;;;;;;;;;;4243:16;;;;;;;;:10;:16;;;;;;;4261:14;;;;;;;;4228:58;;4243:16;;;;4261:14;4277:8;4228:14;:58::i;:::-;-1:-1:-1;4303:4:22;;3662:652;-1:-1:-1;;;;;3662:652:22:o;695:25:28:-;;;;;;:::o;516:21::-;;;;;;:::o;6598:337:22:-;6787:10;6696:4;6769:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;:54;;6812:10;6769:54;:42;:54;:::i;:::-;6734:10;6716:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;;;;:107;;;6838:69;;;;;;6716:38;;6838:69;;;;;;;;;;;-1:-1:-1;6924:4:22;6598:337;;;;:::o;4773:135::-;4884:17;;4856:7;4884:17;;;:12;:17;;;;;;;4773:135::o;1584:160::-;379:7;;1679:4;;379:7;;365:10;:21;;:51;;-1:-1:-1;404:12:22;;;;390:10;:26;365:51;:72;;;-1:-1:-1;434:3:22;;;;;;;420:10;:17;365:72;357:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1699:17;1705:2;1709:6;1699:5;:17::i;:::-;-1:-1:-1;1733:4:22;1584:160;;;;:::o;8873:228::-;8948:10;;;;8934;:24;8926:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8998:3;;;9017:10;;;8998:3;9017:10;;;8998:3;9011:16;;;;;;;;;;;9037:23;;;;;;;9075:19;;;8998:3;;;;;;9075:19;;;9090:3;;;;;;;9075:19;;;;;;8998:3;;9075:19;;;;;;;;8873:228;:::o;698:143:25:-;813:21;;;;783:7;813:21;;;:10;:21;;;;;;;;698:143::o;979:102::-;1042:32;1052:10;1064:9;1042;:32::i;:::-;979:102;:::o;1083:49:28:-;1126:6;1083:49;:::o;10695:632:22:-;10917:1;10903:11;:15;10895:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10947:43;10964:5;10971:7;10980:9;10947:16;:43::i;:::-;11014:31;1227:6:28;11030::22;:14;11014:11;;11030:14;;11014:31;:15;:31;:::i;:::-;11001:10;:44;11055:11;:25;;;1227:6:28;11090:17:22;:24;;;11154:32;;11170:6;:15;;11154:32;11124:27;;;;;;;;:12;:27;;;;;:62;;;;-1:-1:-1;;;;10695:632:22:o;885:27:28:-;;;;;;:::o;566:49:26:-;;;;;;;;;;;;;;;:::o;4426:170:22:-;4549:17;;4527;;;4499:7;4527:17;;;:12;:17;;;;;;4499:7;;4527:62;;1126:6:28;;4527:40:22;;:17;:40;:21;:40;:::i;8579:223::-;210:3;;;;;;;196:10;:17;188:26;;;;;;8695:10;;;;8715:24;;;;;;;;;;;8754:41;;;8695:10;;;;8754:41;;;;;;;;;;;;;;;;;;;;;;;224:1;8579:223;:::o;3500:1216:25:-;3605:7;3650:12;3636:11;:26;3628:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3738:23;;;3716:19;3738:23;;;:14;:23;;;;;;;;3775:17;3771:56;;3815:1;3808:8;;;;;3771:56;3884:20;;;;;;;:11;:20;;;;;;;;:38;3905:16;;;3884:38;;;;;;;;;:48;;:63;-1:-1:-1;3880:145:25;;3970:20;;;;;;;:11;:20;;;;;;;;3991:16;;;;;3970:38;;;;;;;;4006:1;3970:44;;;-1:-1:-1;3963:51:25;;3880:145;4083:20;;;;;;;:11;:20;;;;;;;;:23;;;;;;;;:33;:23;:33;:47;-1:-1:-1;4079:86:25;;;4153:1;4146:8;;;;;4079:86;4175:12;4216:16;;;4242:418;4257:5;4249:13;;:5;:13;;;4242:418;;;4320:1;4303:13;;;4302:19;;;4294:27;;4362:20;;:::i;:::-;-1:-1:-1;4385:20:25;;;;;;;:11;:20;;;;;;;;:28;;;;;;;;;;;;;4362:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4431:27;;4427:223;;;4485:8;;;;-1:-1:-1;4478:15:25;;-1:-1:-1;;;;4478:15:25;4427:223;4518:12;;:26;;;-1:-1:-1;4514:136:25;;;4572:6;4564:14;;4514:136;;;4634:1;4625:6;:10;4617:18;;4514:136;4242:418;;;;;-1:-1:-1;4676:20:25;;;;;;;:11;:20;;;;;;;;:27;;;;;;;;;;:33;;;;-1:-1:-1;;3500:1216:25;;;;:::o;9478:960:22:-;293:7;;9628;;293;;279:10;:21;271:30;;;;;;9655:15;9651:130;;9703:17;;9689:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9759:11:22;;9752:18;;9651:130;9823:17;;9856:8;9851:425;;9899:53;1227:6:28;9899:43:22;9921:20;1227:6:28;9930:10:22;9921:20;:8;:20;:::i;:::-;9899:17;;;:43;:21;:43;:::i;:53::-;9879:17;:73;9851:425;;;9983:24;10010:53;1227:6:28;10010:43:22;10032:20;1227:6:28;10041:10:22;10032:20;:8;:20;:::i;10010:53::-;9983:80;;10100:19;:17;:19::i;:::-;10081:16;:38;10077:189;;;10139:17;:36;;;10077:189;;;10232:19;:17;:19::i;:::-;10212:17;:39;10077:189;9851:425;;10315:17;;10300:10;;:33;;;:14;:33;:::i;:::-;10286:11;:47;10385:17;;10348:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;10420:11:22;;311:1;9478:960;;;;;:::o;1093:39:26:-;;;;;;;;;;;;;:::o;421:20:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1498:25;;;;:::o;8199:241:22:-;210:3;;;;;;;196:10;:17;188:26;;;;;;8321:12;;;;8343:28;;;;;;;;;;;8386:47;;;8321:12;;;;8386:47;;;;;;;;;;;;;;;;;;;;;;;224:1;8199:241;:::o;7189:502::-;7349:10;7292:4;7331:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;7383:27;;;7379:201;;7444:10;7467:1;7426:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;:42;7379:201;;;7540:29;:8;7553:15;7540:29;:12;:29;:::i;:::-;7517:10;7499:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;:70;7379:201;7603:10;7624:29;;;;:17;:29;;;;;;;;7594:69;;;7624:38;;;;;;;;;;;7594:69;;;;;;;;;7603:10;7594:69;;;;;;;;;;;-1:-1:-1;7680:4:22;;7189:502;-1:-1:-1;;;7189:502:22:o;2588:825::-;2694:4;2673:2;530:18;;;522:27;;;;;;567:19;;;581:4;567:19;;559:28;;;;;;3034:17;;2983:16;;3002:50;;:27;:5;1126:6:28;3002:27:22;:9;:27;:::i;:50::-;3141:10;3128:24;;;;:12;:24;;;;;;2983:69;;-1:-1:-1;3128:38:22;;2983:69;3128:38;:28;:38;:::i;:::-;3114:10;3101:24;;;;:12;:24;;;;;;:65;;;;:24;3234:16;;;;;;:30;;3255:8;3234:30;:20;:30;:::i;:::-;3215:16;;;;;;;:12;:16;;;;;;;;;:49;;;;3279:31;;;;;;;3215:16;;3288:10;;3279:31;;;;;;;;;;3347:10;3336:22;;;;:10;:22;;;;;;;;3360:14;;;;;;;;;;3321:64;;3336:22;;;3360:14;3376:8;3321:14;:64::i;:::-;-1:-1:-1;3402:4:22;;2588:825;-1:-1:-1;;;;2588:825:22:o;2830:248:25:-;2964:23;;;2919:7;2964:23;;;:14;:23;;;;;;;;3004:16;:67;;3070:1;3004:67;;;3023:20;;;;;;;:11;:20;;;;;;;;:38;3044:16;;;3023:38;;;;;;;;3059:1;3023:44;;2997:74;2830:248;-1:-1:-1;;;2830:248:25:o;1319:32:28:-;;;;:::o;1504:1132:25:-;1687:23;727:80:26;;;;;;;;;;;;;;;;;;;1813:4:25;1797:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1837:12;:10;:12::i;:::-;1875:4;1736:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;1736:158:25;;;1713:191;;;;;;1687:217;;1915:18;944:71:26;;;;;;;;;;;;;;;;;;;1959:135:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1959:135:25;;;;;1936:168;;;;;;2155:119;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2155:119:25;;;;;;2132:152;;;;;;;;;-1:-1:-1;2315:26:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1936:168;;-1:-1:-1;2132:152:25;;-1:-1:-1;;;2315:26:25;;;;;;;1959:135;-1:-1:-1;2315:26:25;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2315:26:25;;;;;;-1:-1:-1;;2359:23:25;;;2351:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2451:17;;;;;;;:6;:17;;;;;:19;;;;;;;;2442:28;;2434:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2533:6;2526:3;:13;;2518:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2598:31;2608:9;2619;2598;:31::i;:::-;2591:38;;;;1504:1132;;;;;;;:::o;5207:170:22:-;5336:25;;;;5306:7;5336:25;;;:17;:25;;;;;;;;:34;;;;;;;;;;;;;5207:170::o;898:117:26:-;944:71;;;;;;;;;;;;;;;;;;898:117;:::o;1196:37:28:-;1227:6;1196:37;:::o;430:70:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7860:196:22:-;210:3;;;;;;;196:10;:17;188:26;;;;;;7967:7;;;;7984:18;;;;;;;;;;;8017:32;;;7967:7;;;;8017:32;;;;;;;;;;;;;;;;;;;;;;;224:1;7860:196;:::o;1103:329::-;1179:7;1415:10;;1409:2;1401:24;;;;;;1394:31;;1103:329;:::o;1322:134:18:-;1380:7;1406:43;1410:1;1413;1406:43;;;;;;;;;;;;;;;;;:3;:43::i;2181:459::-;2239:7;2480:6;2476:45;;-1:-1:-1;2509:1:18;2502:8;;2476:45;2543:5;;;2547:1;2543;:5;:1;2566:5;;;;;:10;2558:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3102:130;3160:7;3186:39;3190:1;3193;3186:39;;;;;;;;;;;;;;;;;:3;:39::i;875:176::-;933:7;964:5;;;987:6;;;;979:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5158:929:25;5263:6;5253:16;;:6;:16;;;;:30;;;;;5282:1;5273:6;:10;5253:30;5249:832;;;5303:20;;;;5299:379;;5409:22;;;5390:16;5409:22;;;:14;:22;;;;;;;;;5469:13;:60;;5528:1;5469:60;;;5485:19;;;;;;;:11;:19;;;;;;;;:34;5505:13;;;5485:34;;;;;;;;5517:1;5485:40;;5469:60;5449:80;-1:-1:-1;5547:17:25;5567:21;5449:80;5581:6;5567:21;:13;:21;:::i;:::-;5547:41;;5606:57;5623:6;5631:9;5642;5653;5606:16;:57::i;:::-;5299:379;;;;5696:20;;;;5692:379;;5802:22;;;5783:16;5802:22;;;:14;:22;;;;;;;;;5862:13;:60;;5921:1;5862:60;;;5878:19;;;;;;;:11;:19;;;;;;;;:34;5898:13;;;5878:34;;;;;;;;5910:1;5878:40;;5862:60;5842:80;-1:-1:-1;5940:17:25;5960:21;5842:80;5974:6;5960:21;:13;:21;:::i;:::-;5940:41;;5999:57;6016:6;6024:9;6035;6046;5999:16;:57::i;5692:379::-;5158:929;;;:::o;1750:590:22:-;1866:11;;:23;;1882:6;1866:23;:15;:23;:::i;:::-;1852:11;:37;1980:17;;1928:16;;1947:51;;:28;:6;1126::28;1947:28:22;:10;:28;:::i;:51::-;2049:10;;1928:70;;-1:-1:-1;2049:24:22;;1928:70;2049:24;:14;:24;:::i;:::-;2036:10;:37;2175:19;:17;:19::i;:::-;2154:17;;:40;;2146:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2274:16;;;;;;;:12;:16;;;;;;:30;;2295:8;2274:30;:20;:30;:::i;:::-;2255:16;;;;;;;:12;:16;;;;;;;;;:49;;;;2317:16;;;;;;;;;;;;;;;;;;;;;;;;1750:590;;;:::o;4722:430:25:-;4836:21;;;;4810:23;4836:21;;;:10;:21;;;;;;;;;;4894:12;:23;;;;;;4971:21;;;;:33;;;;;;;;;;;5020:54;;4836:21;;;;;4894:23;;4971:33;;4836:21;;;5020:54;;4810:23;5020:54;5085:60;5100:15;5117:9;5128:16;5085:14;:60::i;:::-;4722:430;;;;:::o;6948:149::-;7056:9;6948:149;:::o;1747:187:18:-;1833:7;1868:12;1860:6;;;;1852:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1852:29:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1903:5:18;;;1747:187::o;3714:272::-;3800:7;3834:12;3827:5;3819:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3819:28:18;;3857:9;3873:1;3869;:5;;;;;;;3714:272;-1:-1:-1;;;;;3714:272:18:o;6093:685:25:-;6264:18;6285:75;6292:12;6285:75;;;;;;;;;;;;;;;;;:6;:75::i;:::-;6264:96;;6390:1;6375:12;:16;;;:85;;;;-1:-1:-1;6395:22:25;;;;;;;:11;:22;;;;;;;;:65;6418:16;;;6395:40;;;;;;;;;:50;:65;;;:50;;:65;6375:85;6371:334;;;6476:22;;;;;;;:11;:22;;;;;;;;:40;6499:16;;;6476:40;;;;;;;;6514:1;6476:46;:57;;;6371:334;;;6603:33;;;;;;;;;;;;;;;;;;;;;6564:22;;;-1:-1:-1;6564:22:25;;;:11;:22;;;;;:36;;;;;;;;;;:72;;;;;;;;;;;;;;;;;;;;;6650:25;;;:14;:25;;;;;;:44;;6678:16;;;6650:44;;;;;;;;;;6371:334;6720:51;;;;;;;;;;;;;;;;;;;;;;;;;;6093:685;;;;;:::o;6784:158::-;6859:6;6896:12;6889:5;6885:9;;6877:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6877:32:25;-1:-1:-1;6933:1:25;;6784:158;-1:-1:-1;;6784:158:25:o;10442:887:22:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10442:887:22;;;-1:-1:-1;10442:887:22;:::i;:::-;;;:::o;:::-;;;;;;;;;;-1:-1:-1;10442:887:22;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;", - "source": "pragma solidity 0.5.17;\n\n/* import \"./YAMTokenInterface.sol\"; */\nimport \"./YAMGovernance.sol\";\n\ncontract YAMToken is YAMGovernanceToken {\n // Modifiers\n modifier onlyGov() {\n require(msg.sender == gov);\n _;\n }\n\n modifier onlyRebaser() {\n require(msg.sender == rebaser);\n _;\n }\n\n modifier onlyMinter() {\n require(msg.sender == rebaser || msg.sender == incentivizer || msg.sender == gov, \"not minter\");\n _;\n }\n\n modifier validRecipient(address to) {\n require(to != address(0x0));\n require(to != address(this));\n _;\n }\n\n function initialize(\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n )\n public\n {\n require(yamsScalingFactor == 0, \"already initialized\");\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n }\n\n\n /**\n * @notice Computes the current max scaling factor\n */\n function maxScalingFactor()\n external\n view\n returns (uint256)\n {\n return _maxScalingFactor();\n }\n\n function _maxScalingFactor()\n internal\n view\n returns (uint256)\n {\n // scaling factor can only go up to 2**256-1 = initSupply * yamsScalingFactor\n // this is used to check if yamsScalingFactor will be too high to compute balances when rebasing.\n return uint256(-1) / initSupply;\n }\n\n /**\n * @notice Mints new tokens, increasing totalSupply, initSupply, and a users balance.\n * @dev Limited to onlyMinter modifier\n */\n function mint(address to, uint256 amount)\n external\n onlyMinter\n returns (bool)\n {\n _mint(to, amount);\n return true;\n }\n\n function _mint(address to, uint256 amount)\n internal\n {\n // increase totalSupply\n totalSupply = totalSupply.add(amount);\n\n // get underlying value\n uint256 yamValue = amount.mul(internalDecimals).div(yamsScalingFactor);\n\n // increase initSupply\n initSupply = initSupply.add(yamValue);\n\n // make sure the mint didnt push maxScalingFactor too low\n require(yamsScalingFactor <= _maxScalingFactor(), \"max scaling factor too low\");\n\n // add balance\n _yamBalances[to] = _yamBalances[to].add(yamValue);\n emit Mint(to, amount);\n }\n\n /* - ERC20 functionality - */\n\n /**\n * @dev Transfer tokens to a specified address.\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return True on success, false otherwise.\n */\n function transfer(address to, uint256 value)\n external\n validRecipient(to)\n returns (bool)\n {\n // underlying balance is stored in yams, so divide by current scaling factor\n\n // note, this means as scaling factor grows, dust will be untransferrable.\n // minimum transfer value == yamsScalingFactor / 1e24;\n\n // get amount in underlying\n uint256 yamValue = value.mul(internalDecimals).div(yamsScalingFactor);\n\n // sub from balance of sender\n _yamBalances[msg.sender] = _yamBalances[msg.sender].sub(yamValue);\n\n // add to balance of receiver\n _yamBalances[to] = _yamBalances[to].add(yamValue);\n emit Transfer(msg.sender, to, value);\n\n _moveDelegates(_delegates[msg.sender], _delegates[to], yamValue);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another.\n * @param from The address you want to send tokens from.\n * @param to The address you want to transfer to.\n * @param value The amount of tokens to be transferred.\n */\n function transferFrom(address from, address to, uint256 value)\n external\n validRecipient(to)\n returns (bool)\n {\n // decrease allowance\n _allowedFragments[from][msg.sender] = _allowedFragments[from][msg.sender].sub(value);\n\n // get value in yams\n uint256 yamValue = value.mul(internalDecimals).div(yamsScalingFactor);\n\n // sub from from\n _yamBalances[from] = _yamBalances[from].sub(yamValue);\n _yamBalances[to] = _yamBalances[to].add(yamValue);\n emit Transfer(from, to, value);\n\n _moveDelegates(_delegates[from], _delegates[to], yamValue);\n return true;\n }\n\n /**\n * @param who The address to query.\n * @return The balance of the specified address.\n */\n function balanceOf(address who)\n external\n view\n returns (uint256)\n {\n return _yamBalances[who].mul(yamsScalingFactor).div(internalDecimals);\n }\n\n /** @notice Currently returns the internal storage amount\n * @param who The address to query.\n * @return The underlying balance of the specified address.\n */\n function balanceOfUnderlying(address who)\n external\n view\n returns (uint256)\n {\n return _yamBalances[who];\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner has allowed to a spender.\n * @param owner_ The address which owns the funds.\n * @param spender The address which will spend the funds.\n * @return The number of tokens still available for the spender.\n */\n function allowance(address owner_, address spender)\n external\n view\n returns (uint256)\n {\n return _allowedFragments[owner_][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of\n * msg.sender. This method is included for ERC20 compatibility.\n * increaseAllowance and decreaseAllowance should be used instead.\n * Changing an allowance with this method brings the risk that someone may transfer both\n * the old and the new allowance - if they are both greater than zero - if a transfer\n * transaction is mined before the later approve() call is mined.\n *\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n */\n function approve(address spender, uint256 value)\n external\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Increase the amount of tokens that an owner has allowed to a spender.\n * This method should be used instead of approve() to avoid the double approval vulnerability\n * described above.\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseAllowance(address spender, uint256 addedValue)\n external\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] =\n _allowedFragments[msg.sender][spender].add(addedValue);\n emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner has allowed to a spender.\n *\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue)\n external\n returns (bool)\n {\n uint256 oldValue = _allowedFragments[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _allowedFragments[msg.sender][spender] = 0;\n } else {\n _allowedFragments[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]);\n return true;\n }\n\n /* - Governance Functions - */\n\n /** @notice sets the rebaser\n * @param rebaser_ The address of the rebaser contract to use for authentication.\n */\n function _setRebaser(address rebaser_)\n external\n onlyGov\n {\n address oldRebaser = rebaser;\n rebaser = rebaser_;\n emit NewRebaser(oldRebaser, rebaser_);\n }\n\n /** @notice sets the incentivizer\n * @param incentivizer_ The address of the rebaser contract to use for authentication.\n */\n function _setIncentivizer(address incentivizer_)\n external\n onlyGov\n {\n address oldIncentivizer = incentivizer;\n incentivizer = incentivizer_;\n emit NewIncentivizer(oldIncentivizer, incentivizer_);\n }\n\n /** @notice sets the pendingGov\n * @param pendingGov_ The address of the rebaser contract to use for authentication.\n */\n function _setPendingGov(address pendingGov_)\n external\n onlyGov\n {\n address oldPendingGov = pendingGov;\n pendingGov = pendingGov_;\n emit NewPendingGov(oldPendingGov, pendingGov_);\n }\n\n /** @notice lets msg.sender accept governance\n *\n */\n function _acceptGov()\n external\n {\n require(msg.sender == pendingGov, \"!pending\");\n address oldGov = gov;\n gov = pendingGov;\n pendingGov = address(0);\n emit NewGov(oldGov, gov);\n }\n\n /* - Extras - */\n\n /**\n * @notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n *\n * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag\n * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n * and targetRate is CpiOracleRate / baseCpi\n */\n function rebase(\n uint256 epoch,\n uint256 indexDelta,\n bool positive\n )\n external\n onlyRebaser\n returns (uint256)\n {\n if (indexDelta == 0) {\n emit Rebase(epoch, yamsScalingFactor, yamsScalingFactor);\n return totalSupply;\n }\n\n uint256 prevYamsScalingFactor = yamsScalingFactor;\n\n if (!positive) {\n yamsScalingFactor = yamsScalingFactor.mul(BASE.sub(indexDelta)).div(BASE);\n } else {\n uint256 newScalingFactor = yamsScalingFactor.mul(BASE.add(indexDelta)).div(BASE);\n if (newScalingFactor < _maxScalingFactor()) {\n yamsScalingFactor = newScalingFactor;\n } else {\n yamsScalingFactor = _maxScalingFactor();\n }\n }\n\n totalSupply = initSupply.mul(yamsScalingFactor);\n emit Rebase(epoch, prevYamsScalingFactor, yamsScalingFactor);\n return totalSupply;\n }\n}\n\ncontract YAM is YAMToken {\n /**\n * @notice Initialize the new money market\n * @param name_ ERC-20 name of this token\n * @param symbol_ ERC-20 symbol of this token\n * @param decimals_ ERC-20 decimal precision of this token\n */\n function initialize(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address initial_owner,\n uint256 initSupply_\n )\n public\n {\n require(initSupply_ > 0, \"0 init supply\");\n\n super.initialize(name_, symbol_, decimals_);\n\n initSupply = initSupply_.mul(10**24/ (BASE));\n totalSupply = initSupply_;\n yamsScalingFactor = BASE;\n _yamBalances[initial_owner] = initSupply_.mul(10**24 / (BASE));\n\n // owner renounces ownership after deployment as they need to set\n // rebaser and incentivizer\n // gov = gov_;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "exportedSymbols": { - "YAM": [ - 17828 - ], - "YAMToken": [ - 17762 - ] - }, - "id": 17829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17055, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:22" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol", - "file": "./YAMGovernance.sol", - "id": 17056, - "nodeType": "ImportDirective", - "scope": 17829, - "sourceUnit": 18931, - "src": "65:29:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17057, - "name": "YAMGovernanceToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18930, - "src": "117:18:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - }, - "id": 17058, - "nodeType": "InheritanceSpecifier", - "src": "117:18:22" - } - ], - "contractDependencies": [ - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17762, - "linearizedBaseContracts": [ - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17068, - "nodeType": "Block", - "src": "178:54:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17061, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "196:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "196:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17063, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "210:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "196:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "188:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "188:26:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17066, - "nodeType": "ExpressionStatement", - "src": "188:26:22" - }, - { - "id": 17067, - "nodeType": "PlaceholderStatement", - "src": "224:1:22" - } - ] - }, - "documentation": null, - "id": 17069, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17059, - "nodeType": "ParameterList", - "parameters": [], - "src": "175:2:22" - }, - "src": "159:73:22", - "visibility": "internal" - }, - { - "body": { - "id": 17079, - "nodeType": "Block", - "src": "261:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17072, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "279:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "279:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17074, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "293:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "279:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17071, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "271:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "271:30:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17077, - "nodeType": "ExpressionStatement", - "src": "271:30:22" - }, - { - "id": 17078, - "nodeType": "PlaceholderStatement", - "src": "311:1:22" - } - ] - }, - "documentation": null, - "id": 17080, - "name": "onlyRebaser", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17070, - "nodeType": "ParameterList", - "parameters": [], - "src": "258:2:22" - }, - "src": "238:81:22", - "visibility": "internal" - }, - { - "body": { - "id": 17101, - "nodeType": "Block", - "src": "347:123:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17083, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "365:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "365:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17085, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "379:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "365:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17087, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "390:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "390:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17089, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "404:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "390:26:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:51:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17092, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "420:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "420:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17094, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "434:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "420:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:72:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74206d696e746572", - "id": 17097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "439:12:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - }, - "value": "not minter" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - } - ], - "id": 17082, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "357:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "357:95:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17099, - "nodeType": "ExpressionStatement", - "src": "357:95:22" - }, - { - "id": 17100, - "nodeType": "PlaceholderStatement", - "src": "462:1:22" - } - ] - }, - "documentation": null, - "id": 17102, - "name": "onlyMinter", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17081, - "nodeType": "ParameterList", - "parameters": [], - "src": "344:2:22" - }, - "src": "325:145:22", - "visibility": "internal" - }, - { - "body": { - "id": 17123, - "nodeType": "Block", - "src": "512:93:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17107, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "530:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 17109, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "544:3:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 17108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "536:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "536:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "530:18:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "522:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "522:27:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17113, - "nodeType": "ExpressionStatement", - "src": "522:27:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17115, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "567:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17117, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19338, - "src": "581:4:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - ], - "id": 17116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "573:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "573:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "567:19:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "559:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "559:28:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17121, - "nodeType": "ExpressionStatement", - "src": "559:28:22" - }, - { - "id": 17122, - "nodeType": "PlaceholderStatement", - "src": "597:1:22" - } - ] - }, - "documentation": null, - "id": 17124, - "name": "validRecipient", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17104, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17124, - "src": "500:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17103, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "500:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "499:12:22" - }, - "src": "476:129:22", - "visibility": "internal" - }, - { - "body": { - "id": 17152, - "nodeType": "Block", - "src": "741:149:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17134, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "759:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "780:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "759:22:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 17137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "783:21:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 17133, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "751:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "751:54:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17139, - "nodeType": "ExpressionStatement", - "src": "751:54:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17140, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19212, - "src": "815:4:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17141, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17126, - "src": "822:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "815:12:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17143, - "nodeType": "ExpressionStatement", - "src": "815:12:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17144, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19214, - "src": "837:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17145, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17128, - "src": "846:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "837:16:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17147, - "nodeType": "ExpressionStatement", - "src": "837:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17148, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19216, - "src": "863:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17149, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17130, - "src": "874:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "863:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 17151, - "nodeType": "ExpressionStatement", - "src": "863:20:22" - } - ] - }, - "documentation": null, - "id": 17153, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17126, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "640:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17125, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "640:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17128, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "669:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17127, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "669:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17130, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "700:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17129, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "700:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "630:91:22" - }, - "returnParameters": { - "id": 17132, - "nodeType": "ParameterList", - "parameters": [], - "src": "741:0:22" - }, - "scope": 17762, - "src": "611:279:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17161, - "nodeType": "Block", - "src": "1054:43:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17158, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "1071:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1071:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17157, - "id": 17160, - "nodeType": "Return", - "src": "1064:26:22" - } - ] - }, - "documentation": "@notice Computes the current max scaling factor", - "id": 17162, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17154, - "nodeType": "ParameterList", - "parameters": [], - "src": "991:2:22" - }, - "returnParameters": { - "id": 17157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17162, - "src": "1041:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1041:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1040:9:22" - }, - "scope": 17762, - "src": "966:131:22", - "stateMutability": "view", - "superFunction": 19120, - "visibility": "external" - }, - { - "body": { - "id": 17174, - "nodeType": "Block", - "src": "1192:240:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1409:2:22", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 17168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1410:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 17167, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1401:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 17170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1401:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 17171, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "1415:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1401:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17166, - "id": 17173, - "nodeType": "Return", - "src": "1394:31:22" - } - ] - }, - "documentation": null, - "id": 17175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17163, - "nodeType": "ParameterList", - "parameters": [], - "src": "1129:2:22" - }, - "returnParameters": { - "id": 17166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17165, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17175, - "src": "1179:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1179:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1178:9:22" - }, - "scope": 17762, - "src": "1103:329:22", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17193, - "nodeType": "Block", - "src": "1689:55:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17187, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17177, - "src": "1705:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17188, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17179, - "src": "1709:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17186, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17250, - "src": "1699:5:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1699:17:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17190, - "nodeType": "ExpressionStatement", - "src": "1699:17:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1733:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17185, - "id": 17192, - "nodeType": "Return", - "src": "1726:11:22" - } - ] - }, - "documentation": "@notice Mints new tokens, increasing totalSupply, initSupply, and a users balance.\n@dev Limited to onlyMinter modifier", - "id": 17194, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17182, - "modifierName": { - "argumentTypes": null, - "id": 17181, - "name": "onlyMinter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17102, - "src": "1651:10:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1651:10:22" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17177, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1598:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1598:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17179, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1610:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17178, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1610:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1597:28:22" - }, - "returnParameters": { - "id": 17185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17184, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1679:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17183, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1679:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1678:6:22" - }, - "scope": 17762, - "src": "1584:160:22", - "stateMutability": "nonpayable", - "superFunction": 19172, - "visibility": "external" - }, - { - "body": { - "id": 17249, - "nodeType": "Block", - "src": "1814:526:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17201, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1852:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17204, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1882:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17202, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1866:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "1866:15:22", - "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": 17205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1866:23:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1852:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17207, - "nodeType": "ExpressionStatement", - "src": "1852:37:22" - }, - { - "assignments": [ - 17209 - ], - "declarations": [ - { - "constant": false, - "id": 17209, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17249, - "src": "1928:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17208, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1928:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17217, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17215, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "1980:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17212, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "1958:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17210, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1947:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1947:10:22", - "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": 17213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:28:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1947:32:22", - "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": 17216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:51:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1928:70:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17218, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2036:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17221, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2064:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17219, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2049:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2049:14:22", - "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": 17222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2049:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2036:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17224, - "nodeType": "ExpressionStatement", - "src": "2036:37:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17226, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "2154:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17227, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "2175:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2175:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2154:40:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d6178207363616c696e6720666163746f7220746f6f206c6f77", - "id": 17230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2196:28:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - }, - "value": "max scaling factor too low" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - } - ], - "id": 17225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2146:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2146:79:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17232, - "nodeType": "ExpressionStatement", - "src": "2146:79:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17233, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2255:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17235, - "indexExpression": { - "argumentTypes": null, - "id": 17234, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2268:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2255:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17240, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2295:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17236, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2274:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17238, - "indexExpression": { - "argumentTypes": null, - "id": 17237, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2287:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2274:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2274:20:22", - "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": 17241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2274:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2255:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17243, - "nodeType": "ExpressionStatement", - "src": "2255:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17245, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2322:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17246, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "2326:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17244, - "name": "Mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19045, - "src": "2317:4:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2317:16:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17248, - "nodeType": "EmitStatement", - "src": "2312:21:22" - } - ] - }, - "documentation": null, - "id": 17250, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17196, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1765:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1765:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17198, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1777:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1777:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1764:28:22" - }, - "returnParameters": { - "id": 17200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1814:0:22" - }, - "scope": 17762, - "src": "1750:590:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17316, - "nodeType": "Block", - "src": "2704:709:22", - "statements": [ - { - "assignments": [ - 17263 - ], - "declarations": [ - { - "constant": false, - "id": 17263, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17316, - "src": "2983:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17271, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17269, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "3034:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17266, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3012:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17264, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3002:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3002:9:22", - "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": 17267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3002:31:22", - "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": 17270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2983:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17272, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3101:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17275, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17273, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3114:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3114:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3101:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17281, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3157:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17276, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17279, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17277, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3141:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3141:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3128:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3128:28:22", - "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": 17282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3128:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3101:65:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17284, - "nodeType": "ExpressionStatement", - "src": "3101:65:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17285, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3215:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17287, - "indexExpression": { - "argumentTypes": null, - "id": 17286, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3228:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3215:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17292, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3255:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17288, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3234:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17290, - "indexExpression": { - "argumentTypes": null, - "id": 17289, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3247:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3234:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "3234:20:22", - "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": 17293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3234:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3215:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17295, - "nodeType": "ExpressionStatement", - "src": "3215:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17297, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3288:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3288:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17299, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3300:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17300, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3304:5:22", - "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" - } - ], - "id": 17296, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "3279:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3279:31:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17302, - "nodeType": "EmitStatement", - "src": "3274:36:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17304, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3336:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17307, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17305, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3347:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3347:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3336:22:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17308, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3360:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17310, - "indexExpression": { - "argumentTypes": null, - "id": 17309, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3371:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3360:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17311, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3376:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17303, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "3321:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3321:64:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17313, - "nodeType": "ExpressionStatement", - "src": "3321:64:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17261, - "id": 17315, - "nodeType": "Return", - "src": "3395:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens to a specified address.\n@param to The address to transfer to.\n@param value The amount to be transferred.\n@return True on success, false otherwise.", - "id": 17317, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "2673:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17258, - "modifierName": { - "argumentTypes": null, - "id": 17256, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "2658:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2658:18:22" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17252, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2606:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2606:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17254, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2618:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2618:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2605:27:22" - }, - "returnParameters": { - "id": 17261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17260, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2694:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17259, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2694:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2693:6:22" - }, - "scope": 17762, - "src": "2588:825:22", - "stateMutability": "nonpayable", - "superFunction": 19054, - "visibility": "external" - }, - { - "body": { - "id": 17398, - "nodeType": "Block", - "src": "3796:518:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17331, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3836:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17335, - "indexExpression": { - "argumentTypes": null, - "id": 17332, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3854:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3836:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17336, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17333, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3860:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3860:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3836:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17344, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3914:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17337, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3874:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17339, - "indexExpression": { - "argumentTypes": null, - "id": 17338, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3892:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17342, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17340, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3898:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3898:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3874:39:22", - "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": 17345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3874:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3836:84:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17347, - "nodeType": "ExpressionStatement", - "src": "3836:84:22" - }, - { - "assignments": [ - 17349 - ], - "declarations": [ - { - "constant": false, - "id": 17349, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17398, - "src": "3960:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17348, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3960:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17357, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17355, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4011:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17352, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3989:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17350, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3979:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3979:9:22", - "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": 17353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3979:31:22", - "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": 17356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3960:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17358, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4065:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17360, - "indexExpression": { - "argumentTypes": null, - "id": 17359, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4078:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4065:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17365, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4109:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17361, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4086:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17363, - "indexExpression": { - "argumentTypes": null, - "id": 17362, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4099:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4086:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "4086:22:22", - "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": 17366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4086:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4065:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17368, - "nodeType": "ExpressionStatement", - "src": "4065:53:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17369, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17371, - "indexExpression": { - "argumentTypes": null, - "id": 17370, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4141:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4128:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17376, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4168:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17372, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4147:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17374, - "indexExpression": { - "argumentTypes": null, - "id": 17373, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4160:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4147:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "4147:20:22", - "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": 17377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4147:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4128:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17379, - "nodeType": "ExpressionStatement", - "src": "4128:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17381, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4201:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17382, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4207:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17383, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "4211:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17380, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "4192:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4192:25:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17385, - "nodeType": "EmitStatement", - "src": "4187:30:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17387, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4243:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17389, - "indexExpression": { - "argumentTypes": null, - "id": 17388, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4254:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4243:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17390, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4261:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17392, - "indexExpression": { - "argumentTypes": null, - "id": 17391, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4272:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4261:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17393, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4277:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17386, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "4228:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4228:58:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17395, - "nodeType": "ExpressionStatement", - "src": "4228:58:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17396, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4303:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17330, - "id": 17397, - "nodeType": "Return", - "src": "4296:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another.\n@param from The address you want to send tokens from.\n@param to The address you want to transfer to.\n@param value The amount of tokens to be transferred.", - "id": 17399, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17326, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "3765:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17327, - "modifierName": { - "argumentTypes": null, - "id": 17325, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "3750:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "3750:18:22" - } - ], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17319, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3684:12:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17318, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3684:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17321, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3698:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17320, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3698:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17323, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3710:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17322, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3710:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3683:41:22" - }, - "returnParameters": { - "id": 17330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3786:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17328, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3786:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3785:6:22" - }, - "scope": 17762, - "src": "3662:652:22", - "stateMutability": "nonpayable", - "superFunction": 19065, - "visibility": "external" - }, - { - "body": { - "id": 17416, - "nodeType": "Block", - "src": "4512:84:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17413, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "4572:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17410, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4549:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17406, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4527:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17408, - "indexExpression": { - "argumentTypes": null, - "id": 17407, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17401, - "src": "4540:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4527:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "4527:21:22", - "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": 17411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:40:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "4527:44:22", - "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": 17414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17405, - "id": 17415, - "nodeType": "Return", - "src": "4520:69:22" - } - ] - }, - "documentation": "@param who The address to query.\n@return The balance of the specified address.", - "id": 17417, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17401, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4445:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4445:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4444:13:22" - }, - "returnParameters": { - "id": 17405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4499:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4499:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4498:9:22" - }, - "scope": 17762, - "src": "4426:170:22", - "stateMutability": "view", - "superFunction": 19072, - "visibility": "external" - }, - { - "body": { - "id": 17428, - "nodeType": "Block", - "src": "4869:39:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17424, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4884:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17426, - "indexExpression": { - "argumentTypes": null, - "id": 17425, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17419, - "src": "4897:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4884:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17423, - "id": 17427, - "nodeType": "Return", - "src": "4877:24:22" - } - ] - }, - "documentation": "@notice Currently returns the internal storage amount\n@param who The address to query.\n@return The underlying balance of the specified address.", - "id": 17429, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17419, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4802:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17418, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4802:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4801:13:22" - }, - "returnParameters": { - "id": 17423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4856:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17421, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4856:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4855:9:22" - }, - "scope": 17762, - "src": "4773:135:22", - "stateMutability": "view", - "superFunction": 19079, - "visibility": "external" - }, - { - "body": { - "id": 17444, - "nodeType": "Block", - "src": "5319:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17438, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "5336:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17440, - "indexExpression": { - "argumentTypes": null, - "id": 17439, - "name": "owner_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17431, - "src": "5354:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:25:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17442, - "indexExpression": { - "argumentTypes": null, - "id": 17441, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17433, - "src": "5362:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:34:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17437, - "id": 17443, - "nodeType": "Return", - "src": "5329:41:22" - } - ] - }, - "documentation": "@dev Function to check the amount of tokens that an owner has allowed to a spender.\n@param owner_ The address which owns the funds.\n@param spender The address which will spend the funds.\n@return The number of tokens still available for the spender.", - "id": 17445, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17431, - "name": "owner_", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5226:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17430, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5226:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17433, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5242:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17432, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5242:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5225:33:22" - }, - "returnParameters": { - "id": 17437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17436, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5306:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5306:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5305:9:22" - }, - "scope": 17762, - "src": "5207:170:22", - "stateMutability": "view", - "superFunction": 19088, - "visibility": "external" - }, - { - "body": { - "id": 17472, - "nodeType": "Block", - "src": "6099:135:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17454, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6109:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17458, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6127:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6127:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6109:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17459, - "indexExpression": { - "argumentTypes": null, - "id": 17457, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6139:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6109:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17460, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6150:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6109:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17462, - "nodeType": "ExpressionStatement", - "src": "6109:46:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17464, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6179:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6179:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17466, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6191:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17467, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6200:5:22", - "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" - } - ], - "id": 17463, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6170:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6170:36:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17469, - "nodeType": "EmitStatement", - "src": "6165:41:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17453, - "id": 17471, - "nodeType": "Return", - "src": "6216:11:22" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of\nmsg.sender. This method is included for ERC20 compatibility.\nincreaseAllowance and decreaseAllowance should be used instead.\nChanging an allowance with this method brings the risk that someone may transfer both\nthe old and the new allowance - if they are both greater than zero - if a transfer\ntransaction is mined before the later approve() call is mined.\n * @param spender The address which will spend the funds.\n@param value The amount of tokens to be spent.", - "id": 17473, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17447, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6023:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17446, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6023:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17449, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6040:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17448, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6040:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6022:32:22" - }, - "returnParameters": { - "id": 17453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6089:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17451, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6089:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6088:6:22" - }, - "scope": 17762, - "src": "6006:228:22", - "stateMutability": "nonpayable", - "superFunction": 19097, - "visibility": "external" - }, - { - "body": { - "id": 17513, - "nodeType": "Block", - "src": "6706:229:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17482, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6716:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17486, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17483, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6734:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6734:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6716:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17487, - "indexExpression": { - "argumentTypes": null, - "id": 17485, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6746:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6716:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17495, - "name": "addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17477, - "src": "6812:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17488, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6769:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17491, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17489, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6787:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6787:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17493, - "indexExpression": { - "argumentTypes": null, - "id": 17492, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6799:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "6769:42:22", - "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": 17496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6769:54:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6716:107:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17498, - "nodeType": "ExpressionStatement", - "src": "6716:107:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17500, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6847:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6847:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17502, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6859:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17503, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6868:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17506, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17504, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6886:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6886:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17508, - "indexExpression": { - "argumentTypes": null, - "id": 17507, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6898:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:38:22", - "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" - } - ], - "id": 17499, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6838:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6838:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17510, - "nodeType": "EmitStatement", - "src": "6833:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17481, - "id": 17512, - "nodeType": "Return", - "src": "6917:11:22" - } - ] - }, - "documentation": "@dev Increase the amount of tokens that an owner has allowed to a spender.\nThis method should be used instead of approve() to avoid the double approval vulnerability\ndescribed above.\n@param spender The address which will spend the funds.\n@param addedValue The amount of tokens to increase the allowance by.", - "id": 17514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17475, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6625:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17474, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6625:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17477, - "name": "addedValue", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6642:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6642:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6624:37:22" - }, - "returnParameters": { - "id": 17481, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17480, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6696:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17479, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6696:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6695:6:22" - }, - "scope": 17762, - "src": "6598:337:22", - "stateMutability": "nonpayable", - "superFunction": 19106, - "visibility": "external" - }, - { - "body": { - "id": 17573, - "nodeType": "Block", - "src": "7302:389:22", - "statements": [ - { - "assignments": [ - 17524 - ], - "declarations": [ - { - "constant": false, - "id": 17524, - "name": "oldValue", - "nodeType": "VariableDeclaration", - "scope": 17573, - "src": "7312:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7312:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17531, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17525, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7331:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17528, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17526, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7349:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7349:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17530, - "indexExpression": { - "argumentTypes": null, - "id": 17529, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7361:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7312:57:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17532, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7383:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 17533, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7402:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7383:27:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17557, - "nodeType": "Block", - "src": "7485:95:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17545, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7499:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17549, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17546, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7517:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7517:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7499:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17550, - "indexExpression": { - "argumentTypes": null, - "id": 17548, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7529:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7499:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17553, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7553:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17551, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7540:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "7540:12:22", - "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": 17554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7540:29:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7499:70:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17556, - "nodeType": "ExpressionStatement", - "src": "7499:70:22" - } - ] - }, - "id": 17558, - "nodeType": "IfStatement", - "src": "7379:201:22", - "trueBody": { - "id": 17544, - "nodeType": "Block", - "src": "7412:67:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17535, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7426:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17539, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7444:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7444:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7426:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17540, - "indexExpression": { - "argumentTypes": null, - "id": 17538, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7456:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7426:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 17541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7467:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7426:42:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17543, - "nodeType": "ExpressionStatement", - "src": "7426:42:22" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17560, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7603:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7603:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17562, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7615:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17563, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7624:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17566, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17564, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7642:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7642:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17568, - "indexExpression": { - "argumentTypes": null, - "id": 17567, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7654:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:38:22", - "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" - } - ], - "id": 17559, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "7594:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7594:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17570, - "nodeType": "EmitStatement", - "src": "7589:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17571, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7680:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17522, - "id": 17572, - "nodeType": "Return", - "src": "7673:11:22" - } - ] - }, - "documentation": "@dev Decrease the amount of tokens that an owner has allowed to a spender.\n * @param spender The address which will spend the funds.\n@param subtractedValue The amount of tokens to decrease the allowance by.", - "id": 17574, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17519, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17516, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7216:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7216:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17518, - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7233:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7233:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7215:42:22" - }, - "returnParameters": { - "id": 17522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17521, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7292:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17520, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7292:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7291:6:22" - }, - "scope": 17762, - "src": "7189:502:22", - "stateMutability": "nonpayable", - "superFunction": 19115, - "visibility": "external" - }, - { - "body": { - "id": 17594, - "nodeType": "Block", - "src": "7936:120:22", - "statements": [ - { - "assignments": [ - 17582 - ], - "declarations": [ - { - "constant": false, - "id": 17582, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 17594, - "src": "7946:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7946:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17584, - "initialValue": { - "argumentTypes": null, - "id": 17583, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7967:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7946:28:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17585, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7984:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17586, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "7994:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7984:18:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17588, - "nodeType": "ExpressionStatement", - "src": "7984:18:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17590, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17582, - "src": "8028:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17591, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "8040:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17589, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19017, - "src": "8017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8017:32:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17593, - "nodeType": "EmitStatement", - "src": "8012:37:22" - } - ] - }, - "documentation": "@notice sets the rebaser\n@param rebaser_ The address of the rebaser contract to use for authentication.", - "id": 17595, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17579, - "modifierName": { - "argumentTypes": null, - "id": 17578, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "7924:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7924:7:22" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17577, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17576, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 17595, - "src": "7881:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17575, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7881:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7880:18:22" - }, - "returnParameters": { - "id": 17580, - "nodeType": "ParameterList", - "parameters": [], - "src": "7936:0:22" - }, - "scope": 17762, - "src": "7860:196:22", - "stateMutability": "nonpayable", - "superFunction": 19188, - "visibility": "external" - }, - { - "body": { - "id": 17615, - "nodeType": "Block", - "src": "8285:155:22", - "statements": [ - { - "assignments": [ - 17603 - ], - "declarations": [ - { - "constant": false, - "id": 17603, - "name": "oldIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 17615, - "src": "8295:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17602, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8295:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17605, - "initialValue": { - "argumentTypes": null, - "id": 17604, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8321:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8295:38:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17606, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8343:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17607, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8358:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8343:28:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17609, - "nodeType": "ExpressionStatement", - "src": "8343:28:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17611, - "name": "oldIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17603, - "src": "8402:15:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17612, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8419:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17610, - "name": "NewIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19023, - "src": "8386:15:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8386:47:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17614, - "nodeType": "EmitStatement", - "src": "8381:52:22" - } - ] - }, - "documentation": "@notice sets the incentivizer\n@param incentivizer_ The address of the rebaser contract to use for authentication.", - "id": 17616, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17600, - "modifierName": { - "argumentTypes": null, - "id": 17599, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8273:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8273:7:22" - } - ], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17597, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 17616, - "src": "8225:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17596, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8225:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8224:23:22" - }, - "returnParameters": { - "id": 17601, - "nodeType": "ParameterList", - "parameters": [], - "src": "8285:0:22" - }, - "scope": 17762, - "src": "8199:241:22", - "stateMutability": "nonpayable", - "superFunction": 19193, - "visibility": "external" - }, - { - "body": { - "id": 17636, - "nodeType": "Block", - "src": "8661:141:22", - "statements": [ - { - "assignments": [ - 17624 - ], - "declarations": [ - { - "constant": false, - "id": 17624, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 17636, - "src": "8671:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17623, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8671:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17626, - "initialValue": { - "argumentTypes": null, - "id": 17625, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8695:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8671:34:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17627, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8715:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17628, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8728:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8715:24:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17630, - "nodeType": "ExpressionStatement", - "src": "8715:24:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17632, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17624, - "src": "8768:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17633, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8783:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17631, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19005, - "src": "8754:13:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8754:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17635, - "nodeType": "EmitStatement", - "src": "8749:46:22" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 17637, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17621, - "modifierName": { - "argumentTypes": null, - "id": 17620, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8649:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8649:7:22" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17619, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17618, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 17637, - "src": "8603:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8603:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8602:21:22" - }, - "returnParameters": { - "id": 17622, - "nodeType": "ParameterList", - "parameters": [], - "src": "8661:0:22" - }, - "scope": 17762, - "src": "8579:223:22", - "stateMutability": "nonpayable", - "superFunction": 19198, - "visibility": "external" - }, - { - "body": { - "id": 17667, - "nodeType": "Block", - "src": "8916:185:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17641, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8934:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8934:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17643, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8948:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8934:24:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 17645, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8960:10:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 17640, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8926:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8926:45:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17647, - "nodeType": "ExpressionStatement", - "src": "8926:45:22" - }, - { - "assignments": [ - 17649 - ], - "declarations": [ - { - "constant": false, - "id": 17649, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 17667, - "src": "8981:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17648, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8981:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17651, - "initialValue": { - "argumentTypes": null, - "id": 17650, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "8998:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8981:20:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17652, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9011:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17653, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "9011:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17655, - "nodeType": "ExpressionStatement", - "src": "9011:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17656, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9037:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9058:1:22", - "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": 17657, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9050:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9050:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9037:23:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17661, - "nodeType": "ExpressionStatement", - "src": "9037:23:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17663, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17649, - "src": "9082:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17664, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9090:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17662, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19011, - "src": "9075:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9075:19:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17666, - "nodeType": "EmitStatement", - "src": "9070:24:22" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 17668, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17638, - "nodeType": "ParameterList", - "parameters": [], - "src": "8892:2:22" - }, - "returnParameters": { - "id": 17639, - "nodeType": "ParameterList", - "parameters": [], - "src": "8916:0:22" - }, - "scope": 17762, - "src": "8873:228:22", - "stateMutability": "nonpayable", - "superFunction": 19201, - "visibility": "external" - }, - { - "body": { - "id": 17760, - "nodeType": "Block", - "src": "9641:797:22", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17681, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9655:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9669:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9655:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17693, - "nodeType": "IfStatement", - "src": "9651:130:22", - "trueBody": { - "id": 17692, - "nodeType": "Block", - "src": "9672:109:22", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17685, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "9696:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17686, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9703:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17687, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9722:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17684, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "9689:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9689:51:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17689, - "nodeType": "EmitStatement", - "src": "9684:56:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17690, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "9759:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17691, - "nodeType": "Return", - "src": "9752:18:22" - } - ] - } - }, - { - "assignments": [ - 17695 - ], - "declarations": [ - { - "constant": false, - "id": 17695, - "name": "prevYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17760, - "src": "9791:29:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17694, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9791:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17697, - "initialValue": { - "argumentTypes": null, - "id": 17696, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9823:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9791:49:22" - }, - { - "condition": { - "argumentTypes": null, - "id": 17699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9855:9:22", - "subExpression": { - "argumentTypes": null, - "id": 17698, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17674, - "src": "9856:8:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17743, - "nodeType": "Block", - "src": "9969:307:22", - "statements": [ - { - "assignments": [ - 17715 - ], - "declarations": [ - { - "constant": false, - "id": 17715, - "name": "newScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17743, - "src": "9983:24:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17726, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17724, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10058:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17720, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "10041:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17718, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10032:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "10032:8:22", - "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": 17721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10032:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17716, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10010:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10010:21:22", - "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": 17722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "10010:47:22", - "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": 17725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9983:80:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17727, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10081:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17728, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10100:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10100:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10081:38:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17741, - "nodeType": "Block", - "src": "10196:70:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17736, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10212:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17737, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10232:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10212:39:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17740, - "nodeType": "ExpressionStatement", - "src": "10212:39:22" - } - ] - }, - "id": 17742, - "nodeType": "IfStatement", - "src": "10077:189:22", - "trueBody": { - "id": 17735, - "nodeType": "Block", - "src": "10121:69:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17731, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10139:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17732, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10159:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10139:36:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17734, - "nodeType": "ExpressionStatement", - "src": "10139:36:22" - } - ] - } - } - ] - }, - "id": 17744, - "nodeType": "IfStatement", - "src": "9851:425:22", - "trueBody": { - "id": 17713, - "nodeType": "Block", - "src": "9866:97:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17700, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9879:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17709, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9947:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17705, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9930:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17703, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9921:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "9921:8:22", - "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": 17706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9921:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17701, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9899:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9899:21:22", - "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": 17707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9899:47:22", - "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": 17710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9879:73:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17712, - "nodeType": "ExpressionStatement", - "src": "9879:73:22" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 17750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17745, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10286:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17748, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10315:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17746, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "10300:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10300:14:22", - "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": 17749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10300:33:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10286:47:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17751, - "nodeType": "ExpressionStatement", - "src": "10286:47:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17753, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "10355:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17754, - "name": "prevYamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17695, - "src": "10362:21:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17755, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10385:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17752, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "10348:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10348:55:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17757, - "nodeType": "EmitStatement", - "src": "10343:60:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17758, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10420:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17759, - "nodeType": "Return", - "src": "10413:18:22" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is CpiOracleRate / baseCpi", - "id": 17761, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17677, - "modifierName": { - "argumentTypes": null, - "id": 17676, - "name": "onlyRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17080, - "src": "9599:11:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9599:11:22" - } - ], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17675, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17670, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9503:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17669, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9503:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17672, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9526:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17671, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9526:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17674, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9554:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17673, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9554:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9493:80:22" - }, - "returnParameters": { - "id": 17680, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17679, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9628:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9628:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9627:9:22" - }, - "scope": 17762, - "src": "9478:960:22", - "stateMutability": "nonpayable", - "superFunction": 19183, - "visibility": "external" - } - ], - "scope": 17829, - "src": "96:10344:22" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17763, - "name": "YAMToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17762, - "src": "10458:8:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - }, - "id": 17764, - "nodeType": "InheritanceSpecifier", - "src": "10458:8:22" - } - ], - "contractDependencies": [ - 17762, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17828, - "linearizedBaseContracts": [ - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17826, - "nodeType": "Block", - "src": "10885:442:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17778, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "10903:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10917:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10903:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "3020696e697420737570706c79", - "id": 17781, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10920:15:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - }, - "value": "0 init supply" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - } - ], - "id": 17777, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10895:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10895:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17783, - "nodeType": "ExpressionStatement", - "src": "10895:41:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17787, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17766, - "src": "10964:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17788, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17768, - "src": "10971:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17789, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17770, - "src": "10980:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "id": 17784, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19341, - "src": "10947:5:22", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAM_$17828", - "typeString": "contract super YAM" - } - }, - "id": 17786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initialize", - "nodeType": "MemberAccess", - "referencedDeclaration": 17153, - "src": "10947:16:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$__$", - "typeString": "function (string memory,string memory,uint8)" - } - }, - "id": 17790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10947:43:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17791, - "nodeType": "ExpressionStatement", - "src": "10947:43:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17792, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "11001:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11030:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11034:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11030:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17798, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11039:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17799, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11038:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11030:14:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17793, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11014:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11014:15:22", - "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": 17801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11014:31:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11001:44:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17803, - "nodeType": "ExpressionStatement", - "src": "11001:44:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17804, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "11055:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17805, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11069:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11055:25:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17807, - "nodeType": "ExpressionStatement", - "src": "11055:25:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17808, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "11090:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17809, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11110:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11090:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17811, - "nodeType": "ExpressionStatement", - "src": "11090:24:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17812, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "11124:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17814, - "indexExpression": { - "argumentTypes": null, - "id": 17813, - "name": "initial_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17772, - "src": "11137:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11124:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17819, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11170:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11174:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11170:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17820, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11180:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17821, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11179:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11170:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17815, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11154:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11154:15:22", - "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": 17823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11154:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11124:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17825, - "nodeType": "ExpressionStatement", - "src": "11124:62:22" - } - ] - }, - "documentation": "@notice Initialize the new money market\n@param name_ ERC-20 name of this token\n@param symbol_ ERC-20 symbol of this token\n@param decimals_ ERC-20 decimal precision of this token", - "id": 17827, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17766, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10724:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10724:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17768, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10753:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17767, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10753:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17770, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10784:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17769, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10784:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17772, - "name": "initial_owner", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10809:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17771, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10809:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17774, - "name": "initSupply_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10840:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17773, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10840:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10714:151:22" - }, - "returnParameters": { - "id": 17776, - "nodeType": "ParameterList", - "parameters": [], - "src": "10885:0:22" - }, - "scope": 17828, - "src": "10695:632:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17829, - "src": "10442:887:22" - } - ], - "src": "0:11330:22" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "exportedSymbols": { - "YAM": [ - 17828 - ], - "YAMToken": [ - 17762 - ] - }, - "id": 17829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17055, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:22" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol", - "file": "./YAMGovernance.sol", - "id": 17056, - "nodeType": "ImportDirective", - "scope": 17829, - "sourceUnit": 18931, - "src": "65:29:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17057, - "name": "YAMGovernanceToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18930, - "src": "117:18:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - }, - "id": 17058, - "nodeType": "InheritanceSpecifier", - "src": "117:18:22" - } - ], - "contractDependencies": [ - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17762, - "linearizedBaseContracts": [ - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17068, - "nodeType": "Block", - "src": "178:54:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17061, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "196:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "196:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17063, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "210:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "196:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "188:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "188:26:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17066, - "nodeType": "ExpressionStatement", - "src": "188:26:22" - }, - { - "id": 17067, - "nodeType": "PlaceholderStatement", - "src": "224:1:22" - } - ] - }, - "documentation": null, - "id": 17069, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17059, - "nodeType": "ParameterList", - "parameters": [], - "src": "175:2:22" - }, - "src": "159:73:22", - "visibility": "internal" - }, - { - "body": { - "id": 17079, - "nodeType": "Block", - "src": "261:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17072, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "279:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "279:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17074, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "293:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "279:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17071, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "271:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "271:30:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17077, - "nodeType": "ExpressionStatement", - "src": "271:30:22" - }, - { - "id": 17078, - "nodeType": "PlaceholderStatement", - "src": "311:1:22" - } - ] - }, - "documentation": null, - "id": 17080, - "name": "onlyRebaser", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17070, - "nodeType": "ParameterList", - "parameters": [], - "src": "258:2:22" - }, - "src": "238:81:22", - "visibility": "internal" - }, - { - "body": { - "id": 17101, - "nodeType": "Block", - "src": "347:123:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17083, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "365:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "365:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17085, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "379:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "365:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17087, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "390:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "390:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17089, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "404:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "390:26:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:51:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17092, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "420:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "420:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17094, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "434:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "420:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:72:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74206d696e746572", - "id": 17097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "439:12:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - }, - "value": "not minter" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - } - ], - "id": 17082, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "357:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "357:95:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17099, - "nodeType": "ExpressionStatement", - "src": "357:95:22" - }, - { - "id": 17100, - "nodeType": "PlaceholderStatement", - "src": "462:1:22" - } - ] - }, - "documentation": null, - "id": 17102, - "name": "onlyMinter", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17081, - "nodeType": "ParameterList", - "parameters": [], - "src": "344:2:22" - }, - "src": "325:145:22", - "visibility": "internal" - }, - { - "body": { - "id": 17123, - "nodeType": "Block", - "src": "512:93:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17107, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "530:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 17109, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "544:3:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 17108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "536:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "536:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "530:18:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "522:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "522:27:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17113, - "nodeType": "ExpressionStatement", - "src": "522:27:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17115, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "567:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17117, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19338, - "src": "581:4:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - ], - "id": 17116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "573:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "573:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "567:19:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "559:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "559:28:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17121, - "nodeType": "ExpressionStatement", - "src": "559:28:22" - }, - { - "id": 17122, - "nodeType": "PlaceholderStatement", - "src": "597:1:22" - } - ] - }, - "documentation": null, - "id": 17124, - "name": "validRecipient", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17104, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17124, - "src": "500:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17103, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "500:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "499:12:22" - }, - "src": "476:129:22", - "visibility": "internal" - }, - { - "body": { - "id": 17152, - "nodeType": "Block", - "src": "741:149:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17134, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "759:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "780:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "759:22:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 17137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "783:21:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 17133, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "751:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "751:54:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17139, - "nodeType": "ExpressionStatement", - "src": "751:54:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17140, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19212, - "src": "815:4:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17141, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17126, - "src": "822:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "815:12:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17143, - "nodeType": "ExpressionStatement", - "src": "815:12:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17144, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19214, - "src": "837:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17145, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17128, - "src": "846:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "837:16:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17147, - "nodeType": "ExpressionStatement", - "src": "837:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17148, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19216, - "src": "863:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17149, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17130, - "src": "874:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "863:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 17151, - "nodeType": "ExpressionStatement", - "src": "863:20:22" - } - ] - }, - "documentation": null, - "id": 17153, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17126, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "640:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17125, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "640:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17128, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "669:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17127, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "669:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17130, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "700:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17129, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "700:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "630:91:22" - }, - "returnParameters": { - "id": 17132, - "nodeType": "ParameterList", - "parameters": [], - "src": "741:0:22" - }, - "scope": 17762, - "src": "611:279:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17161, - "nodeType": "Block", - "src": "1054:43:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17158, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "1071:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1071:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17157, - "id": 17160, - "nodeType": "Return", - "src": "1064:26:22" - } - ] - }, - "documentation": "@notice Computes the current max scaling factor", - "id": 17162, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17154, - "nodeType": "ParameterList", - "parameters": [], - "src": "991:2:22" - }, - "returnParameters": { - "id": 17157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17162, - "src": "1041:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1041:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1040:9:22" - }, - "scope": 17762, - "src": "966:131:22", - "stateMutability": "view", - "superFunction": 19120, - "visibility": "external" - }, - { - "body": { - "id": 17174, - "nodeType": "Block", - "src": "1192:240:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1409:2:22", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 17168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1410:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 17167, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1401:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 17170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1401:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 17171, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "1415:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1401:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17166, - "id": 17173, - "nodeType": "Return", - "src": "1394:31:22" - } - ] - }, - "documentation": null, - "id": 17175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17163, - "nodeType": "ParameterList", - "parameters": [], - "src": "1129:2:22" - }, - "returnParameters": { - "id": 17166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17165, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17175, - "src": "1179:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1179:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1178:9:22" - }, - "scope": 17762, - "src": "1103:329:22", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17193, - "nodeType": "Block", - "src": "1689:55:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17187, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17177, - "src": "1705:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17188, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17179, - "src": "1709:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17186, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17250, - "src": "1699:5:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1699:17:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17190, - "nodeType": "ExpressionStatement", - "src": "1699:17:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1733:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17185, - "id": 17192, - "nodeType": "Return", - "src": "1726:11:22" - } - ] - }, - "documentation": "@notice Mints new tokens, increasing totalSupply, initSupply, and a users balance.\n@dev Limited to onlyMinter modifier", - "id": 17194, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17182, - "modifierName": { - "argumentTypes": null, - "id": 17181, - "name": "onlyMinter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17102, - "src": "1651:10:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1651:10:22" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17177, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1598:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1598:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17179, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1610:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17178, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1610:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1597:28:22" - }, - "returnParameters": { - "id": 17185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17184, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1679:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17183, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1679:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1678:6:22" - }, - "scope": 17762, - "src": "1584:160:22", - "stateMutability": "nonpayable", - "superFunction": 19172, - "visibility": "external" - }, - { - "body": { - "id": 17249, - "nodeType": "Block", - "src": "1814:526:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17201, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1852:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17204, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1882:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17202, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1866:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "1866:15:22", - "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": 17205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1866:23:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1852:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17207, - "nodeType": "ExpressionStatement", - "src": "1852:37:22" - }, - { - "assignments": [ - 17209 - ], - "declarations": [ - { - "constant": false, - "id": 17209, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17249, - "src": "1928:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17208, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1928:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17217, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17215, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "1980:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17212, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "1958:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17210, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1947:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1947:10:22", - "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": 17213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:28:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1947:32:22", - "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": 17216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:51:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1928:70:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17218, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2036:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17221, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2064:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17219, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2049:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2049:14:22", - "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": 17222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2049:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2036:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17224, - "nodeType": "ExpressionStatement", - "src": "2036:37:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17226, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "2154:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17227, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "2175:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2175:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2154:40:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d6178207363616c696e6720666163746f7220746f6f206c6f77", - "id": 17230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2196:28:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - }, - "value": "max scaling factor too low" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - } - ], - "id": 17225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2146:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2146:79:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17232, - "nodeType": "ExpressionStatement", - "src": "2146:79:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17233, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2255:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17235, - "indexExpression": { - "argumentTypes": null, - "id": 17234, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2268:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2255:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17240, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2295:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17236, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2274:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17238, - "indexExpression": { - "argumentTypes": null, - "id": 17237, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2287:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2274:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2274:20:22", - "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": 17241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2274:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2255:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17243, - "nodeType": "ExpressionStatement", - "src": "2255:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17245, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2322:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17246, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "2326:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17244, - "name": "Mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19045, - "src": "2317:4:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2317:16:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17248, - "nodeType": "EmitStatement", - "src": "2312:21:22" - } - ] - }, - "documentation": null, - "id": 17250, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17196, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1765:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1765:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17198, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1777:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1777:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1764:28:22" - }, - "returnParameters": { - "id": 17200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1814:0:22" - }, - "scope": 17762, - "src": "1750:590:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17316, - "nodeType": "Block", - "src": "2704:709:22", - "statements": [ - { - "assignments": [ - 17263 - ], - "declarations": [ - { - "constant": false, - "id": 17263, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17316, - "src": "2983:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17271, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17269, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "3034:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17266, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3012:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17264, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3002:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3002:9:22", - "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": 17267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3002:31:22", - "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": 17270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2983:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17272, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3101:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17275, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17273, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3114:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3114:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3101:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17281, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3157:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17276, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17279, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17277, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3141:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3141:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3128:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3128:28:22", - "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": 17282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3128:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3101:65:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17284, - "nodeType": "ExpressionStatement", - "src": "3101:65:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17285, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3215:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17287, - "indexExpression": { - "argumentTypes": null, - "id": 17286, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3228:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3215:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17292, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3255:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17288, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3234:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17290, - "indexExpression": { - "argumentTypes": null, - "id": 17289, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3247:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3234:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "3234:20:22", - "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": 17293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3234:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3215:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17295, - "nodeType": "ExpressionStatement", - "src": "3215:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17297, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3288:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3288:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17299, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3300:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17300, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3304:5:22", - "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" - } - ], - "id": 17296, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "3279:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3279:31:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17302, - "nodeType": "EmitStatement", - "src": "3274:36:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17304, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3336:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17307, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17305, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3347:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3347:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3336:22:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17308, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3360:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17310, - "indexExpression": { - "argumentTypes": null, - "id": 17309, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3371:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3360:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17311, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3376:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17303, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "3321:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3321:64:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17313, - "nodeType": "ExpressionStatement", - "src": "3321:64:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17261, - "id": 17315, - "nodeType": "Return", - "src": "3395:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens to a specified address.\n@param to The address to transfer to.\n@param value The amount to be transferred.\n@return True on success, false otherwise.", - "id": 17317, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "2673:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17258, - "modifierName": { - "argumentTypes": null, - "id": 17256, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "2658:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2658:18:22" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17252, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2606:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2606:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17254, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2618:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2618:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2605:27:22" - }, - "returnParameters": { - "id": 17261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17260, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2694:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17259, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2694:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2693:6:22" - }, - "scope": 17762, - "src": "2588:825:22", - "stateMutability": "nonpayable", - "superFunction": 19054, - "visibility": "external" - }, - { - "body": { - "id": 17398, - "nodeType": "Block", - "src": "3796:518:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17331, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3836:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17335, - "indexExpression": { - "argumentTypes": null, - "id": 17332, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3854:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3836:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17336, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17333, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3860:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3860:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3836:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17344, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3914:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17337, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3874:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17339, - "indexExpression": { - "argumentTypes": null, - "id": 17338, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3892:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17342, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17340, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3898:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3898:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3874:39:22", - "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": 17345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3874:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3836:84:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17347, - "nodeType": "ExpressionStatement", - "src": "3836:84:22" - }, - { - "assignments": [ - 17349 - ], - "declarations": [ - { - "constant": false, - "id": 17349, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17398, - "src": "3960:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17348, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3960:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17357, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17355, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4011:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17352, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3989:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17350, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3979:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3979:9:22", - "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": 17353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3979:31:22", - "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": 17356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3960:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17358, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4065:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17360, - "indexExpression": { - "argumentTypes": null, - "id": 17359, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4078:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4065:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17365, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4109:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17361, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4086:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17363, - "indexExpression": { - "argumentTypes": null, - "id": 17362, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4099:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4086:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "4086:22:22", - "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": 17366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4086:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4065:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17368, - "nodeType": "ExpressionStatement", - "src": "4065:53:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17369, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17371, - "indexExpression": { - "argumentTypes": null, - "id": 17370, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4141:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4128:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17376, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4168:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17372, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4147:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17374, - "indexExpression": { - "argumentTypes": null, - "id": 17373, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4160:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4147:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "4147:20:22", - "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": 17377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4147:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4128:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17379, - "nodeType": "ExpressionStatement", - "src": "4128:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17381, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4201:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17382, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4207:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17383, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "4211:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17380, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "4192:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4192:25:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17385, - "nodeType": "EmitStatement", - "src": "4187:30:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17387, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4243:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17389, - "indexExpression": { - "argumentTypes": null, - "id": 17388, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4254:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4243:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17390, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4261:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17392, - "indexExpression": { - "argumentTypes": null, - "id": 17391, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4272:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4261:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17393, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4277:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17386, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "4228:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4228:58:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17395, - "nodeType": "ExpressionStatement", - "src": "4228:58:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17396, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4303:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17330, - "id": 17397, - "nodeType": "Return", - "src": "4296:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another.\n@param from The address you want to send tokens from.\n@param to The address you want to transfer to.\n@param value The amount of tokens to be transferred.", - "id": 17399, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17326, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "3765:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17327, - "modifierName": { - "argumentTypes": null, - "id": 17325, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "3750:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "3750:18:22" - } - ], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17319, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3684:12:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17318, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3684:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17321, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3698:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17320, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3698:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17323, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3710:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17322, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3710:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3683:41:22" - }, - "returnParameters": { - "id": 17330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3786:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17328, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3786:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3785:6:22" - }, - "scope": 17762, - "src": "3662:652:22", - "stateMutability": "nonpayable", - "superFunction": 19065, - "visibility": "external" - }, - { - "body": { - "id": 17416, - "nodeType": "Block", - "src": "4512:84:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17413, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "4572:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17410, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4549:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17406, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4527:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17408, - "indexExpression": { - "argumentTypes": null, - "id": 17407, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17401, - "src": "4540:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4527:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "4527:21:22", - "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": 17411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:40:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "4527:44:22", - "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": 17414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17405, - "id": 17415, - "nodeType": "Return", - "src": "4520:69:22" - } - ] - }, - "documentation": "@param who The address to query.\n@return The balance of the specified address.", - "id": 17417, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17401, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4445:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4445:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4444:13:22" - }, - "returnParameters": { - "id": 17405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4499:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4499:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4498:9:22" - }, - "scope": 17762, - "src": "4426:170:22", - "stateMutability": "view", - "superFunction": 19072, - "visibility": "external" - }, - { - "body": { - "id": 17428, - "nodeType": "Block", - "src": "4869:39:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17424, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4884:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17426, - "indexExpression": { - "argumentTypes": null, - "id": 17425, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17419, - "src": "4897:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4884:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17423, - "id": 17427, - "nodeType": "Return", - "src": "4877:24:22" - } - ] - }, - "documentation": "@notice Currently returns the internal storage amount\n@param who The address to query.\n@return The underlying balance of the specified address.", - "id": 17429, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17419, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4802:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17418, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4802:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4801:13:22" - }, - "returnParameters": { - "id": 17423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4856:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17421, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4856:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4855:9:22" - }, - "scope": 17762, - "src": "4773:135:22", - "stateMutability": "view", - "superFunction": 19079, - "visibility": "external" - }, - { - "body": { - "id": 17444, - "nodeType": "Block", - "src": "5319:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17438, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "5336:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17440, - "indexExpression": { - "argumentTypes": null, - "id": 17439, - "name": "owner_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17431, - "src": "5354:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:25:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17442, - "indexExpression": { - "argumentTypes": null, - "id": 17441, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17433, - "src": "5362:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:34:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17437, - "id": 17443, - "nodeType": "Return", - "src": "5329:41:22" - } - ] - }, - "documentation": "@dev Function to check the amount of tokens that an owner has allowed to a spender.\n@param owner_ The address which owns the funds.\n@param spender The address which will spend the funds.\n@return The number of tokens still available for the spender.", - "id": 17445, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17431, - "name": "owner_", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5226:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17430, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5226:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17433, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5242:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17432, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5242:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5225:33:22" - }, - "returnParameters": { - "id": 17437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17436, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5306:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5306:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5305:9:22" - }, - "scope": 17762, - "src": "5207:170:22", - "stateMutability": "view", - "superFunction": 19088, - "visibility": "external" - }, - { - "body": { - "id": 17472, - "nodeType": "Block", - "src": "6099:135:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17454, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6109:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17458, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6127:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6127:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6109:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17459, - "indexExpression": { - "argumentTypes": null, - "id": 17457, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6139:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6109:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17460, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6150:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6109:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17462, - "nodeType": "ExpressionStatement", - "src": "6109:46:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17464, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6179:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6179:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17466, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6191:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17467, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6200:5:22", - "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" - } - ], - "id": 17463, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6170:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6170:36:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17469, - "nodeType": "EmitStatement", - "src": "6165:41:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17453, - "id": 17471, - "nodeType": "Return", - "src": "6216:11:22" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of\nmsg.sender. This method is included for ERC20 compatibility.\nincreaseAllowance and decreaseAllowance should be used instead.\nChanging an allowance with this method brings the risk that someone may transfer both\nthe old and the new allowance - if they are both greater than zero - if a transfer\ntransaction is mined before the later approve() call is mined.\n * @param spender The address which will spend the funds.\n@param value The amount of tokens to be spent.", - "id": 17473, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17447, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6023:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17446, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6023:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17449, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6040:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17448, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6040:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6022:32:22" - }, - "returnParameters": { - "id": 17453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6089:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17451, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6089:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6088:6:22" - }, - "scope": 17762, - "src": "6006:228:22", - "stateMutability": "nonpayable", - "superFunction": 19097, - "visibility": "external" - }, - { - "body": { - "id": 17513, - "nodeType": "Block", - "src": "6706:229:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17482, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6716:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17486, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17483, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6734:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6734:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6716:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17487, - "indexExpression": { - "argumentTypes": null, - "id": 17485, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6746:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6716:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17495, - "name": "addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17477, - "src": "6812:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17488, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6769:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17491, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17489, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6787:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6787:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17493, - "indexExpression": { - "argumentTypes": null, - "id": 17492, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6799:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "6769:42:22", - "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": 17496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6769:54:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6716:107:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17498, - "nodeType": "ExpressionStatement", - "src": "6716:107:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17500, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6847:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6847:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17502, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6859:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17503, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6868:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17506, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17504, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6886:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6886:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17508, - "indexExpression": { - "argumentTypes": null, - "id": 17507, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6898:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:38:22", - "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" - } - ], - "id": 17499, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6838:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6838:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17510, - "nodeType": "EmitStatement", - "src": "6833:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17481, - "id": 17512, - "nodeType": "Return", - "src": "6917:11:22" - } - ] - }, - "documentation": "@dev Increase the amount of tokens that an owner has allowed to a spender.\nThis method should be used instead of approve() to avoid the double approval vulnerability\ndescribed above.\n@param spender The address which will spend the funds.\n@param addedValue The amount of tokens to increase the allowance by.", - "id": 17514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17475, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6625:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17474, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6625:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17477, - "name": "addedValue", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6642:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6642:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6624:37:22" - }, - "returnParameters": { - "id": 17481, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17480, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6696:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17479, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6696:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6695:6:22" - }, - "scope": 17762, - "src": "6598:337:22", - "stateMutability": "nonpayable", - "superFunction": 19106, - "visibility": "external" - }, - { - "body": { - "id": 17573, - "nodeType": "Block", - "src": "7302:389:22", - "statements": [ - { - "assignments": [ - 17524 - ], - "declarations": [ - { - "constant": false, - "id": 17524, - "name": "oldValue", - "nodeType": "VariableDeclaration", - "scope": 17573, - "src": "7312:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7312:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17531, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17525, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7331:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17528, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17526, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7349:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7349:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17530, - "indexExpression": { - "argumentTypes": null, - "id": 17529, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7361:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7312:57:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17532, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7383:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 17533, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7402:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7383:27:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17557, - "nodeType": "Block", - "src": "7485:95:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17545, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7499:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17549, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17546, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7517:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7517:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7499:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17550, - "indexExpression": { - "argumentTypes": null, - "id": 17548, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7529:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7499:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17553, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7553:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17551, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7540:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "7540:12:22", - "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": 17554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7540:29:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7499:70:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17556, - "nodeType": "ExpressionStatement", - "src": "7499:70:22" - } - ] - }, - "id": 17558, - "nodeType": "IfStatement", - "src": "7379:201:22", - "trueBody": { - "id": 17544, - "nodeType": "Block", - "src": "7412:67:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17535, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7426:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17539, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7444:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7444:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7426:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17540, - "indexExpression": { - "argumentTypes": null, - "id": 17538, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7456:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7426:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 17541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7467:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7426:42:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17543, - "nodeType": "ExpressionStatement", - "src": "7426:42:22" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17560, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7603:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7603:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17562, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7615:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17563, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7624:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17566, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17564, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7642:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7642:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17568, - "indexExpression": { - "argumentTypes": null, - "id": 17567, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7654:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:38:22", - "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" - } - ], - "id": 17559, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "7594:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7594:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17570, - "nodeType": "EmitStatement", - "src": "7589:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17571, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7680:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17522, - "id": 17572, - "nodeType": "Return", - "src": "7673:11:22" - } - ] - }, - "documentation": "@dev Decrease the amount of tokens that an owner has allowed to a spender.\n * @param spender The address which will spend the funds.\n@param subtractedValue The amount of tokens to decrease the allowance by.", - "id": 17574, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17519, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17516, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7216:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7216:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17518, - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7233:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7233:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7215:42:22" - }, - "returnParameters": { - "id": 17522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17521, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7292:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17520, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7292:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7291:6:22" - }, - "scope": 17762, - "src": "7189:502:22", - "stateMutability": "nonpayable", - "superFunction": 19115, - "visibility": "external" - }, - { - "body": { - "id": 17594, - "nodeType": "Block", - "src": "7936:120:22", - "statements": [ - { - "assignments": [ - 17582 - ], - "declarations": [ - { - "constant": false, - "id": 17582, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 17594, - "src": "7946:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7946:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17584, - "initialValue": { - "argumentTypes": null, - "id": 17583, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7967:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7946:28:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17585, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7984:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17586, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "7994:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7984:18:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17588, - "nodeType": "ExpressionStatement", - "src": "7984:18:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17590, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17582, - "src": "8028:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17591, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "8040:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17589, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19017, - "src": "8017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8017:32:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17593, - "nodeType": "EmitStatement", - "src": "8012:37:22" - } - ] - }, - "documentation": "@notice sets the rebaser\n@param rebaser_ The address of the rebaser contract to use for authentication.", - "id": 17595, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17579, - "modifierName": { - "argumentTypes": null, - "id": 17578, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "7924:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7924:7:22" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17577, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17576, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 17595, - "src": "7881:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17575, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7881:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7880:18:22" - }, - "returnParameters": { - "id": 17580, - "nodeType": "ParameterList", - "parameters": [], - "src": "7936:0:22" - }, - "scope": 17762, - "src": "7860:196:22", - "stateMutability": "nonpayable", - "superFunction": 19188, - "visibility": "external" - }, - { - "body": { - "id": 17615, - "nodeType": "Block", - "src": "8285:155:22", - "statements": [ - { - "assignments": [ - 17603 - ], - "declarations": [ - { - "constant": false, - "id": 17603, - "name": "oldIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 17615, - "src": "8295:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17602, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8295:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17605, - "initialValue": { - "argumentTypes": null, - "id": 17604, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8321:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8295:38:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17606, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8343:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17607, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8358:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8343:28:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17609, - "nodeType": "ExpressionStatement", - "src": "8343:28:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17611, - "name": "oldIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17603, - "src": "8402:15:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17612, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8419:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17610, - "name": "NewIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19023, - "src": "8386:15:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8386:47:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17614, - "nodeType": "EmitStatement", - "src": "8381:52:22" - } - ] - }, - "documentation": "@notice sets the incentivizer\n@param incentivizer_ The address of the rebaser contract to use for authentication.", - "id": 17616, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17600, - "modifierName": { - "argumentTypes": null, - "id": 17599, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8273:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8273:7:22" - } - ], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17597, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 17616, - "src": "8225:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17596, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8225:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8224:23:22" - }, - "returnParameters": { - "id": 17601, - "nodeType": "ParameterList", - "parameters": [], - "src": "8285:0:22" - }, - "scope": 17762, - "src": "8199:241:22", - "stateMutability": "nonpayable", - "superFunction": 19193, - "visibility": "external" - }, - { - "body": { - "id": 17636, - "nodeType": "Block", - "src": "8661:141:22", - "statements": [ - { - "assignments": [ - 17624 - ], - "declarations": [ - { - "constant": false, - "id": 17624, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 17636, - "src": "8671:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17623, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8671:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17626, - "initialValue": { - "argumentTypes": null, - "id": 17625, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8695:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8671:34:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17627, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8715:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17628, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8728:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8715:24:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17630, - "nodeType": "ExpressionStatement", - "src": "8715:24:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17632, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17624, - "src": "8768:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17633, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8783:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17631, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19005, - "src": "8754:13:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8754:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17635, - "nodeType": "EmitStatement", - "src": "8749:46:22" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 17637, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17621, - "modifierName": { - "argumentTypes": null, - "id": 17620, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8649:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8649:7:22" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17619, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17618, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 17637, - "src": "8603:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8603:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8602:21:22" - }, - "returnParameters": { - "id": 17622, - "nodeType": "ParameterList", - "parameters": [], - "src": "8661:0:22" - }, - "scope": 17762, - "src": "8579:223:22", - "stateMutability": "nonpayable", - "superFunction": 19198, - "visibility": "external" - }, - { - "body": { - "id": 17667, - "nodeType": "Block", - "src": "8916:185:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17641, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8934:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8934:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17643, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8948:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8934:24:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 17645, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8960:10:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 17640, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8926:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8926:45:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17647, - "nodeType": "ExpressionStatement", - "src": "8926:45:22" - }, - { - "assignments": [ - 17649 - ], - "declarations": [ - { - "constant": false, - "id": 17649, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 17667, - "src": "8981:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17648, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8981:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17651, - "initialValue": { - "argumentTypes": null, - "id": 17650, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "8998:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8981:20:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17652, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9011:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17653, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "9011:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17655, - "nodeType": "ExpressionStatement", - "src": "9011:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17656, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9037:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9058:1:22", - "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": 17657, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9050:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9050:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9037:23:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17661, - "nodeType": "ExpressionStatement", - "src": "9037:23:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17663, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17649, - "src": "9082:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17664, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9090:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17662, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19011, - "src": "9075:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9075:19:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17666, - "nodeType": "EmitStatement", - "src": "9070:24:22" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 17668, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17638, - "nodeType": "ParameterList", - "parameters": [], - "src": "8892:2:22" - }, - "returnParameters": { - "id": 17639, - "nodeType": "ParameterList", - "parameters": [], - "src": "8916:0:22" - }, - "scope": 17762, - "src": "8873:228:22", - "stateMutability": "nonpayable", - "superFunction": 19201, - "visibility": "external" - }, - { - "body": { - "id": 17760, - "nodeType": "Block", - "src": "9641:797:22", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17681, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9655:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9669:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9655:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17693, - "nodeType": "IfStatement", - "src": "9651:130:22", - "trueBody": { - "id": 17692, - "nodeType": "Block", - "src": "9672:109:22", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17685, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "9696:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17686, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9703:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17687, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9722:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17684, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "9689:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9689:51:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17689, - "nodeType": "EmitStatement", - "src": "9684:56:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17690, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "9759:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17691, - "nodeType": "Return", - "src": "9752:18:22" - } - ] - } - }, - { - "assignments": [ - 17695 - ], - "declarations": [ - { - "constant": false, - "id": 17695, - "name": "prevYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17760, - "src": "9791:29:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17694, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9791:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17697, - "initialValue": { - "argumentTypes": null, - "id": 17696, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9823:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9791:49:22" - }, - { - "condition": { - "argumentTypes": null, - "id": 17699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9855:9:22", - "subExpression": { - "argumentTypes": null, - "id": 17698, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17674, - "src": "9856:8:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17743, - "nodeType": "Block", - "src": "9969:307:22", - "statements": [ - { - "assignments": [ - 17715 - ], - "declarations": [ - { - "constant": false, - "id": 17715, - "name": "newScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17743, - "src": "9983:24:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17726, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17724, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10058:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17720, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "10041:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17718, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10032:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "10032:8:22", - "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": 17721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10032:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17716, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10010:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10010:21:22", - "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": 17722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "10010:47:22", - "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": 17725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9983:80:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17727, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10081:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17728, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10100:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10100:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10081:38:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17741, - "nodeType": "Block", - "src": "10196:70:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17736, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10212:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17737, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10232:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10212:39:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17740, - "nodeType": "ExpressionStatement", - "src": "10212:39:22" - } - ] - }, - "id": 17742, - "nodeType": "IfStatement", - "src": "10077:189:22", - "trueBody": { - "id": 17735, - "nodeType": "Block", - "src": "10121:69:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17731, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10139:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17732, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10159:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10139:36:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17734, - "nodeType": "ExpressionStatement", - "src": "10139:36:22" - } - ] - } - } - ] - }, - "id": 17744, - "nodeType": "IfStatement", - "src": "9851:425:22", - "trueBody": { - "id": 17713, - "nodeType": "Block", - "src": "9866:97:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17700, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9879:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17709, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9947:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17705, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9930:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17703, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9921:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "9921:8:22", - "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": 17706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9921:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17701, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9899:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9899:21:22", - "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": 17707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9899:47:22", - "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": 17710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9879:73:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17712, - "nodeType": "ExpressionStatement", - "src": "9879:73:22" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 17750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17745, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10286:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17748, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10315:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17746, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "10300:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10300:14:22", - "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": 17749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10300:33:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10286:47:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17751, - "nodeType": "ExpressionStatement", - "src": "10286:47:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17753, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "10355:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17754, - "name": "prevYamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17695, - "src": "10362:21:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17755, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10385:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17752, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "10348:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10348:55:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17757, - "nodeType": "EmitStatement", - "src": "10343:60:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17758, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10420:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17759, - "nodeType": "Return", - "src": "10413:18:22" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is CpiOracleRate / baseCpi", - "id": 17761, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17677, - "modifierName": { - "argumentTypes": null, - "id": 17676, - "name": "onlyRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17080, - "src": "9599:11:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9599:11:22" - } - ], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17675, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17670, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9503:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17669, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9503:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17672, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9526:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17671, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9526:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17674, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9554:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17673, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9554:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9493:80:22" - }, - "returnParameters": { - "id": 17680, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17679, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9628:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9628:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9627:9:22" - }, - "scope": 17762, - "src": "9478:960:22", - "stateMutability": "nonpayable", - "superFunction": 19183, - "visibility": "external" - } - ], - "scope": 17829, - "src": "96:10344:22" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17763, - "name": "YAMToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17762, - "src": "10458:8:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - }, - "id": 17764, - "nodeType": "InheritanceSpecifier", - "src": "10458:8:22" - } - ], - "contractDependencies": [ - 17762, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17828, - "linearizedBaseContracts": [ - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17826, - "nodeType": "Block", - "src": "10885:442:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17778, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "10903:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10917:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10903:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "3020696e697420737570706c79", - "id": 17781, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10920:15:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - }, - "value": "0 init supply" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - } - ], - "id": 17777, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10895:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10895:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17783, - "nodeType": "ExpressionStatement", - "src": "10895:41:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17787, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17766, - "src": "10964:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17788, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17768, - "src": "10971:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17789, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17770, - "src": "10980:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "id": 17784, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19341, - "src": "10947:5:22", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAM_$17828", - "typeString": "contract super YAM" - } - }, - "id": 17786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initialize", - "nodeType": "MemberAccess", - "referencedDeclaration": 17153, - "src": "10947:16:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$__$", - "typeString": "function (string memory,string memory,uint8)" - } - }, - "id": 17790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10947:43:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17791, - "nodeType": "ExpressionStatement", - "src": "10947:43:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17792, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "11001:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11030:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11034:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11030:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17798, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11039:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17799, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11038:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11030:14:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17793, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11014:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11014:15:22", - "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": 17801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11014:31:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11001:44:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17803, - "nodeType": "ExpressionStatement", - "src": "11001:44:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17804, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "11055:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17805, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11069:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11055:25:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17807, - "nodeType": "ExpressionStatement", - "src": "11055:25:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17808, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "11090:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17809, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11110:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11090:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17811, - "nodeType": "ExpressionStatement", - "src": "11090:24:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17812, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "11124:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17814, - "indexExpression": { - "argumentTypes": null, - "id": 17813, - "name": "initial_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17772, - "src": "11137:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11124:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17819, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11170:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11174:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11170:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17820, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11180:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17821, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11179:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11170:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17815, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11154:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11154:15:22", - "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": 17823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11154:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11124:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17825, - "nodeType": "ExpressionStatement", - "src": "11124:62:22" - } - ] - }, - "documentation": "@notice Initialize the new money market\n@param name_ ERC-20 name of this token\n@param symbol_ ERC-20 symbol of this token\n@param decimals_ ERC-20 decimal precision of this token", - "id": 17827, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17766, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10724:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10724:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17768, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10753:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17767, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10753:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17770, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10784:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17769, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10784:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17772, - "name": "initial_owner", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10809:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17771, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10809:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17774, - "name": "initSupply_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10840:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17773, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10840:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10714:151:22" - }, - "returnParameters": { - "id": 17776, - "nodeType": "ParameterList", - "parameters": [], - "src": "10885:0:22" - }, - "scope": 17828, - "src": "10695:632:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17829, - "src": "10442:887:22" - } - ], - "src": "0:11330:22" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.323Z", - "devdoc": { - "methods": { - "_setIncentivizer(address)": { - "params": { - "incentivizer_": "The address of the rebaser contract to use for authentication." - } - }, - "_setPendingGov(address)": { - "params": { - "pendingGov_": "The address of the rebaser contract to use for authentication." - } - }, - "_setRebaser(address)": { - "params": { - "rebaser_": "The address of the rebaser contract to use for authentication." - } - }, - "allowance(address,address)": { - "details": "Function to check the amount of tokens that an owner has allowed to a spender.", - "params": { - "owner_": "The address which owns the funds.", - "spender": "The address which will spend the funds." - }, - "return": "The number of tokens still available for the spender." - }, - "approve(address,uint256)": { - "details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. This method is included for ERC20 compatibility. increaseAllowance and decreaseAllowance should be used instead. Changing an allowance with this method brings the risk that someone may transfer both the old and the new allowance - if they are both greater than zero - if a transfer transaction is mined before the later approve() call is mined.", - "params": { - "spender": "The address which will spend the funds.", - "value": "The amount of tokens to be spent." - } - }, - "balanceOf(address)": { - "params": { - "who": "The address to query." - }, - "return": "The balance of the specified address." - }, - "balanceOfUnderlying(address)": { - "params": { - "who": "The address to query." - }, - "return": "The underlying balance of the specified address." - }, - "decreaseAllowance(address,uint256)": { - "details": "Decrease the amount of tokens that an owner has allowed to a spender.", - "params": { - "spender": "The address which will spend the funds.", - "subtractedValue": "The amount of tokens to decrease the allowance by." - } - }, - "delegate(address)": { - "params": { - "delegatee": "The address to delegate votes to" - } - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "params": { - "delegatee": "The address to delegate votes to", - "expiry": "The time at which to expire the signature", - "nonce": "The contract state required to match the signature", - "r": "Half of the ECDSA signature pair", - "s": "Half of the ECDSA signature pair", - "v": "The recovery byte of the signature" - } - }, - "delegates(address)": { - "params": { - "delegator": "The address to get delegatee for" - } - }, - "getCurrentVotes(address)": { - "params": { - "account": "The address to get votes balance" - }, - "return": "The number of current votes for `account`" - }, - "getPriorVotes(address,uint256)": { - "details": "Block number must be a finalized block or else this function will revert to prevent misinformation.", - "params": { - "account": "The address of the account to check", - "blockNumber": "The block number to get the vote balance at" - }, - "return": "The number of votes the account had as of the given block" - }, - "increaseAllowance(address,uint256)": { - "details": "Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.", - "params": { - "addedValue": "The amount of tokens to increase the allowance by.", - "spender": "The address which will spend the funds." - } - }, - "initialize(string,string,uint8,address,uint256)": { - "params": { - "decimals_": "ERC-20 decimal precision of this token", - "name_": "ERC-20 name of this token", - "symbol_": "ERC-20 symbol of this token" - } - }, - "mint(address,uint256)": { - "details": "Limited to onlyMinter modifier" - }, - "rebase(uint256,uint256,bool)": { - "details": "The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi" - }, - "transfer(address,uint256)": { - "details": "Transfer tokens to a specified address.", - "params": { - "to": "The address to transfer to.", - "value": "The amount to be transferred." - }, - "return": "True on success, false otherwise." - }, - "transferFrom(address,address,uint256)": { - "details": "Transfer tokens from one address to another.", - "params": { - "from": "The address you want to send tokens from.", - "to": "The address you want to transfer to.", - "value": "The amount of tokens to be transferred." - } - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "lets msg.sender accept governance " - }, - "_setIncentivizer(address)": { - "notice": "sets the incentivizer" - }, - "_setPendingGov(address)": { - "notice": "sets the pendingGov" - }, - "_setRebaser(address)": { - "notice": "sets the rebaser" - }, - "balanceOfUnderlying(address)": { - "notice": "Currently returns the internal storage amount" - }, - "delegate(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "notice": "Delegates votes from signatory to `delegatee`" - }, - "delegates(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "getCurrentVotes(address)": { - "notice": "Gets the current votes balance for `account`" - }, - "getPriorVotes(address,uint256)": { - "notice": "Determine the prior number of votes for an account as of a block number" - }, - "initialize(string,string,uint8,address,uint256)": { - "notice": "Initialize the new money market" - }, - "maxScalingFactor()": { - "notice": "Computes the current max scaling factor" - }, - "mint(address,uint256)": { - "notice": "Mints new tokens, increasing totalSupply, initSupply, and a users balance." - }, - "rebase(uint256,uint256,bool)": { - "notice": "Initiates a new rebase operation, provided the minimum time period has elapsed." - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMAMPLPool.json b/build/contracts/YAMAMPLPool.json deleted file mode 100644 index f14c500..0000000 --- a/build/contracts/YAMAMPLPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMAMPLPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "ampl_eth_uni_lp", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ampl_eth_uni_lp\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMAMPLPool.sol\":\"YAMAMPLPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMAMPLPool.sol\":{\"keccak256\":\"0x66b0be8742112d7f5d8159e77a9c3d41c4f69a130220925b002ea8471f6e4a44\",\"urls\":[\"bzz-raw://5745c4d32b8fb1ee6e999e42a7823552ac35d6c5b245b2d89815de11f67585cf\",\"dweb:/ipfs/QmPTUnxXkgNvaPHyJYqn1zu5PgQsazA28Ex8JxDX1BouoZ\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b031990811673c5be99a02c6857f9eac67bbce58df5572498f40c17825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806347088c18146102ea57806370a08231146102f2578063715018a614610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b610232610bb8565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105b9565b610f7c610990565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582029d6438100bdf756fa2b4cc3cc0064a3bfc64bea78888f26487f73d5d43c44db64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806347088c18146102ea57806370a08231146102f2578063715018a614610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b610232610bb8565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105b9565b610f7c610990565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582029d6438100bdf756fa2b4cc3cc0064a3bfc64bea78888f26487f73d5d43c44db64736f6c63430005110032", - "sourceMap": "22407:3901:1:-;;;21553:82;;;-1:-1:-1;;;;;;21553:82:1;;;21592:42;21553:82;;;22482:70;;;;;;22509:42;22482:70;;;22648:10;22621:37;;22702:31;;;;22739:29;;9510:12;-1:-1:-1;;;;;9510:10:1;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:1;-1:-1:-1;;;;;9501:21:1;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:1;;-1:-1:-1;;9537:40:1;22407:3901;;8448:96;8527:10;8448:96;:::o;22407:3901::-;;;;;;;", - "deployedSourceMap": "22407:3901:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22407:3901:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24158:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24158:259:1;;;;:::i;:::-;;;;;;;;;;;;;;;;22913:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22913:42:1;;;;:::i;22482:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:1;;;;:::i;:::-;;20906:33;;;:::i;21728:89::-;;;:::i;22558:41::-;;;:::i;24709:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24709:210:1;;:::i;25474:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25474:832:1;;:::i;25025:443::-;;;:::i;21553:82::-;;;:::i;21823:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21823:108:1;;;;:::i;10445:137::-;;;:::i;22739:29::-;;;:::i;23609:129::-;;;:::i;22850:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22850:57:1;;;;:::i;22621:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;24505:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24505:198:1;;:::i;22774:29::-;;;:::i;23744:408::-;;;:::i;22809:35::-;;;:::i;24925:94::-;;;:::i;22702:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:1;;;;:::i;24158:259::-;24393:16;;;24212:7;24393:16;;;:7;:16;;;;;;;;;24311:22;:31;;;;;;24250:160;;24393:16;24250:121;;24366:4;;24250:94;;24290:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24250:18;24260:7;24250:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24231:179;24158:259;-1:-1:-1;;24158:259:1:o;22913:42::-;;;;;;;;;;;;;:::o;22482:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21728:89::-;21798:12;;21728:89;;:::o;22558:41::-;22593:6;22558:41;:::o;24709:210::-;24763:10;23353:16;:14;:16::i;:::-;23330:20;:39;23396:26;:24;:26::i;:::-;23379:14;:43;23436:21;;;;23432:154;;23492:15;23499:7;23492:6;:15::i;:::-;23473:16;;;;;;;:7;:16;;;;;;;;:34;;;;23555:20;;23521:22;:31;;;;;;:54;23432:154;23235:9;;23216:15;:28;;23208:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24813:1;24804:6;:10;24796:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24846:22;24861:6;24846:14;:22::i;:::-;24883:29;;;;;;;;24893:10;;24883:29;;;;;;;;;;24709:210;;:::o;25474:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25595:1;23353:16;:14;:16::i;:::-;23330:20;:39;23396:26;:24;:26::i;:::-;23379:14;:43;23436:21;;;;23432:154;;23492:15;23499:7;23492:6;:15::i;:::-;23473:16;;;;;;;:7;:16;;;;;;;;:34;;;;23555:20;;23521:22;:31;;;;;;:54;23432:154;25635:9;;25617:15;:27;25613:687;;;25681:12;;25662:15;:31;25658:310;;25724:20;:6;22593;25724:20;:10;:20;:::i;:::-;25711:10;:33;25658:310;;;25799:12;;25779:17;;25799:33;;25816:15;25799:33;:16;:33;:::i;:::-;25779:53;;25848:16;25867:25;25881:10;;25867:9;:13;;:25;;;;:::i;:::-;25848:44;-1:-1:-1;25921:34:1;22593:6;25921:20;:6;25848:44;25921:20;:10;:20;:::i;:34::-;25908:10;:47;-1:-1:-1;;25658:310:1;25996:15;25979:14;:32;;;26038:29;;22593:6;26038:29;:19;:29;:::i;:::-;26023:12;:44;26084:19;;;;;;;;;;;;;;;;;25613:687;;;26145:20;:6;22593;26145:20;:10;:20;:::i;:::-;26132:10;:33;26194:9;;26177:14;:26;;;26230:23;;22593:6;26230:23;:13;:23;:::i;:::-;26215:12;:38;26270:19;;;;;;;;;;;;;;;;;25613:687;21139:1;25474:832;:::o;25025:443::-;25066:10;23353:16;:14;:16::i;:::-;23330:20;:39;23396:26;:24;:26::i;:::-;23379:14;:43;23436:21;;;;23432:154;;23492:15;23499:7;23492:6;:15::i;:::-;23473:16;;;;;;;:7;:16;;;;;;;;:34;;;;23555:20;;23521:22;:31;;;;;;:54;23432:154;23235:9;;23216:15;:28;;23208:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25099:14;25116:18;25123:10;25116:6;:18::i;:::-;25099:35;-1:-1:-1;25148:10:1;;25144:318;;25182:10;25196:1;25174:19;;;:7;:19;;;;;;;;:23;;;25247:3;;25235:37;;;;;;;25174:19;25247:3;;;;25235:35;;:37;;;;;;;;;;;25196:1;25247:3;25235:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25235:37:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25235:37:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25235:37:1;;-1:-1:-1;25286:18:1;25307:37;25337:6;25307:25;:6;25235:37;25307:25;:10;:25;:::i;:37::-;25358:3;;25286:58;;-1:-1:-1;25358:40:1;;:3;;25375:10;25286:58;25358:40;:16;:40;:::i;:::-;25417:34;;;;;;;;25428:10;;25417:34;;;;;;;;;;25144:318;;23267:1;25025:443;:::o;21553:82::-;;;;;;:::o;21823:108::-;21906:18;;21880:7;21906:18;;;:9;:18;;;;;;;21823:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22739:29::-;;;;:::o;23609:129::-;23666:7;23692:39;23701:15;23718:12;;23692:8;:39::i;:::-;23685:46;;23609:129;:::o;22850:57::-;;;;;;;;;;;;;:::o;22621:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;24505:198::-;24556:10;23353:16;:14;:16::i;:::-;23330:20;:39;23396:26;:24;:26::i;:::-;23379:14;:43;23436:21;;;;23432:154;;23492:15;23499:7;23492:6;:15::i;:::-;23473:16;;;;;;;:7;:16;;;;;;;;:34;;;;23555:20;;23521:22;:31;;;;;;:54;23432:154;23235:9;;23216:15;:28;;23208:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24606:1;24597:6;:10;24589:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24636:19;24648:6;24636:11;:19::i;:::-;24670:26;;;;;;;;24677:10;;24670:26;;;;;;;;;;24505:198;;:::o;22774:29::-;;;;:::o;23744:408::-;23791:7;23814:13;:11;:13::i;:::-;23810:76;;-1:-1:-1;23855:20:1;;23848:27;;23810:76;23914:231;23956:175;24117:13;:11;:13::i;:::-;23956:135;24086:4;23956:104;24049:10;;23956:67;24008:14;;23956:26;:24;:26::i;:175::-;23914:20;;;:231;:24;:231;:::i;22809:35::-;;;;:::o;24925:94::-;24960:31;24969:21;24979:10;24969:9;:21::i;:::-;24960:8;:31::i;:::-;25001:11;:9;:11::i;:::-;24925:94::o;22702:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:1:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:1;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22181:222;22247:12;;:24;;22264:6;22247:24;:16;:24;:::i;:::-;22232:12;:39;22315:10;22305:21;;;;:9;:21;;;;;;:33;;22331:6;22305:33;:25;:33;:::i;:::-;22291:10;22281:21;;;;:9;:21;;;;;:57;;;;22348:15;;:48;;22281:21;22348:15;;;;22389:6;22348:28;:48::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:1;;;;;;;;25:18:-1;;61:17;;17776:58:1;182:15:-1;17799:23:1;179:29:-1;160:49;;17750:85:1;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:1;;1848:104;-1:-1:-1;1848:104:1:o;21937:238::-;22000:12;;:24;;22017:6;22000:24;:16;:24;:::i;:::-;21985:12;:39;22068:10;22058:21;;;;:9;:21;;;;;;:33;;22084:6;22058:33;:25;:33;:::i;:::-;22044:10;22034:21;;;;:9;:21;;;;;:57;;;;22101:15;;:67;;22034:21;22101:15;;;;22154:4;22161:6;22101:32;:67::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:1;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:1;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:1:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:1;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:1;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:1;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:1;;;;;;;;25:18:-1;;61:17;;17974:68:1;182:15:-1;17997:27:1;179:29:-1;160:49;;17948:95:1;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:1:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public ampl_eth_uni_lp = IERC20(0xc5be99A02C6857f9Eac67BbCE58DF5572498F40c);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n ampl_eth_uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n ampl_eth_uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMAMPLPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMAMPLPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMAMPLPool.sol", - "exportedSymbols": { - "Address": [ - 571 - ], - "Context": [ - 317 - ], - "IERC20": [ - 497 - ], - "IRewardDistributionRecipient": [ - 822 - ], - "LPTokenWrapper": [ - 938 - ], - "Math": [ - 105 - ], - "Ownable": [ - 429 - ], - "SafeERC20": [ - 787 - ], - "SafeMath": [ - 291 - ], - "YAM": [ - 829 - ], - "YAMAMPLPool": [ - 1357 - ] - }, - "id": 1358, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 38, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 105, - "linearizedBaseContracts": [ - 105 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "1739:38:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 47, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "1756:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 48, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "1761:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 51, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "1769:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:1", - "trueExpression": { - "argumentTypes": null, - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "1765:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 46, - "id": 53, - "nodeType": "Return", - "src": "1749:21:1" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 40, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "1685:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "1696:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 41, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:1" - }, - "returnParameters": { - "id": 46, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 45, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "1730:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 44, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:1" - }, - "scope": 105, - "src": "1672:105:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 71, - "nodeType": "Block", - "src": "1915:37:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 64, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1932:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 65, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1936:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 68, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1944:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:1", - "trueExpression": { - "argumentTypes": null, - "id": 67, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1940:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 63, - "id": 70, - "nodeType": "Return", - "src": "1925:20:1" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 60, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 57, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "1861:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 59, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "1872:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 58, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:1" - }, - "returnParameters": { - "id": 63, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 62, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "1906:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:1" - }, - "scope": 105, - "src": "1848:104:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 103, - "nodeType": "Block", - "src": "2136:119:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 89, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 81, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "2208:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 84, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 87, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 85, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "2218:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 86, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 88, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 90, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "2229:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 91, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 95, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 93, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "2237:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 97, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 98, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 100, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 102, - "nodeType": "Return", - "src": "2200:48:1" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 104, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 77, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 74, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "2082:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "2093:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:1" - }, - "returnParameters": { - "id": 80, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 79, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "2127:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:1" - }, - "scope": 105, - "src": "2065:190:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "1589:668:1" - }, - { - "id": 106, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 291, - "linearizedBaseContracts": [ - 291 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 130, - "nodeType": "Block", - "src": "3212:109:1", - "statements": [ - { - "assignments": [ - 116 - ], - "declarations": [ - { - "constant": false, - "id": 116, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 130, - "src": "3222:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 120, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 117, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "3234:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 118, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "3238:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 122, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "3257:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 123, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "3262:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 127, - "nodeType": "ExpressionStatement", - "src": "3249:46:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 128, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "3313:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 114, - "id": 129, - "nodeType": "Return", - "src": "3306:8:1" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 131, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 108, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 131, - "src": "3158:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 107, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 131, - "src": "3169:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 109, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:1" - }, - "returnParameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 113, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 131, - "src": "3203:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:1" - }, - "scope": 291, - "src": "3145:176:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 146, - "nodeType": "Block", - "src": "3652:67:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 141, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "3673:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 142, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 135, - "src": "3676:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 143, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 140, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 147, - 174 - ], - "referencedDeclaration": 174, - "src": "3669:3:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 139, - "id": 145, - "nodeType": "Return", - "src": "3662:50:1" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 147, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 136, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 133, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 147, - "src": "3598:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 135, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 147, - "src": "3609:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:1" - }, - "returnParameters": { - "id": 139, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 138, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 147, - "src": "3643:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 137, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:1" - }, - "scope": 291, - "src": "3585:134:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 173, - "nodeType": "Block", - "src": "4138:92:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 159, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 151, - "src": "4156:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 160, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "4161:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 162, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "4164:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 158, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 164, - "nodeType": "ExpressionStatement", - "src": "4148:29:1" - }, - { - "assignments": [ - 166 - ], - "declarations": [ - { - "constant": false, - "id": 166, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 173, - "src": "4187:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 170, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 167, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "4199:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 168, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 151, - "src": "4203:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 171, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 166, - "src": "4222:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 157, - "id": 172, - "nodeType": "Return", - "src": "4215:8:1" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 174, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 149, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4056:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 148, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 151, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4067:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 150, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 153, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4078:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 152, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:1" - }, - "returnParameters": { - "id": 157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4129:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:1" - }, - "scope": 291, - "src": "4043:187:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 207, - "nodeType": "Block", - "src": "4537:392:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 183, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4769:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 189, - "nodeType": "IfStatement", - "src": "4765:45:1", - "trueBody": { - "id": 188, - "nodeType": "Block", - "src": "4777:33:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 182, - "id": 187, - "nodeType": "Return", - "src": "4791:8:1" - } - ] - } - }, - { - "assignments": [ - 191 - ], - "declarations": [ - { - "constant": false, - "id": 191, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 207, - "src": "4820:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 195, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 192, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4832:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 193, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "4836:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 197, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 191, - "src": "4855:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 198, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4859:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 200, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "4864:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 196, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 204, - "nodeType": "ExpressionStatement", - "src": "4847:56:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 205, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 191, - "src": "4921:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 182, - "id": 206, - "nodeType": "Return", - "src": "4914:8:1" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 208, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 179, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 176, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "4483:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 178, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "4494:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 177, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:1" - }, - "returnParameters": { - "id": 182, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 181, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "4528:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:1" - }, - "scope": 291, - "src": "4470:459:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 223, - "nodeType": "Block", - "src": "5451:63:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 218, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "5472:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 219, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "5475:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 217, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 224, - 251 - ], - "referencedDeclaration": 251, - "src": "5468:3:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 216, - "id": 222, - "nodeType": "Return", - "src": "5461:46:1" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 224, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 210, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 224, - "src": "5397:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 212, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 224, - "src": "5408:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 211, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:1" - }, - "returnParameters": { - "id": 216, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 215, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 224, - "src": "5442:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 214, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:1" - }, - "scope": 291, - "src": "5384:130:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 250, - "nodeType": "Block", - "src": "6124:243:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 236, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 228, - "src": "6208:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 239, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 230, - "src": "6215:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 235, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 241, - "nodeType": "ExpressionStatement", - "src": "6200:28:1" - }, - { - "assignments": [ - 243 - ], - "declarations": [ - { - "constant": false, - "id": 243, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 250, - "src": "6238:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 247, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 244, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 226, - "src": "6250:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 245, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 228, - "src": "6254:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 248, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "6359:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 234, - "id": 249, - "nodeType": "Return", - "src": "6352:8:1" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 251, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 231, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 226, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6042:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 228, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6053:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 227, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 230, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6064:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 229, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:1" - }, - "returnParameters": { - "id": 234, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 233, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6115:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:1" - }, - "scope": 291, - "src": "6029:338:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 266, - "nodeType": "Block", - "src": "6878:61:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 261, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "6899:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 262, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "6902:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 260, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 267, - 290 - ], - "referencedDeclaration": 290, - "src": "6895:3:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 259, - "id": 265, - "nodeType": "Return", - "src": "6888:44:1" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 267, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 256, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 253, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 267, - "src": "6824:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 255, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 267, - "src": "6835:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 254, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:1" - }, - "returnParameters": { - "id": 259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 267, - "src": "6869:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:1" - }, - "scope": 291, - "src": "6811:128:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 289, - "nodeType": "Block", - "src": "7538:68:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 279, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7556:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 282, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7564:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 278, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 284, - "nodeType": "ExpressionStatement", - "src": "7548:29:1" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 285, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 269, - "src": "7594:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 286, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7598:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 277, - "id": 288, - "nodeType": "Return", - "src": "7587:12:1" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 290, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 269, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7456:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 268, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 271, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7467:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 270, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 273, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7478:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 272, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:1" - }, - "returnParameters": { - "id": 277, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 276, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7529:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 275, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:1" - }, - "scope": 291, - "src": "7443:163:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "2900:4708:1" - }, - { - "id": 292, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 317, - "linearizedBaseContracts": [ - 317 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 295, - "nodeType": "Block", - "src": "8386:3:1", - "statements": [] - }, - "documentation": null, - "id": 296, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 293, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:1" - }, - "returnParameters": { - "id": 294, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:1" - }, - "scope": 317, - "src": "8362:27:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 304, - "nodeType": "Block", - "src": "8510:34:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 301, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 300, - "id": 303, - "nodeType": "Return", - "src": "8520:17:1" - } - ] - }, - "documentation": null, - "id": 305, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:1" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 305, - "src": "8493:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 298, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:1" - }, - "scope": 317, - "src": "8448:96:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 315, - "nodeType": "Block", - "src": "8607:165:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 310, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19263, - "src": "8617:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$317", - "typeString": "contract Context" - } - }, - "id": 311, - "nodeType": "ExpressionStatement", - "src": "8617:4:1" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 312, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 309, - "id": 314, - "nodeType": "Return", - "src": "8750:15:1" - } - ] - }, - "documentation": null, - "id": 316, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 306, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:1" - }, - "returnParameters": { - "id": 309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 308, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 316, - "src": "8593:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 307, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:1" - }, - "scope": 317, - "src": "8550:222:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "8185:589:1" - }, - { - "id": 318, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:1" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 319, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 317, - "src": "9238:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$317", - "typeString": "contract Context" - } - }, - "id": 320, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:1" - } - ], - "contractDependencies": [ - 317 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 429, - "linearizedBaseContracts": [ - 429, - 317 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 322, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 429, - "src": "9252:22:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 321, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 328, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 324, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "9308:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 323, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 326, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "9339:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 325, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:1" - }, - "src": "9281:84:1" - }, - { - "body": { - "id": 343, - "nodeType": "Block", - "src": "9491:93:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 331, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "9501:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 332, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "9510:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 335, - "nodeType": "ExpressionStatement", - "src": "9501:21:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566: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": 337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 340, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "9570:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 336, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "9537:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 342, - "nodeType": "EmitStatement", - "src": "9532:45:1" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 344, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 329, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:1" - }, - "returnParameters": { - "id": 330, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:1" - }, - "scope": 429, - "src": "9467:117:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 351, - "nodeType": "Block", - "src": "9707:30:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 349, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "9724:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 348, - "id": 350, - "nodeType": "Return", - "src": "9717:13:1" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 352, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 345, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:1" - }, - "returnParameters": { - "id": 348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 347, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 352, - "src": "9698:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:1" - }, - "scope": 429, - "src": "9660:77:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 361, - "nodeType": "Block", - "src": "9846:82:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 355, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "9864:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 354, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 359, - "nodeType": "ExpressionStatement", - "src": "9856:54:1" - }, - { - "id": 360, - "nodeType": "PlaceholderStatement", - "src": "9920:1:1" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 362, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 353, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:1" - }, - "src": "9825:103:1", - "visibility": "internal" - }, - { - "body": { - "id": 372, - "nodeType": "Block", - "src": "10057:46:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 367, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10074:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 369, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "10090:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 366, - "id": 371, - "nodeType": "Return", - "src": "10067:29:1" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 373, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 363, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:1" - }, - "returnParameters": { - "id": 366, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 365, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "10051:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 364, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:1" - }, - "scope": 429, - "src": "10011:92:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 391, - "nodeType": "Block", - "src": "10491:91:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 379, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "10527:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543: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": 380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 378, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "10506:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 384, - "nodeType": "EmitStatement", - "src": "10501:45:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 385, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "10556:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573: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": 386, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 390, - "nodeType": "ExpressionStatement", - "src": "10556:19:1" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 392, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 376, - "modifierName": { - "argumentTypes": null, - "id": 375, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "10481:9:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:1" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 374, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:1" - }, - "returnParameters": { - "id": 377, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:1" - }, - "scope": 429, - "src": "10445:137:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 403, - "nodeType": "Block", - "src": "10793:45:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 400, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 394, - "src": "10822:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 399, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "10803:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 402, - "nodeType": "ExpressionStatement", - "src": "10803:28:1" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 404, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 397, - "modifierName": { - "argumentTypes": null, - "id": 396, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "10783:9:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:1" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 395, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 394, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 404, - "src": "10758:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 393, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:1" - }, - "returnParameters": { - "id": 398, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:1" - }, - "scope": 429, - "src": "10731:107:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 427, - "nodeType": "Block", - "src": "10994:170:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 410, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "11012:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032: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": 411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 413, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 409, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 417, - "nodeType": "ExpressionStatement", - "src": "11004:73:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 419, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "11113:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 420, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "11121:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 418, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "11092:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 422, - "nodeType": "EmitStatement", - "src": "11087:43:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 423, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "11140:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 424, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "11149:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 426, - "nodeType": "ExpressionStatement", - "src": "11140:17:1" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 406, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 428, - "src": "10967:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 405, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:1" - }, - "returnParameters": { - "id": 408, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:1" - }, - "scope": 429, - "src": "10939:225:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "9218:1948:1" - }, - { - "id": 430, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 497, - "linearizedBaseContracts": [ - 497 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 435, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 431, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:1" - }, - "returnParameters": { - "id": 434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 433, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 435, - "src": "11541:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 432, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:1" - }, - "scope": 497, - "src": "11495:55:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 442, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 438, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 437, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 442, - "src": "11652:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 436, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:1" - }, - "returnParameters": { - "id": 441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 442, - "src": "11692:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:1" - }, - "scope": 497, - "src": "11633:68:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 451, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 447, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 444, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 451, - "src": "11939:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 443, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 446, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 451, - "src": "11958:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 445, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:1" - }, - "returnParameters": { - "id": 450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 449, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 451, - "src": "11992:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 448, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:1" - }, - "scope": 497, - "src": "11921:77:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 460, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 456, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 453, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 460, - "src": "12292:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 452, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 455, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 460, - "src": "12307:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 454, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:1" - }, - "returnParameters": { - "id": 459, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 458, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 460, - "src": "12347:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 457, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:1" - }, - "scope": 497, - "src": "12273:83:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 469, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 462, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 469, - "src": "13026:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 464, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 469, - "src": "13043:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 463, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:1" - }, - "returnParameters": { - "id": 468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 467, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 469, - "src": "13077:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 466, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:1" - }, - "scope": 497, - "src": "13009:74:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 480, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 476, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 471, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13412:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 470, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 473, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13428:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 472, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 475, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13447:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:1" - }, - "returnParameters": { - "id": 479, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 478, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13481:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 477, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:1" - }, - "scope": 497, - "src": "13390:97:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 488, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 487, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 482, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 488, - "src": "13671:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 481, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 484, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 488, - "src": "13693:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 483, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 486, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 488, - "src": "13713:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 485, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:1" - }, - "src": "13656:72:1" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 496, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 495, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 490, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 496, - "src": "13902:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 489, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 492, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 496, - "src": "13925:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 491, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 494, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 496, - "src": "13950:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 493, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:1" - }, - "src": "13887:78:1" - } - ], - "scope": 1358, - "src": "11401:2566:1" - }, - { - "id": 498, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 571, - "linearizedBaseContracts": [ - 571 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 522, - "nodeType": "Block", - "src": "14644:731:1", - "statements": [ - { - "assignments": [ - 506 - ], - "declarations": [ - { - "constant": false, - "id": 506, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 522, - "src": "15083:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 505, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 507, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:1" - }, - { - "assignments": [ - 509 - ], - "declarations": [ - { - "constant": false, - "id": 509, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 522, - "src": "15109:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 508, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 511, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:1" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 506, - "isOffset": false, - "isSlot": false, - "src": "15274:8:1", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 500, - "isOffset": false, - "isSlot": false, - "src": "15298:7:1", - "valueSize": 1 - } - } - ], - "id": 512, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 513, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "15325:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 516, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "15344:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 517, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "15356:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 520, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 504, - "id": 521, - "nodeType": "Return", - "src": "15317:51:1" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 523, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 501, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 500, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 523, - "src": "14598:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 499, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:1" - }, - "returnParameters": { - "id": 504, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 503, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 523, - "src": "14638:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 502, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:1" - }, - "scope": 571, - "src": "14578:797:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 536, - "nodeType": "Block", - "src": "15660:49:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 532, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 525, - "src": "15693:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 529, - "id": 535, - "nodeType": "Return", - "src": "15670:32:1" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 537, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 526, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 525, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "15603:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 524, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:1" - }, - "returnParameters": { - "id": 529, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 528, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "15643:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 527, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:1" - }, - "scope": 571, - "src": "15584:125:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 569, - "nodeType": "Block", - "src": "16737:294:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 546, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19269, - "src": "16763:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$571", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$571", - "typeString": "library Address" - } - ], - "id": 545, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 549, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "16780:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 544, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 553, - "nodeType": "ExpressionStatement", - "src": "16747:73:1" - }, - { - "assignments": [ - 555, - null - ], - "declarations": [ - { - "constant": false, - "id": 555, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 569, - "src": "16886:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 554, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 563, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 559, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "16925:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 556, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 539, - "src": "16904:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14: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": 558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28: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": 562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 565, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "16954:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 564, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 568, - "nodeType": "ExpressionStatement", - "src": "16946:78:1" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 570, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 542, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 539, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 570, - "src": "16685:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 538, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 541, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 570, - "src": "16712:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 540, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:1" - }, - "returnParameters": { - "id": 543, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:1" - }, - "scope": 571, - "src": "16666:365:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "14114:2919:1" - }, - { - "id": 572, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 787, - "linearizedBaseContracts": [ - 787 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 575, - "libraryName": { - "contractScope": null, - "id": 573, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 291, - "src": "17610:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$291", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:1", - "typeName": { - "id": 574, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 578, - "libraryName": { - "contractScope": null, - "id": 576, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 571, - "src": "17642:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$571", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:1", - "typeName": { - "id": 577, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 599, - "nodeType": "Block", - "src": "17740:102:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 588, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 580, - "src": "17769:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 591, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 580, - "src": "17799:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 451, - "src": "17799:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 594, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 582, - "src": "17824:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 595, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 584, - "src": "17828:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 589, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 587, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "17750:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 598, - "nodeType": "ExpressionStatement", - "src": "17750:85:1" - } - ] - }, - "documentation": null, - "id": 600, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 585, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 580, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 600, - "src": "17690:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 579, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "17690:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 582, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 600, - "src": "17704:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 584, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 600, - "src": "17716:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 583, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:1" - }, - "returnParameters": { - "id": 586, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:1" - }, - "scope": 787, - "src": "17668:174:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 624, - "nodeType": "Block", - "src": "17938:112:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 612, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 602, - "src": "17967:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 615, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 602, - "src": "17997:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 480, - "src": "17997:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 618, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 604, - "src": "18026:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 619, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "18032:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 620, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 608, - "src": "18036:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 613, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 611, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "17948:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 623, - "nodeType": "ExpressionStatement", - "src": "17948:95:1" - } - ] - }, - "documentation": null, - "id": 625, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 609, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 602, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17874:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 601, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "17874:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 604, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17888:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 606, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17902:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 605, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 608, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17914:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:1" - }, - "returnParameters": { - "id": 610, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:1" - }, - "scope": 787, - "src": "17848:202:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 665, - "nodeType": "Block", - "src": "18132:536:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 635, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 631, - "src": "18421:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 636, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 638, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 642, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19271, - "src": "18461:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - ], - "id": 641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 644, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 629, - "src": "18468:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 639, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "18437:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 460, - "src": "18437:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 648, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 634, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 652, - "nodeType": "ExpressionStatement", - "src": "18412:150:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 654, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "18591:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 657, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "18621:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 469, - "src": "18621:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 660, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 629, - "src": "18645:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 661, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 631, - "src": "18654:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 655, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 653, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "18572:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 664, - "nodeType": "ExpressionStatement", - "src": "18572:89:1" - } - ] - }, - "documentation": null, - "id": 666, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 632, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 627, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "18077:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 626, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "18077:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 629, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "18091:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 628, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 631, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "18108:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 630, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:1" - }, - "returnParameters": { - "id": 633, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:1" - }, - "scope": 787, - "src": "18056:612:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 700, - "nodeType": "Block", - "src": "18760:196:1", - "statements": [ - { - "assignments": [ - 676 - ], - "declarations": [ - { - "constant": false, - "id": 676, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 700, - "src": "18770:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 675, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 687, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 685, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "18837:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 680, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19271, - "src": "18817:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - ], - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 682, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "18824:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 677, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "18793:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 460, - "src": "18793:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "18793: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": 686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 689, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "18872:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 692, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "18902:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 469, - "src": "18902:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 695, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "18926:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 696, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 676, - "src": "18935:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 690, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 688, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "18853:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 699, - "nodeType": "ExpressionStatement", - "src": "18853:96:1" - } - ] - }, - "documentation": null, - "id": 701, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 673, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 668, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 701, - "src": "18705:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 667, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "18705:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 670, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 701, - "src": "18719:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 669, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 672, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 701, - "src": "18736:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 671, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:1" - }, - "returnParameters": { - "id": 674, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:1" - }, - "scope": 787, - "src": "18674:282:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 736, - "nodeType": "Block", - "src": "19048:241:1", - "statements": [ - { - "assignments": [ - 711 - ], - "declarations": [ - { - "constant": false, - "id": 711, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 736, - "src": "19058:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 723, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 720, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "19125:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 715, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19271, - "src": "19105:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - ], - "id": 714, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 717, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 705, - "src": "19112:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 712, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "19081:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 460, - "src": "19081:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 174, - "src": "19081:43:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 725, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "19205:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 728, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "19235:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 469, - "src": "19235:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 731, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 705, - "src": "19259:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 732, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 711, - "src": "19268:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 726, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 724, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "19186:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 735, - "nodeType": "ExpressionStatement", - "src": "19186:96:1" - } - ] - }, - "documentation": null, - "id": 737, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 708, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 703, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 737, - "src": "18993:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 702, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "18993:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 705, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 737, - "src": "19007:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 704, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 707, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 737, - "src": "19024:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 706, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:1" - }, - "returnParameters": { - "id": 709, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:1" - }, - "scope": 787, - "src": "18962:327:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 785, - "nodeType": "Block", - "src": "19741:1026:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 746, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 739, - "src": "20275:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - ], - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 523, - "src": "20267:25:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 744, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 752, - "nodeType": "ExpressionStatement", - "src": "20259:71:1" - }, - { - "assignments": [ - 754, - 756 - ], - "declarations": [ - { - "constant": false, - "id": 754, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 785, - "src": "20401:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 753, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 756, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 785, - "src": "20415:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 755, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 763, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 761, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 741, - "src": "20462:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 758, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 739, - "src": "20450:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - ], - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19: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": 762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 765, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "20485:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 764, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 768, - "nodeType": "ExpressionStatement", - "src": "20477:52:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 772, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 769, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 756, - "src": "20544:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 784, - "nodeType": "IfStatement", - "src": "20540:221:1", - "trueBody": { - "id": 783, - "nodeType": "Block", - "src": "20567:194:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 776, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 756, - "src": "20684:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 774, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 775, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 773, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 782, - "nodeType": "ExpressionStatement", - "src": "20665:85:1" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 786, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 742, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 739, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 786, - "src": "19700:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 738, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "19700:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 741, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 786, - "src": "19714:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 740, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:1" - }, - "returnParameters": { - "id": 743, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:1" - }, - "scope": 787, - "src": "19672:1095:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 1358, - "src": "17580:3189:1" - }, - { - "id": 788, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:1" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 789, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 429, - "src": "20892:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$429", - "typeString": "contract Ownable" - } - }, - "id": 790, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:1" - } - ], - "contractDependencies": [ - 317, - 429 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 822, - "linearizedBaseContracts": [ - 822, - 429, - 317 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 792, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 822, - "src": "20906:33:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 791, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 797, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 795, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 794, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 797, - "src": "20974:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 793, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:1" - }, - "returnParameters": { - "id": 796, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:1" - }, - "scope": 822, - "src": "20946:53:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 808, - "nodeType": "Block", - "src": "21039:108:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 800, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "21057:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 802, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "21073:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 804, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 806, - "nodeType": "ExpressionStatement", - "src": "21049:80:1" - }, - { - "id": 807, - "nodeType": "PlaceholderStatement", - "src": "21139:1:1" - } - ] - }, - "documentation": null, - "id": 809, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 798, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:1" - }, - "src": "21005:142:1", - "visibility": "internal" - }, - { - "body": { - "id": 820, - "nodeType": "Block", - "src": "21252:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 816, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "21262:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 817, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 811, - "src": "21283:19:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 819, - "nodeType": "ExpressionStatement", - "src": "21262:40:1" - } - ] - }, - "documentation": null, - "id": 821, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 814, - "modifierName": { - "argumentTypes": null, - "id": 813, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "21238:9:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:1" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 812, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 811, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 821, - "src": "21184:27:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 810, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:1" - }, - "returnParameters": { - "id": 815, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:1" - }, - "scope": 822, - "src": "21153:156:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1358, - "src": "20851:460:1" - }, - { - "id": 823, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 829, - "linearizedBaseContracts": [ - 829 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 828, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 824, - "nodeType": "ParameterList", - "parameters": [], - "src": "21423:2:1" - }, - "returnParameters": { - "id": 827, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 826, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 828, - "src": "21444:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 825, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21444:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21443:9:1" - }, - "scope": 829, - "src": "21397:56:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1358, - "src": "21377:78:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 938, - "linearizedBaseContracts": [ - 938 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 832, - "libraryName": { - "contractScope": null, - "id": 830, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 291, - "src": "21494:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$291", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:1", - "typeName": { - "id": 831, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 835, - "libraryName": { - "contractScope": null, - "id": 833, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 787, - "src": "21526:9:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:1", - "typeName": { - "contractScope": null, - "id": 834, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "21540:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 840, - "name": "ampl_eth_uni_lp", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "21553:82:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 836, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "21553:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307863356265393941303243363835376639456163363742624345353844463535373234393846343063", - "id": 838, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21592:42:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xc5be99A02C6857f9Eac67BbCE58DF5572498F40c" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 837, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 497, - "src": "21585:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$497_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 839, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21585:50:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 842, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "21642:28:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21642:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 846, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "21676:45:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 845, - "keyType": { - "id": 843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21684:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21676:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 844, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21695:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 853, - "nodeType": "Block", - "src": "21781:36:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 851, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "21798:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 850, - "id": 852, - "nodeType": "Return", - "src": "21791:19:1" - } - ] - }, - "documentation": null, - "id": 854, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 847, - "nodeType": "ParameterList", - "parameters": [], - "src": "21748:2:1" - }, - "returnParameters": { - "id": 850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 849, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 854, - "src": "21772:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 848, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21772:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21771:9:1" - }, - "scope": 938, - "src": "21728:89:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 865, - "nodeType": "Block", - "src": "21889:42:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 861, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "21906:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 863, - "indexExpression": { - "argumentTypes": null, - "id": 862, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 856, - "src": "21916:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21906:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 860, - "id": 864, - "nodeType": "Return", - "src": "21899:25:1" - } - ] - }, - "documentation": null, - "id": 866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 856, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 866, - "src": "21842:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 855, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21842:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21841:17:1" - }, - "returnParameters": { - "id": 860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 859, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 866, - "src": "21880:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21880:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21879:9:1" - }, - "scope": 938, - "src": "21823:108:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 902, - "nodeType": "Block", - "src": "21975:200:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 871, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "21985:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 874, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "22017:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 872, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "22000:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "22000:16: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": 875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22000:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21985:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 877, - "nodeType": "ExpressionStatement", - "src": "21985:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 878, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22034:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 881, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 879, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22044:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22044:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22034:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 887, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "22084:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 882, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22058:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 885, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 883, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22068:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22068:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22058:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "22058:25: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": 888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22058:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22034:57:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 890, - "nodeType": "ExpressionStatement", - "src": "22034:57:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 894, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22134:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22134:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 897, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19277, - "src": "22154:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$938", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$938", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22146:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22146:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 899, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "22161: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, - "id": 891, - "name": "ampl_eth_uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "22101:15:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 625, - "src": "22101:32:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$497_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22101:67:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 901, - "nodeType": "ExpressionStatement", - "src": "22101:67:1" - } - ] - }, - "documentation": null, - "id": 903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 868, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 903, - "src": "21952:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21952:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21951:16:1" - }, - "returnParameters": { - "id": 870, - "nodeType": "ParameterList", - "parameters": [], - "src": "21975:0:1" - }, - "scope": 938, - "src": "21937:238:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 936, - "nodeType": "Block", - "src": "22222:181:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 908, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "22232:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 911, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 905, - "src": "22264:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 909, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "22247:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "22247:16: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": 912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22247:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22232:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 914, - "nodeType": "ExpressionStatement", - "src": "22232:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 915, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22281:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 918, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 916, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22291:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22291:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22281:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 924, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 905, - "src": "22331:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 919, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22305:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 922, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 920, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22315:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22315:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22305:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "22305:25: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": 925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22305:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22281:57:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 927, - "nodeType": "ExpressionStatement", - "src": "22281:57:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 931, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22377:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 932, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22377:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 933, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 905, - "src": "22389: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, - "id": 928, - "name": "ampl_eth_uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "22348:15:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 600, - "src": "22348:28:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$497_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22348:48:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 935, - "nodeType": "ExpressionStatement", - "src": "22348:48:1" - } - ] - }, - "documentation": null, - "id": 937, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 905, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "22199:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22199:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22198:16:1" - }, - "returnParameters": { - "id": 907, - "nodeType": "ParameterList", - "parameters": [], - "src": "22222:0:1" - }, - "scope": 938, - "src": "22181:222:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 1358, - "src": "21458:947:1" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 939, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 938, - "src": "22431:14:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$938", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 940, - "nodeType": "InheritanceSpecifier", - "src": "22431:14:1" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 941, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 822, - "src": "22447:28:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$822", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 942, - "nodeType": "InheritanceSpecifier", - "src": "22447:28:1" - } - ], - "contractDependencies": [ - 317, - 429, - 822, - 938 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1357, - "linearizedBaseContracts": [ - 1357, - 822, - 429, - 317, - 938 - ], - "name": "YAMAMPLPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 947, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22482:70:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 943, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "22482:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 945, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22509:42:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 944, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 497, - "src": "22502:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$497_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22502:50:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 950, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22558:41:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 948, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22593:6:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 953, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22621:37:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 951, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22621:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22648:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 956, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22702:31:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 954, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22702:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 955, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22732:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 959, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22739:29:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 957, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22739:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 958, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22767:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 961, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22774:29:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 960, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22774:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 963, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22809:35:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 962, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22809:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 967, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22850:57:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 966, - "keyType": { - "id": 964, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22858:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22850:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 965, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22869:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 971, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22913:42:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 970, - "keyType": { - "id": 968, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22921:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22913:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 969, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22932:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 975, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 973, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 975, - "src": "22980:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 972, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22980:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22979:16:1" - }, - "src": "22962:34:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 981, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 980, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 977, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 981, - "src": "23014:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 976, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23014:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 979, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 981, - "src": "23036:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23036:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23013:38:1" - }, - "src": "23001:51:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 987, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 983, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 987, - "src": "23073:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 982, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23073:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 985, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 987, - "src": "23095:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 984, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23095:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23072:38:1" - }, - "src": "23057:54:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 993, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 989, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "23133:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23133:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 991, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "23155:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 990, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23155:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23132:38:1" - }, - "src": "23116:55:1" - }, - { - "body": { - "id": 1004, - "nodeType": "Block", - "src": "23198:77:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 996, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23216:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23216:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 998, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "23235:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23216:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 1000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23245:11:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 995, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23208:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23208:49:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1002, - "nodeType": "ExpressionStatement", - "src": "23208:49:1" - }, - { - "id": 1003, - "nodeType": "PlaceholderStatement", - "src": "23267:1:1" - } - ] - }, - "documentation": null, - "id": 1005, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 994, - "nodeType": "ParameterList", - "parameters": [], - "src": "23196:2:1" - }, - "src": "23177:98:1", - "visibility": "internal" - }, - { - "body": { - "id": 1041, - "nodeType": "Block", - "src": "23320:283:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1009, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23330:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1010, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1088, - "src": "23353:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23353:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23330:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1013, - "nodeType": "ExpressionStatement", - "src": "23330:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1014, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "23379:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1015, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "23396:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23396:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23379:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1018, - "nodeType": "ExpressionStatement", - "src": "23379:43:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1019, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23436:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1021, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23455: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": 1020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23447:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23447:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23436:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1039, - "nodeType": "IfStatement", - "src": "23432:154:1", - "trueBody": { - "id": 1038, - "nodeType": "Block", - "src": "23459:127:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1024, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "23473:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1026, - "indexExpression": { - "argumentTypes": null, - "id": 1025, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23481:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23473:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1028, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23499:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1027, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1117, - "src": "23492:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23492:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23473:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1031, - "nodeType": "ExpressionStatement", - "src": "23473:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1032, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 967, - "src": "23521:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1034, - "indexExpression": { - "argumentTypes": null, - "id": 1033, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23544:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23521:31:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1035, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23555:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23521:54:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1037, - "nodeType": "ExpressionStatement", - "src": "23521:54:1" - } - ] - } - }, - { - "id": 1040, - "nodeType": "PlaceholderStatement", - "src": "23595:1:1" - } - ] - }, - "documentation": null, - "id": 1042, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1007, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1042, - "src": "23303:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23303:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23302:17:1" - }, - "src": "23281:322:1", - "visibility": "internal" - }, - { - "body": { - "id": 1054, - "nodeType": "Block", - "src": "23675:63:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1049, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23701:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23701:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1051, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "23718:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1047, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 105, - "src": "23692:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$105_$", - "typeString": "type(library Math)" - } - }, - "id": 1048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 72, - "src": "23692:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23692:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1046, - "id": 1053, - "nodeType": "Return", - "src": "23685:46:1" - } - ] - }, - "documentation": null, - "id": 1055, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1043, - "nodeType": "ParameterList", - "parameters": [], - "src": "23642:2:1" - }, - "returnParameters": { - "id": 1046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1045, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1055, - "src": "23666:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23666:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23665:9:1" - }, - "scope": 1357, - "src": "23609:129:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1087, - "nodeType": "Block", - "src": "23800:352:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1060, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 854, - "src": "23814:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23814:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23831:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23814:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1067, - "nodeType": "IfStatement", - "src": "23810:76:1", - "trueBody": { - "id": 1066, - "nodeType": "Block", - "src": "23834:52:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1064, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23855:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1059, - "id": 1065, - "nodeType": "Return", - "src": "23848:27:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1082, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 854, - "src": "24117:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24117:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 1079, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24086:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1076, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "24049:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1073, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "24008:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1070, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "23956:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "23956:51: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": 1074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:67:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "23956:92: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": 1077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:104:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "23956:129: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": 1080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:135:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "23956:160: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": 1084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:175:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1068, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23914:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "23914:24: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": 1085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23914:231:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1059, - "id": 1086, - "nodeType": "Return", - "src": "23895:250:1" - } - ] - }, - "documentation": null, - "id": 1088, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1056, - "nodeType": "ParameterList", - "parameters": [], - "src": "23767:2:1" - }, - "returnParameters": { - "id": 1059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1058, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1088, - "src": "23791:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1057, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23791:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23790:9:1" - }, - "scope": 1357, - "src": "23744:408:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1116, - "nodeType": "Block", - "src": "24221:196:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1111, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "24393:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1113, - "indexExpression": { - "argumentTypes": null, - "id": 1112, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1090, - "src": "24401:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24393:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 1108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24366:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1102, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 967, - "src": "24311:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1104, - "indexExpression": { - "argumentTypes": null, - "id": 1103, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1090, - "src": "24334:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24311:31:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1099, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1088, - "src": "24290:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24290:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "24290:20: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": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24290:53:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1096, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1090, - "src": "24260:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1095, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "24250:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "24250:39: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": 1106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:94:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "24250:115: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": 1109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:121:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "24250:142: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": 1114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:160:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1094, - "id": 1115, - "nodeType": "Return", - "src": "24231:179:1" - } - ] - }, - "documentation": null, - "id": 1117, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1091, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1090, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1117, - "src": "24174:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24174:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24173:17:1" - }, - "returnParameters": { - "id": 1094, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1093, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1117, - "src": "24212:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1092, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24212:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24211:9:1" - }, - "scope": 1357, - "src": "24158:259:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1147, - "nodeType": "Block", - "src": "24579:124:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1129, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "24597:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24606:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24597:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 1132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24609:16:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 1128, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24589:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24589:37:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1134, - "nodeType": "ExpressionStatement", - "src": "24589:37:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1138, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "24648:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1135, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19280, - "src": "24636:5:1", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMAMPLPool_$1357", - "typeString": "contract super YAMAMPLPool" - } - }, - "id": 1137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 903, - "src": "24636:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24636:19:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1140, - "nodeType": "ExpressionStatement", - "src": "24636:19:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1142, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24677:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24677:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1144, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "24689:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1141, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 981, - "src": "24670:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24670:26:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1146, - "nodeType": "EmitStatement", - "src": "24665:31:1" - } - ] - }, - "documentation": null, - "id": 1148, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1122, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24556:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24556:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1124, - "modifierName": { - "argumentTypes": null, - "id": 1121, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "24543:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24543:24:1" - }, - { - "arguments": null, - "id": 1126, - "modifierName": { - "argumentTypes": null, - "id": 1125, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "24568:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24568:10:1" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1119, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1148, - "src": "24520:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1118, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24520:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24519:16:1" - }, - "returnParameters": { - "id": 1127, - "nodeType": "ParameterList", - "parameters": [], - "src": "24579:0:1" - }, - "scope": 1357, - "src": "24505:198:1", - "stateMutability": "nonpayable", - "superFunction": 903, - "visibility": "public" - }, - { - "body": { - "id": 1178, - "nodeType": "Block", - "src": "24786:133:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1160, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "24804:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24813:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24804:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 1163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24816:19:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 1159, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24796:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24796:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1165, - "nodeType": "ExpressionStatement", - "src": "24796:40:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1169, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "24861:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1166, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19280, - "src": "24846:5:1", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMAMPLPool_$1357", - "typeString": "contract super YAMAMPLPool" - } - }, - "id": 1168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 937, - "src": "24846:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24846:22:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1171, - "nodeType": "ExpressionStatement", - "src": "24846:22:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1173, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24893:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24893:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1175, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "24905:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1172, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "24883:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24883:29:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1177, - "nodeType": "EmitStatement", - "src": "24878:34:1" - } - ] - }, - "documentation": null, - "id": 1179, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24763:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24763:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1155, - "modifierName": { - "argumentTypes": null, - "id": 1152, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "24750:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24750:24:1" - }, - { - "arguments": null, - "id": 1157, - "modifierName": { - "argumentTypes": null, - "id": 1156, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "24775:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24775:10:1" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1150, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1179, - "src": "24727:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1149, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24727:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24726:16:1" - }, - "returnParameters": { - "id": 1158, - "nodeType": "ParameterList", - "parameters": [], - "src": "24786:0:1" - }, - "scope": 1357, - "src": "24709:210:1", - "stateMutability": "nonpayable", - "superFunction": 937, - "visibility": "public" - }, - { - "body": { - "id": 1192, - "nodeType": "Block", - "src": "24950:69:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1184, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24979:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24979:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1183, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "24969:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1182, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1179 - ], - "referencedDeclaration": 1179, - "src": "24960:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24960:31:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1188, - "nodeType": "ExpressionStatement", - "src": "24960:31:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1189, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1258, - "src": "25001:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 1190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25001:11:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1191, - "nodeType": "ExpressionStatement", - "src": "25001:11:1" - } - ] - }, - "documentation": null, - "id": 1193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1180, - "nodeType": "ParameterList", - "parameters": [], - "src": "24938:2:1" - }, - "returnParameters": { - "id": 1181, - "nodeType": "ParameterList", - "parameters": [], - "src": "24950:0:1" - }, - "scope": 1357, - "src": "24925:94:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 1257, - "nodeType": "Block", - "src": "25089:379:1", - "statements": [ - { - "assignments": [ - 1203 - ], - "declarations": [ - { - "constant": false, - "id": 1203, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 1257, - "src": "25099:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1202, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25099:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1208, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1205, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25123:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25123:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1204, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1117, - "src": "25116:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25116:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25099:35:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1209, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1203, - "src": "25148:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25157:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25148:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1256, - "nodeType": "IfStatement", - "src": "25144:318:1", - "trueBody": { - "id": 1255, - "nodeType": "Block", - "src": "25160:302:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1212, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "25174:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25182:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25182:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25174:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 1216, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25196:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25174:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1218, - "nodeType": "ExpressionStatement", - "src": "25174:23:1" - }, - { - "assignments": [ - 1220 - ], - "declarations": [ - { - "constant": false, - "id": 1220, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 1255, - "src": "25211:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25211:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1228, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1223, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 947, - "src": "25247:3:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - ], - "id": 1222, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25239:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1224, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25239:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1221, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 829, - "src": "25235:3:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$829_$", - "typeString": "type(contract YAM)" - } - }, - "id": 1225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25235:17:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$829", - "typeString": "contract YAM" - } - }, - "id": 1226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 828, - "src": "25235:35:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 1227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25235:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25211:61:1" - }, - { - "assignments": [ - 1230 - ], - "declarations": [ - { - "constant": false, - "id": 1230, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 1255, - "src": "25286:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1229, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25286:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1240, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25337:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25341:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25337:6:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1233, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1220, - "src": "25318:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1231, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1203, - "src": "25307:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "25307:10: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": 1234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25307:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "25307:29: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": 1239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25307:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25286:58:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1244, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25375:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25375:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1246, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1230, - "src": "25387:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1241, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 947, - "src": "25358:3:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 600, - "src": "25358:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$497_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 1247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25358:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1248, - "nodeType": "ExpressionStatement", - "src": "25358:40:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1250, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25428:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25428:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1252, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1230, - "src": "25440:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1249, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "25417:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25417:34:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1254, - "nodeType": "EmitStatement", - "src": "25412:39:1" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1258, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1196, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25066:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25066:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1198, - "modifierName": { - "argumentTypes": null, - "id": 1195, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "25053:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25053:24:1" - }, - { - "arguments": null, - "id": 1200, - "modifierName": { - "argumentTypes": null, - "id": 1199, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "25078:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25078:10:1" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1194, - "nodeType": "ParameterList", - "parameters": [], - "src": "25043:2:1" - }, - "returnParameters": { - "id": 1201, - "nodeType": "ParameterList", - "parameters": [], - "src": "25089:0:1" - }, - "scope": 1357, - "src": "25025:443:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1355, - "nodeType": "Block", - "src": "25603:703:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1270, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25617:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25617:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 1272, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "25635:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25617:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1353, - "nodeType": "Block", - "src": "26120:180:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1331, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "26132:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1334, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "26156:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1332, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "26145:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "26145:10: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": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26145:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26132:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1337, - "nodeType": "ExpressionStatement", - "src": "26132:33:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1338, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "26177:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1339, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "26194:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26177:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1341, - "nodeType": "ExpressionStatement", - "src": "26177:26:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1342, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "26215:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1345, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "26244:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1343, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "26230:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "26230:13: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": 1346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26230:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26215:38:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1348, - "nodeType": "ExpressionStatement", - "src": "26215:38:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1350, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "26282:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1349, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "26270:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26270:19:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1352, - "nodeType": "EmitStatement", - "src": "26265:24:1" - } - ] - }, - "id": 1354, - "nodeType": "IfStatement", - "src": "25613:687:1", - "trueBody": { - "id": 1330, - "nodeType": "Block", - "src": "25646:468:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1274, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25662:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25662:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1276, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "25681:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25662:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1311, - "nodeType": "Block", - "src": "25763:205:1", - "statements": [ - { - "assignments": [ - 1287 - ], - "declarations": [ - { - "constant": false, - "id": 1287, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 1311, - "src": "25779:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1286, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25779:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1293, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1290, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25816:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25816:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1288, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "25799:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "25799:16: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": 1292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25799:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25779:53:1" - }, - { - "assignments": [ - 1295 - ], - "declarations": [ - { - "constant": false, - "id": 1295, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 1311, - "src": "25848:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25848:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1300, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1298, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "25881:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1296, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1287, - "src": "25867:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "25867:13: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": 1299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25867:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25848:44:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1301, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "25908:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1307, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "25946:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1304, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1295, - "src": "25932:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1302, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "25921:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "25921:10: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": 1305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25921:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "25921:24: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": 1308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25921:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25908:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1310, - "nodeType": "ExpressionStatement", - "src": "25908:47:1" - } - ] - }, - "id": 1312, - "nodeType": "IfStatement", - "src": "25658:310:1", - "trueBody": { - "id": 1285, - "nodeType": "Block", - "src": "25695:62:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1278, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "25711:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1281, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "25735:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1279, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "25724:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "25724:10: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": 1282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25724:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25711:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1284, - "nodeType": "ExpressionStatement", - "src": "25711:33:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1313, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "25979:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1314, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25996:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25996:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25979:32:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1317, - "nodeType": "ExpressionStatement", - "src": "25979:32:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1318, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "26023:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1322, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "26058:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1319, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26038:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26038:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "26038:19: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": 1323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26038:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26023:44:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1325, - "nodeType": "ExpressionStatement", - "src": "26023:44:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1327, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "26096:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1326, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "26084:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26084:19:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1329, - "nodeType": "EmitStatement", - "src": "26079:24:1" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1356, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1263, - "modifierName": { - "argumentTypes": null, - "id": 1262, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 809, - "src": "25543:22:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25543:22:1" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25595: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": 1265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25587:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25587:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1268, - "modifierName": { - "argumentTypes": null, - "id": 1264, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "25574:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25574:24:1" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1260, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 1356, - "src": "25502:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1259, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25502:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25501:16:1" - }, - "returnParameters": { - "id": 1269, - "nodeType": "ParameterList", - "parameters": [], - "src": "25603:0:1" - }, - "scope": 1357, - "src": "25474:832:1", - "stateMutability": "nonpayable", - "superFunction": 797, - "visibility": "external" - } - ], - "scope": 1358, - "src": "22407:3901:1" - } - ], - "src": "1490:24819:1" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMAMPLPool.sol", - "exportedSymbols": { - "Address": [ - 571 - ], - "Context": [ - 317 - ], - "IERC20": [ - 497 - ], - "IRewardDistributionRecipient": [ - 822 - ], - "LPTokenWrapper": [ - 938 - ], - "Math": [ - 105 - ], - "Ownable": [ - 429 - ], - "SafeERC20": [ - 787 - ], - "SafeMath": [ - 291 - ], - "YAM": [ - 829 - ], - "YAMAMPLPool": [ - 1357 - ] - }, - "id": 1358, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 38, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 105, - "linearizedBaseContracts": [ - 105 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "1739:38:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 47, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "1756:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 48, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "1761:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 51, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "1769:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:1", - "trueExpression": { - "argumentTypes": null, - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "1765:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 46, - "id": 53, - "nodeType": "Return", - "src": "1749:21:1" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 40, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "1685:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "1696:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 41, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:1" - }, - "returnParameters": { - "id": 46, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 45, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "1730:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 44, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:1" - }, - "scope": 105, - "src": "1672:105:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 71, - "nodeType": "Block", - "src": "1915:37:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 64, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1932:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 65, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1936:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 68, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1944:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:1", - "trueExpression": { - "argumentTypes": null, - "id": 67, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1940:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 63, - "id": 70, - "nodeType": "Return", - "src": "1925:20:1" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 60, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 57, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "1861:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 59, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "1872:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 58, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:1" - }, - "returnParameters": { - "id": 63, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 62, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "1906:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:1" - }, - "scope": 105, - "src": "1848:104:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 103, - "nodeType": "Block", - "src": "2136:119:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 89, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 81, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "2208:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 84, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 87, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 85, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "2218:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 86, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 88, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 90, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "2229:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 91, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 95, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 93, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "2237:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 97, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 98, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 100, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 102, - "nodeType": "Return", - "src": "2200:48:1" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 104, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 77, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 74, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "2082:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "2093:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:1" - }, - "returnParameters": { - "id": 80, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 79, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "2127:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:1" - }, - "scope": 105, - "src": "2065:190:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "1589:668:1" - }, - { - "id": 106, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 291, - "linearizedBaseContracts": [ - 291 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 130, - "nodeType": "Block", - "src": "3212:109:1", - "statements": [ - { - "assignments": [ - 116 - ], - "declarations": [ - { - "constant": false, - "id": 116, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 130, - "src": "3222:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 120, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 117, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "3234:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 118, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "3238:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 122, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "3257:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 123, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "3262:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 127, - "nodeType": "ExpressionStatement", - "src": "3249:46:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 128, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "3313:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 114, - "id": 129, - "nodeType": "Return", - "src": "3306:8:1" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 131, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 108, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 131, - "src": "3158:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 107, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 131, - "src": "3169:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 109, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:1" - }, - "returnParameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 113, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 131, - "src": "3203:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:1" - }, - "scope": 291, - "src": "3145:176:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 146, - "nodeType": "Block", - "src": "3652:67:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 141, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "3673:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 142, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 135, - "src": "3676:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 143, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 140, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 147, - 174 - ], - "referencedDeclaration": 174, - "src": "3669:3:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 139, - "id": 145, - "nodeType": "Return", - "src": "3662:50:1" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 147, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 136, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 133, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 147, - "src": "3598:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 135, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 147, - "src": "3609:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:1" - }, - "returnParameters": { - "id": 139, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 138, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 147, - "src": "3643:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 137, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:1" - }, - "scope": 291, - "src": "3585:134:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 173, - "nodeType": "Block", - "src": "4138:92:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 159, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 151, - "src": "4156:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 160, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "4161:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 162, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 153, - "src": "4164:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 158, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 164, - "nodeType": "ExpressionStatement", - "src": "4148:29:1" - }, - { - "assignments": [ - 166 - ], - "declarations": [ - { - "constant": false, - "id": 166, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 173, - "src": "4187:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 170, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 167, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "4199:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 168, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 151, - "src": "4203:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 171, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 166, - "src": "4222:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 157, - "id": 172, - "nodeType": "Return", - "src": "4215:8:1" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 174, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 149, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4056:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 148, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 151, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4067:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 150, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 153, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4078:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 152, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:1" - }, - "returnParameters": { - "id": 157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 174, - "src": "4129:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:1" - }, - "scope": 291, - "src": "4043:187:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 207, - "nodeType": "Block", - "src": "4537:392:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 183, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4769:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 189, - "nodeType": "IfStatement", - "src": "4765:45:1", - "trueBody": { - "id": 188, - "nodeType": "Block", - "src": "4777:33:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 182, - "id": 187, - "nodeType": "Return", - "src": "4791:8:1" - } - ] - } - }, - { - "assignments": [ - 191 - ], - "declarations": [ - { - "constant": false, - "id": 191, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 207, - "src": "4820:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 195, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 192, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4832:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 193, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "4836:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 197, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 191, - "src": "4855:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 198, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4859:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 200, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "4864:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 196, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 204, - "nodeType": "ExpressionStatement", - "src": "4847:56:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 205, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 191, - "src": "4921:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 182, - "id": 206, - "nodeType": "Return", - "src": "4914:8:1" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 208, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 179, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 176, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "4483:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 178, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "4494:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 177, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:1" - }, - "returnParameters": { - "id": 182, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 181, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "4528:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:1" - }, - "scope": 291, - "src": "4470:459:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 223, - "nodeType": "Block", - "src": "5451:63:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 218, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "5472:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 219, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "5475:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 217, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 224, - 251 - ], - "referencedDeclaration": 251, - "src": "5468:3:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 216, - "id": 222, - "nodeType": "Return", - "src": "5461:46:1" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 224, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 210, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 224, - "src": "5397:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 212, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 224, - "src": "5408:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 211, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:1" - }, - "returnParameters": { - "id": 216, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 215, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 224, - "src": "5442:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 214, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:1" - }, - "scope": 291, - "src": "5384:130:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 250, - "nodeType": "Block", - "src": "6124:243:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 236, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 228, - "src": "6208:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 239, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 230, - "src": "6215:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 235, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 241, - "nodeType": "ExpressionStatement", - "src": "6200:28:1" - }, - { - "assignments": [ - 243 - ], - "declarations": [ - { - "constant": false, - "id": 243, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 250, - "src": "6238:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 247, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 244, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 226, - "src": "6250:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 245, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 228, - "src": "6254:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 248, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "6359:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 234, - "id": 249, - "nodeType": "Return", - "src": "6352:8:1" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 251, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 231, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 226, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6042:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 228, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6053:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 227, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 230, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6064:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 229, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:1" - }, - "returnParameters": { - "id": 234, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 233, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 251, - "src": "6115:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:1" - }, - "scope": 291, - "src": "6029:338:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 266, - "nodeType": "Block", - "src": "6878:61:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 261, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "6899:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 262, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "6902:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 260, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 267, - 290 - ], - "referencedDeclaration": 290, - "src": "6895:3:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 259, - "id": 265, - "nodeType": "Return", - "src": "6888:44:1" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 267, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 256, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 253, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 267, - "src": "6824:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 255, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 267, - "src": "6835:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 254, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:1" - }, - "returnParameters": { - "id": 259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 267, - "src": "6869:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:1" - }, - "scope": 291, - "src": "6811:128:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 289, - "nodeType": "Block", - "src": "7538:68:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 279, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7556:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 282, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7564:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 278, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 284, - "nodeType": "ExpressionStatement", - "src": "7548:29:1" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 285, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 269, - "src": "7594:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 286, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7598:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 277, - "id": 288, - "nodeType": "Return", - "src": "7587:12:1" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 290, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 269, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7456:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 268, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 271, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7467:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 270, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 273, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7478:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 272, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:1" - }, - "returnParameters": { - "id": 277, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 276, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "7529:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 275, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:1" - }, - "scope": 291, - "src": "7443:163:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "2900:4708:1" - }, - { - "id": 292, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 317, - "linearizedBaseContracts": [ - 317 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 295, - "nodeType": "Block", - "src": "8386:3:1", - "statements": [] - }, - "documentation": null, - "id": 296, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 293, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:1" - }, - "returnParameters": { - "id": 294, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:1" - }, - "scope": 317, - "src": "8362:27:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 304, - "nodeType": "Block", - "src": "8510:34:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 301, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 300, - "id": 303, - "nodeType": "Return", - "src": "8520:17:1" - } - ] - }, - "documentation": null, - "id": 305, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:1" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 305, - "src": "8493:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 298, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:1" - }, - "scope": 317, - "src": "8448:96:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 315, - "nodeType": "Block", - "src": "8607:165:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 310, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19263, - "src": "8617:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$317", - "typeString": "contract Context" - } - }, - "id": 311, - "nodeType": "ExpressionStatement", - "src": "8617:4:1" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 312, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 309, - "id": 314, - "nodeType": "Return", - "src": "8750:15:1" - } - ] - }, - "documentation": null, - "id": 316, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 306, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:1" - }, - "returnParameters": { - "id": 309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 308, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 316, - "src": "8593:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 307, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:1" - }, - "scope": 317, - "src": "8550:222:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "8185:589:1" - }, - { - "id": 318, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:1" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 319, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 317, - "src": "9238:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$317", - "typeString": "contract Context" - } - }, - "id": 320, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:1" - } - ], - "contractDependencies": [ - 317 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 429, - "linearizedBaseContracts": [ - 429, - 317 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 322, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 429, - "src": "9252:22:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 321, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 328, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 324, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "9308:29:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 323, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 326, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "9339:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 325, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:1" - }, - "src": "9281:84:1" - }, - { - "body": { - "id": 343, - "nodeType": "Block", - "src": "9491:93:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 331, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "9501:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 332, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "9510:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 335, - "nodeType": "ExpressionStatement", - "src": "9501:21:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566: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": 337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 340, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "9570:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 336, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "9537:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 342, - "nodeType": "EmitStatement", - "src": "9532:45:1" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 344, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 329, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:1" - }, - "returnParameters": { - "id": 330, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:1" - }, - "scope": 429, - "src": "9467:117:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 351, - "nodeType": "Block", - "src": "9707:30:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 349, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "9724:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 348, - "id": 350, - "nodeType": "Return", - "src": "9717:13:1" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 352, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 345, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:1" - }, - "returnParameters": { - "id": 348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 347, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 352, - "src": "9698:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:1" - }, - "scope": 429, - "src": "9660:77:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 361, - "nodeType": "Block", - "src": "9846:82:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 355, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "9864:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 354, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 359, - "nodeType": "ExpressionStatement", - "src": "9856:54:1" - }, - { - "id": 360, - "nodeType": "PlaceholderStatement", - "src": "9920:1:1" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 362, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 353, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:1" - }, - "src": "9825:103:1", - "visibility": "internal" - }, - { - "body": { - "id": 372, - "nodeType": "Block", - "src": "10057:46:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 367, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "10074:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 369, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "10090:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 366, - "id": 371, - "nodeType": "Return", - "src": "10067:29:1" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 373, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 363, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:1" - }, - "returnParameters": { - "id": 366, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 365, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "10051:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 364, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:1" - }, - "scope": 429, - "src": "10011:92:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 391, - "nodeType": "Block", - "src": "10491:91:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 379, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "10527:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 381, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543: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": 380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 378, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "10506:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 384, - "nodeType": "EmitStatement", - "src": "10501:45:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 385, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "10556:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573: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": 386, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 390, - "nodeType": "ExpressionStatement", - "src": "10556:19:1" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 392, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 376, - "modifierName": { - "argumentTypes": null, - "id": 375, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "10481:9:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:1" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 374, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:1" - }, - "returnParameters": { - "id": 377, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:1" - }, - "scope": 429, - "src": "10445:137:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 403, - "nodeType": "Block", - "src": "10793:45:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 400, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 394, - "src": "10822:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 399, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "10803:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 402, - "nodeType": "ExpressionStatement", - "src": "10803:28:1" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 404, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 397, - "modifierName": { - "argumentTypes": null, - "id": 396, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "10783:9:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:1" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 395, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 394, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 404, - "src": "10758:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 393, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:1" - }, - "returnParameters": { - "id": 398, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:1" - }, - "scope": 429, - "src": "10731:107:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 427, - "nodeType": "Block", - "src": "10994:170:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 410, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "11012:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032: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": 411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 413, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 409, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 417, - "nodeType": "ExpressionStatement", - "src": "11004:73:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 419, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "11113:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 420, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "11121:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 418, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "11092:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 422, - "nodeType": "EmitStatement", - "src": "11087:43:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 423, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 322, - "src": "11140:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 424, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "11149:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 426, - "nodeType": "ExpressionStatement", - "src": "11140:17:1" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 406, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 428, - "src": "10967:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 405, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:1" - }, - "returnParameters": { - "id": 408, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:1" - }, - "scope": 429, - "src": "10939:225:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "9218:1948:1" - }, - { - "id": 430, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 497, - "linearizedBaseContracts": [ - 497 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 435, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 431, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:1" - }, - "returnParameters": { - "id": 434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 433, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 435, - "src": "11541:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 432, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:1" - }, - "scope": 497, - "src": "11495:55:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 442, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 438, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 437, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 442, - "src": "11652:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 436, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:1" - }, - "returnParameters": { - "id": 441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 442, - "src": "11692:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:1" - }, - "scope": 497, - "src": "11633:68:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 451, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 447, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 444, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 451, - "src": "11939:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 443, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 446, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 451, - "src": "11958:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 445, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:1" - }, - "returnParameters": { - "id": 450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 449, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 451, - "src": "11992:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 448, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:1" - }, - "scope": 497, - "src": "11921:77:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 460, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 456, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 453, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 460, - "src": "12292:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 452, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 455, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 460, - "src": "12307:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 454, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:1" - }, - "returnParameters": { - "id": 459, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 458, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 460, - "src": "12347:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 457, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:1" - }, - "scope": 497, - "src": "12273:83:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 469, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 462, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 469, - "src": "13026:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 464, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 469, - "src": "13043:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 463, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:1" - }, - "returnParameters": { - "id": 468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 467, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 469, - "src": "13077:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 466, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:1" - }, - "scope": 497, - "src": "13009:74:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 480, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 476, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 471, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13412:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 470, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 473, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13428:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 472, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 475, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13447:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:1" - }, - "returnParameters": { - "id": 479, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 478, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 480, - "src": "13481:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 477, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:1" - }, - "scope": 497, - "src": "13390:97:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 488, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 487, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 482, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 488, - "src": "13671:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 481, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 484, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 488, - "src": "13693:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 483, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 486, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 488, - "src": "13713:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 485, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:1" - }, - "src": "13656:72:1" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 496, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 495, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 490, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 496, - "src": "13902:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 489, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 492, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 496, - "src": "13925:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 491, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 494, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 496, - "src": "13950:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 493, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:1" - }, - "src": "13887:78:1" - } - ], - "scope": 1358, - "src": "11401:2566:1" - }, - { - "id": 498, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 571, - "linearizedBaseContracts": [ - 571 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 522, - "nodeType": "Block", - "src": "14644:731:1", - "statements": [ - { - "assignments": [ - 506 - ], - "declarations": [ - { - "constant": false, - "id": 506, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 522, - "src": "15083:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 505, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 507, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:1" - }, - { - "assignments": [ - 509 - ], - "declarations": [ - { - "constant": false, - "id": 509, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 522, - "src": "15109:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 508, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 511, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:1" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 506, - "isOffset": false, - "isSlot": false, - "src": "15274:8:1", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 500, - "isOffset": false, - "isSlot": false, - "src": "15298:7:1", - "valueSize": 1 - } - } - ], - "id": 512, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 513, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "15325:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 516, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "15344:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 517, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "15356:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 520, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 504, - "id": 521, - "nodeType": "Return", - "src": "15317:51:1" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 523, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 501, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 500, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 523, - "src": "14598:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 499, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:1" - }, - "returnParameters": { - "id": 504, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 503, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 523, - "src": "14638:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 502, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:1" - }, - "scope": 571, - "src": "14578:797:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 536, - "nodeType": "Block", - "src": "15660:49:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 532, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 525, - "src": "15693:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 529, - "id": 535, - "nodeType": "Return", - "src": "15670:32:1" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 537, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 526, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 525, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "15603:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 524, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:1" - }, - "returnParameters": { - "id": 529, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 528, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "15643:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 527, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:1" - }, - "scope": 571, - "src": "15584:125:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 569, - "nodeType": "Block", - "src": "16737:294:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 546, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19269, - "src": "16763:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$571", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$571", - "typeString": "library Address" - } - ], - "id": 545, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 549, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "16780:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 544, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 553, - "nodeType": "ExpressionStatement", - "src": "16747:73:1" - }, - { - "assignments": [ - 555, - null - ], - "declarations": [ - { - "constant": false, - "id": 555, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 569, - "src": "16886:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 554, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 563, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 559, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "16925:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 556, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 539, - "src": "16904:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14: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": 558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28: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": 562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 565, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "16954:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 564, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 568, - "nodeType": "ExpressionStatement", - "src": "16946:78:1" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 570, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 542, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 539, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 570, - "src": "16685:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 538, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 541, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 570, - "src": "16712:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 540, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:1" - }, - "returnParameters": { - "id": 543, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:1" - }, - "scope": 571, - "src": "16666:365:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1358, - "src": "14114:2919:1" - }, - { - "id": 572, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 787, - "linearizedBaseContracts": [ - 787 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 575, - "libraryName": { - "contractScope": null, - "id": 573, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 291, - "src": "17610:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$291", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:1", - "typeName": { - "id": 574, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 578, - "libraryName": { - "contractScope": null, - "id": 576, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 571, - "src": "17642:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$571", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:1", - "typeName": { - "id": 577, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 599, - "nodeType": "Block", - "src": "17740:102:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 588, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 580, - "src": "17769:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 591, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 580, - "src": "17799:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 451, - "src": "17799:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 594, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 582, - "src": "17824:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 595, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 584, - "src": "17828:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 589, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 587, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "17750:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 598, - "nodeType": "ExpressionStatement", - "src": "17750:85:1" - } - ] - }, - "documentation": null, - "id": 600, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 585, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 580, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 600, - "src": "17690:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 579, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "17690:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 582, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 600, - "src": "17704:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 584, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 600, - "src": "17716:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 583, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:1" - }, - "returnParameters": { - "id": 586, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:1" - }, - "scope": 787, - "src": "17668:174:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 624, - "nodeType": "Block", - "src": "17938:112:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 612, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 602, - "src": "17967:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 615, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 602, - "src": "17997:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 480, - "src": "17997:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 618, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 604, - "src": "18026:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 619, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 606, - "src": "18032:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 620, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 608, - "src": "18036:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 613, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 611, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "17948:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 623, - "nodeType": "ExpressionStatement", - "src": "17948:95:1" - } - ] - }, - "documentation": null, - "id": 625, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 609, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 602, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17874:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 601, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "17874:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 604, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17888:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 606, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17902:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 605, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 608, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 625, - "src": "17914:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:1" - }, - "returnParameters": { - "id": 610, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:1" - }, - "scope": 787, - "src": "17848:202:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 665, - "nodeType": "Block", - "src": "18132:536:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 635, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 631, - "src": "18421:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 636, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 638, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 642, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19271, - "src": "18461:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - ], - "id": 641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 644, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 629, - "src": "18468:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 639, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "18437:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 460, - "src": "18437:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 648, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 634, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 652, - "nodeType": "ExpressionStatement", - "src": "18412:150:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 654, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "18591:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 657, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 627, - "src": "18621:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 469, - "src": "18621:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 660, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 629, - "src": "18645:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 661, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 631, - "src": "18654:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 655, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 653, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "18572:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 664, - "nodeType": "ExpressionStatement", - "src": "18572:89:1" - } - ] - }, - "documentation": null, - "id": 666, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 632, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 627, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "18077:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 626, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "18077:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 629, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "18091:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 628, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 631, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "18108:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 630, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:1" - }, - "returnParameters": { - "id": 633, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:1" - }, - "scope": 787, - "src": "18056:612:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 700, - "nodeType": "Block", - "src": "18760:196:1", - "statements": [ - { - "assignments": [ - 676 - ], - "declarations": [ - { - "constant": false, - "id": 676, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 700, - "src": "18770:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 675, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 687, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 685, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 672, - "src": "18837:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 680, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19271, - "src": "18817:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - ], - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 682, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "18824:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 677, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "18793:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 460, - "src": "18793:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "18793: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": 686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 689, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "18872:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 692, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "18902:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 469, - "src": "18902:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 695, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "18926:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 696, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 676, - "src": "18935:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 690, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 688, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "18853:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 699, - "nodeType": "ExpressionStatement", - "src": "18853:96:1" - } - ] - }, - "documentation": null, - "id": 701, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 673, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 668, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 701, - "src": "18705:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 667, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "18705:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 670, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 701, - "src": "18719:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 669, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 672, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 701, - "src": "18736:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 671, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:1" - }, - "returnParameters": { - "id": 674, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:1" - }, - "scope": 787, - "src": "18674:282:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 736, - "nodeType": "Block", - "src": "19048:241:1", - "statements": [ - { - "assignments": [ - 711 - ], - "declarations": [ - { - "constant": false, - "id": 711, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 736, - "src": "19058:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 723, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 720, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "19125:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 715, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19271, - "src": "19105:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - ], - "id": 714, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 717, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 705, - "src": "19112:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 712, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "19081:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 460, - "src": "19081:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 174, - "src": "19081:43:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 725, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "19205:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 728, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "19235:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 469, - "src": "19235:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 731, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 705, - "src": "19259:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 732, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 711, - "src": "19268:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 726, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 724, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 786, - "src": "19186:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 735, - "nodeType": "ExpressionStatement", - "src": "19186:96:1" - } - ] - }, - "documentation": null, - "id": 737, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 708, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 703, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 737, - "src": "18993:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 702, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "18993:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 705, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 737, - "src": "19007:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 704, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 707, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 737, - "src": "19024:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 706, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:1" - }, - "returnParameters": { - "id": 709, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:1" - }, - "scope": 787, - "src": "18962:327:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 785, - "nodeType": "Block", - "src": "19741:1026:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 746, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 739, - "src": "20275:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - ], - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 523, - "src": "20267:25:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 744, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 752, - "nodeType": "ExpressionStatement", - "src": "20259:71:1" - }, - { - "assignments": [ - 754, - 756 - ], - "declarations": [ - { - "constant": false, - "id": 754, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 785, - "src": "20401:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 753, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 756, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 785, - "src": "20415:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 755, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 763, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 761, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 741, - "src": "20462:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 758, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 739, - "src": "20450:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - ], - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19: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": 762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 765, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "20485:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 764, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 768, - "nodeType": "ExpressionStatement", - "src": "20477:52:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 772, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 769, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 756, - "src": "20544:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 784, - "nodeType": "IfStatement", - "src": "20540:221:1", - "trueBody": { - "id": 783, - "nodeType": "Block", - "src": "20567:194:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 776, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 756, - "src": "20684:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 774, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 775, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 773, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 782, - "nodeType": "ExpressionStatement", - "src": "20665:85:1" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 786, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 742, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 739, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 786, - "src": "19700:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 738, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "19700:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 741, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 786, - "src": "19714:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 740, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:1" - }, - "returnParameters": { - "id": 743, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:1" - }, - "scope": 787, - "src": "19672:1095:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 1358, - "src": "17580:3189:1" - }, - { - "id": 788, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:1" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 789, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 429, - "src": "20892:7:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$429", - "typeString": "contract Ownable" - } - }, - "id": 790, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:1" - } - ], - "contractDependencies": [ - 317, - 429 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 822, - "linearizedBaseContracts": [ - 822, - 429, - 317 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 792, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 822, - "src": "20906:33:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 791, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 797, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 795, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 794, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 797, - "src": "20974:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 793, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:1" - }, - "returnParameters": { - "id": 796, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:1" - }, - "scope": 822, - "src": "20946:53:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 808, - "nodeType": "Block", - "src": "21039:108:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 800, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 305, - "src": "21057:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 802, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "21073:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 804, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 806, - "nodeType": "ExpressionStatement", - "src": "21049:80:1" - }, - { - "id": 807, - "nodeType": "PlaceholderStatement", - "src": "21139:1:1" - } - ] - }, - "documentation": null, - "id": 809, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 798, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:1" - }, - "src": "21005:142:1", - "visibility": "internal" - }, - { - "body": { - "id": 820, - "nodeType": "Block", - "src": "21252:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 816, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "21262:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 817, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 811, - "src": "21283:19:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 819, - "nodeType": "ExpressionStatement", - "src": "21262:40:1" - } - ] - }, - "documentation": null, - "id": 821, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 814, - "modifierName": { - "argumentTypes": null, - "id": 813, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 362, - "src": "21238:9:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:1" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 812, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 811, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 821, - "src": "21184:27:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 810, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:1" - }, - "returnParameters": { - "id": 815, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:1" - }, - "scope": 822, - "src": "21153:156:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1358, - "src": "20851:460:1" - }, - { - "id": 823, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 829, - "linearizedBaseContracts": [ - 829 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 828, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 824, - "nodeType": "ParameterList", - "parameters": [], - "src": "21423:2:1" - }, - "returnParameters": { - "id": 827, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 826, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 828, - "src": "21444:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 825, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21444:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21443:9:1" - }, - "scope": 829, - "src": "21397:56:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1358, - "src": "21377:78:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 938, - "linearizedBaseContracts": [ - 938 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 832, - "libraryName": { - "contractScope": null, - "id": 830, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 291, - "src": "21494:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$291", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:1", - "typeName": { - "id": 831, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 835, - "libraryName": { - "contractScope": null, - "id": 833, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 787, - "src": "21526:9:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$787", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:1", - "typeName": { - "contractScope": null, - "id": 834, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "21540:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 840, - "name": "ampl_eth_uni_lp", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "21553:82:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 836, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "21553:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307863356265393941303243363835376639456163363742624345353844463535373234393846343063", - "id": 838, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21592:42:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xc5be99A02C6857f9Eac67BbCE58DF5572498F40c" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 837, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 497, - "src": "21585:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$497_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 839, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21585:50:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 842, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "21642:28:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21642:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 846, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "21676:45:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 845, - "keyType": { - "id": 843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21684:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21676:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 844, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21695:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 853, - "nodeType": "Block", - "src": "21781:36:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 851, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "21798:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 850, - "id": 852, - "nodeType": "Return", - "src": "21791:19:1" - } - ] - }, - "documentation": null, - "id": 854, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 847, - "nodeType": "ParameterList", - "parameters": [], - "src": "21748:2:1" - }, - "returnParameters": { - "id": 850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 849, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 854, - "src": "21772:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 848, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21772:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21771:9:1" - }, - "scope": 938, - "src": "21728:89:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 865, - "nodeType": "Block", - "src": "21889:42:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 861, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "21906:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 863, - "indexExpression": { - "argumentTypes": null, - "id": 862, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 856, - "src": "21916:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21906:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 860, - "id": 864, - "nodeType": "Return", - "src": "21899:25:1" - } - ] - }, - "documentation": null, - "id": 866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 856, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 866, - "src": "21842:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 855, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21842:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21841:17:1" - }, - "returnParameters": { - "id": 860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 859, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 866, - "src": "21880:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21880:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21879:9:1" - }, - "scope": 938, - "src": "21823:108:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 902, - "nodeType": "Block", - "src": "21975:200:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 871, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "21985:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 874, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "22017:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 872, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "22000:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "22000:16: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": 875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22000:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21985:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 877, - "nodeType": "ExpressionStatement", - "src": "21985:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 878, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22034:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 881, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 879, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22044:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22044:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22034:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 887, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "22084:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 882, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22058:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 885, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 883, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22068:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22068:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22058:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "22058:25: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": 888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22058:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22034:57:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 890, - "nodeType": "ExpressionStatement", - "src": "22034:57:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 894, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22134:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22134:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 897, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19277, - "src": "22154:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$938", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$938", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22146:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22146:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 899, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "22161: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, - "id": 891, - "name": "ampl_eth_uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "22101:15:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 625, - "src": "22101:32:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$497_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22101:67:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 901, - "nodeType": "ExpressionStatement", - "src": "22101:67:1" - } - ] - }, - "documentation": null, - "id": 903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 868, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 903, - "src": "21952:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21952:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21951:16:1" - }, - "returnParameters": { - "id": 870, - "nodeType": "ParameterList", - "parameters": [], - "src": "21975:0:1" - }, - "scope": 938, - "src": "21937:238:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 936, - "nodeType": "Block", - "src": "22222:181:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 908, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "22232:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 911, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 905, - "src": "22264:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 909, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 842, - "src": "22247:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "22247:16: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": 912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22247:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22232:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 914, - "nodeType": "ExpressionStatement", - "src": "22232:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 915, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22281:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 918, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 916, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22291:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22291:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22281:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 924, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 905, - "src": "22331:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 919, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 846, - "src": "22305:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 922, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 920, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22315:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22315:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22305:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "22305:25: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": 925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22305:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22281:57:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 927, - "nodeType": "ExpressionStatement", - "src": "22281:57:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 931, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22377:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 932, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22377:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 933, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 905, - "src": "22389: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, - "id": 928, - "name": "ampl_eth_uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "22348:15:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 600, - "src": "22348:28:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$497_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22348:48:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 935, - "nodeType": "ExpressionStatement", - "src": "22348:48:1" - } - ] - }, - "documentation": null, - "id": 937, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 905, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "22199:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22199:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22198:16:1" - }, - "returnParameters": { - "id": 907, - "nodeType": "ParameterList", - "parameters": [], - "src": "22222:0:1" - }, - "scope": 938, - "src": "22181:222:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 1358, - "src": "21458:947:1" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 939, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 938, - "src": "22431:14:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$938", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 940, - "nodeType": "InheritanceSpecifier", - "src": "22431:14:1" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 941, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 822, - "src": "22447:28:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$822", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 942, - "nodeType": "InheritanceSpecifier", - "src": "22447:28:1" - } - ], - "contractDependencies": [ - 317, - 429, - 822, - 938 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1357, - "linearizedBaseContracts": [ - 1357, - 822, - 429, - 317, - 938 - ], - "name": "YAMAMPLPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 947, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22482:70:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 943, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 497, - "src": "22482:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 945, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22509:42:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 944, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 497, - "src": "22502:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$497_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22502:50:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 950, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22558:41:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 948, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22593:6:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 953, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22621:37:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 951, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22621:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22648:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 956, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22702:31:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 954, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22702:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 955, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22732:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 959, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22739:29:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 957, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22739:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 958, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22767:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 961, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22774:29:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 960, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22774:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 963, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22809:35:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 962, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22809:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 967, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22850:57:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 966, - "keyType": { - "id": 964, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22858:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22850:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 965, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22869:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 971, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 1357, - "src": "22913:42:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 970, - "keyType": { - "id": 968, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22921:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22913:27:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 969, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22932:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 975, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 973, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 975, - "src": "22980:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 972, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22980:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22979:16:1" - }, - "src": "22962:34:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 981, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 980, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 977, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 981, - "src": "23014:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 976, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23014:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 979, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 981, - "src": "23036:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23036:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23013:38:1" - }, - "src": "23001:51:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 987, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 983, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 987, - "src": "23073:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 982, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23073:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 985, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 987, - "src": "23095:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 984, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23095:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23072:38:1" - }, - "src": "23057:54:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 993, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 989, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "23133:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23133:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 991, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "23155:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 990, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23155:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23132:38:1" - }, - "src": "23116:55:1" - }, - { - "body": { - "id": 1004, - "nodeType": "Block", - "src": "23198:77:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 996, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23216:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23216:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 998, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "23235:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23216:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 1000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23245:11:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 995, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23208:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23208:49:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1002, - "nodeType": "ExpressionStatement", - "src": "23208:49:1" - }, - { - "id": 1003, - "nodeType": "PlaceholderStatement", - "src": "23267:1:1" - } - ] - }, - "documentation": null, - "id": 1005, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 994, - "nodeType": "ParameterList", - "parameters": [], - "src": "23196:2:1" - }, - "src": "23177:98:1", - "visibility": "internal" - }, - { - "body": { - "id": 1041, - "nodeType": "Block", - "src": "23320:283:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1009, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23330:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1010, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1088, - "src": "23353:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23353:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23330:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1013, - "nodeType": "ExpressionStatement", - "src": "23330:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1014, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "23379:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1015, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "23396:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23396:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23379:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1018, - "nodeType": "ExpressionStatement", - "src": "23379:43:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1019, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23436:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1021, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23455: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": 1020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23447:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23447:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23436:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1039, - "nodeType": "IfStatement", - "src": "23432:154:1", - "trueBody": { - "id": 1038, - "nodeType": "Block", - "src": "23459:127:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1024, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "23473:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1026, - "indexExpression": { - "argumentTypes": null, - "id": 1025, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23481:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23473:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1028, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23499:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1027, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1117, - "src": "23492:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23492:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23473:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1031, - "nodeType": "ExpressionStatement", - "src": "23473:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1032, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 967, - "src": "23521:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1034, - "indexExpression": { - "argumentTypes": null, - "id": 1033, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1007, - "src": "23544:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23521:31:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1035, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23555:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23521:54:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1037, - "nodeType": "ExpressionStatement", - "src": "23521:54:1" - } - ] - } - }, - { - "id": 1040, - "nodeType": "PlaceholderStatement", - "src": "23595:1:1" - } - ] - }, - "documentation": null, - "id": 1042, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1007, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1042, - "src": "23303:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23303:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23302:17:1" - }, - "src": "23281:322:1", - "visibility": "internal" - }, - { - "body": { - "id": 1054, - "nodeType": "Block", - "src": "23675:63:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1049, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23701:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23701:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1051, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "23718:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1047, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 105, - "src": "23692:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$105_$", - "typeString": "type(library Math)" - } - }, - "id": 1048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 72, - "src": "23692:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23692:39:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1046, - "id": 1053, - "nodeType": "Return", - "src": "23685:46:1" - } - ] - }, - "documentation": null, - "id": 1055, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1043, - "nodeType": "ParameterList", - "parameters": [], - "src": "23642:2:1" - }, - "returnParameters": { - "id": 1046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1045, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1055, - "src": "23666:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23666:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23665:9:1" - }, - "scope": 1357, - "src": "23609:129:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1087, - "nodeType": "Block", - "src": "23800:352:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1060, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 854, - "src": "23814:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23814:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23831:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23814:18:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1067, - "nodeType": "IfStatement", - "src": "23810:76:1", - "trueBody": { - "id": 1066, - "nodeType": "Block", - "src": "23834:52:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1064, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23855:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1059, - "id": 1065, - "nodeType": "Return", - "src": "23848:27:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1082, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 854, - "src": "24117:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24117:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 1079, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24086:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1076, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "24049:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1073, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "24008:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1070, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "23956:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "23956:51: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": 1074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:67:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "23956:92: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": 1077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:104:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "23956:129: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": 1080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:135:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "23956:160: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": 1084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23956:175:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1068, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 963, - "src": "23914:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "23914:24: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": 1085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23914:231:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1059, - "id": 1086, - "nodeType": "Return", - "src": "23895:250:1" - } - ] - }, - "documentation": null, - "id": 1088, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1056, - "nodeType": "ParameterList", - "parameters": [], - "src": "23767:2:1" - }, - "returnParameters": { - "id": 1059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1058, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1088, - "src": "23791:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1057, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23791:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23790:9:1" - }, - "scope": 1357, - "src": "23744:408:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1116, - "nodeType": "Block", - "src": "24221:196:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1111, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "24393:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1113, - "indexExpression": { - "argumentTypes": null, - "id": 1112, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1090, - "src": "24401:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24393:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 1108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24366:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1102, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 967, - "src": "24311:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1104, - "indexExpression": { - "argumentTypes": null, - "id": 1103, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1090, - "src": "24334:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24311:31:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1099, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1088, - "src": "24290:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24290:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "24290:20: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": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24290:53:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1096, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1090, - "src": "24260:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1095, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "24250:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "24250:39: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": 1106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:94:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "24250:115: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": 1109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:121:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "24250:142: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": 1114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24250:160:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1094, - "id": 1115, - "nodeType": "Return", - "src": "24231:179:1" - } - ] - }, - "documentation": null, - "id": 1117, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1091, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1090, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1117, - "src": "24174:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24174:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24173:17:1" - }, - "returnParameters": { - "id": 1094, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1093, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1117, - "src": "24212:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1092, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24212:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24211:9:1" - }, - "scope": 1357, - "src": "24158:259:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1147, - "nodeType": "Block", - "src": "24579:124:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1129, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "24597:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24606:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24597:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 1132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24609:16:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 1128, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24589:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24589:37:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1134, - "nodeType": "ExpressionStatement", - "src": "24589:37:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1138, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "24648:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1135, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19280, - "src": "24636:5:1", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMAMPLPool_$1357", - "typeString": "contract super YAMAMPLPool" - } - }, - "id": 1137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 903, - "src": "24636:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24636:19:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1140, - "nodeType": "ExpressionStatement", - "src": "24636:19:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1142, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24677:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24677:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1144, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "24689:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1141, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 981, - "src": "24670:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24670:26:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1146, - "nodeType": "EmitStatement", - "src": "24665:31:1" - } - ] - }, - "documentation": null, - "id": 1148, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1122, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24556:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24556:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1124, - "modifierName": { - "argumentTypes": null, - "id": 1121, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "24543:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24543:24:1" - }, - { - "arguments": null, - "id": 1126, - "modifierName": { - "argumentTypes": null, - "id": 1125, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "24568:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24568:10:1" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1119, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1148, - "src": "24520:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1118, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24520:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24519:16:1" - }, - "returnParameters": { - "id": 1127, - "nodeType": "ParameterList", - "parameters": [], - "src": "24579:0:1" - }, - "scope": 1357, - "src": "24505:198:1", - "stateMutability": "nonpayable", - "superFunction": 903, - "visibility": "public" - }, - { - "body": { - "id": 1178, - "nodeType": "Block", - "src": "24786:133:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1160, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "24804:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24813:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24804:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 1163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24816:19:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 1159, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24796:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24796:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1165, - "nodeType": "ExpressionStatement", - "src": "24796:40:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1169, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "24861:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1166, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19280, - "src": "24846:5:1", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMAMPLPool_$1357", - "typeString": "contract super YAMAMPLPool" - } - }, - "id": 1168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 937, - "src": "24846:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24846:22:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1171, - "nodeType": "ExpressionStatement", - "src": "24846:22:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1173, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24893:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24893:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1175, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "24905:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1172, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "24883:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24883:29:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1177, - "nodeType": "EmitStatement", - "src": "24878:34:1" - } - ] - }, - "documentation": null, - "id": 1179, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24763:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24763:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1155, - "modifierName": { - "argumentTypes": null, - "id": 1152, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "24750:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24750:24:1" - }, - { - "arguments": null, - "id": 1157, - "modifierName": { - "argumentTypes": null, - "id": 1156, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "24775:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24775:10:1" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1150, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1179, - "src": "24727:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1149, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24727:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24726:16:1" - }, - "returnParameters": { - "id": 1158, - "nodeType": "ParameterList", - "parameters": [], - "src": "24786:0:1" - }, - "scope": 1357, - "src": "24709:210:1", - "stateMutability": "nonpayable", - "superFunction": 937, - "visibility": "public" - }, - { - "body": { - "id": 1192, - "nodeType": "Block", - "src": "24950:69:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1184, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24979:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24979:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1183, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "24969:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1182, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1179 - ], - "referencedDeclaration": 1179, - "src": "24960:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24960:31:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1188, - "nodeType": "ExpressionStatement", - "src": "24960:31:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1189, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1258, - "src": "25001:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 1190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25001:11:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1191, - "nodeType": "ExpressionStatement", - "src": "25001:11:1" - } - ] - }, - "documentation": null, - "id": 1193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1180, - "nodeType": "ParameterList", - "parameters": [], - "src": "24938:2:1" - }, - "returnParameters": { - "id": 1181, - "nodeType": "ParameterList", - "parameters": [], - "src": "24950:0:1" - }, - "scope": 1357, - "src": "24925:94:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 1257, - "nodeType": "Block", - "src": "25089:379:1", - "statements": [ - { - "assignments": [ - 1203 - ], - "declarations": [ - { - "constant": false, - "id": 1203, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 1257, - "src": "25099:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1202, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25099:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1208, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1205, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25123:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25123:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1204, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1117, - "src": "25116:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25116:18:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25099:35:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1209, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1203, - "src": "25148:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25157:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25148:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1256, - "nodeType": "IfStatement", - "src": "25144:318:1", - "trueBody": { - "id": 1255, - "nodeType": "Block", - "src": "25160:302:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1212, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "25174:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25182:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25182:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25174:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 1216, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25196:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25174:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1218, - "nodeType": "ExpressionStatement", - "src": "25174:23:1" - }, - { - "assignments": [ - 1220 - ], - "declarations": [ - { - "constant": false, - "id": 1220, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 1255, - "src": "25211:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25211:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1228, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1223, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 947, - "src": "25247:3:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - ], - "id": 1222, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25239:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1224, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25239:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1221, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 829, - "src": "25235:3:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$829_$", - "typeString": "type(contract YAM)" - } - }, - "id": 1225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25235:17:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$829", - "typeString": "contract YAM" - } - }, - "id": 1226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 828, - "src": "25235:35:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 1227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25235:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25211:61:1" - }, - { - "assignments": [ - 1230 - ], - "declarations": [ - { - "constant": false, - "id": 1230, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 1255, - "src": "25286:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1229, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25286:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1240, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25337:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25341:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25337:6:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1233, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1220, - "src": "25318:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1231, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1203, - "src": "25307:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "25307:10: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": 1234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25307:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "25307:29: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": 1239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25307:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25286:58:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1244, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25375:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25375:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1246, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1230, - "src": "25387:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1241, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 947, - "src": "25358:3:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$497", - "typeString": "contract IERC20" - } - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 600, - "src": "25358:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$497_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$497_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 1247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25358:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1248, - "nodeType": "ExpressionStatement", - "src": "25358:40:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1250, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25428:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25428:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1252, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1230, - "src": "25440:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1249, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "25417:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25417:34:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1254, - "nodeType": "EmitStatement", - "src": "25412:39:1" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1258, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1196, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25066:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25066:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1198, - "modifierName": { - "argumentTypes": null, - "id": 1195, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "25053:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25053:24:1" - }, - { - "arguments": null, - "id": 1200, - "modifierName": { - "argumentTypes": null, - "id": 1199, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "25078:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25078:10:1" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1194, - "nodeType": "ParameterList", - "parameters": [], - "src": "25043:2:1" - }, - "returnParameters": { - "id": 1201, - "nodeType": "ParameterList", - "parameters": [], - "src": "25089:0:1" - }, - "scope": 1357, - "src": "25025:443:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1355, - "nodeType": "Block", - "src": "25603:703:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1270, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25617:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25617:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 1272, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "25635:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25617:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1353, - "nodeType": "Block", - "src": "26120:180:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1331, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "26132:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1334, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "26156:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1332, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "26145:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "26145:10: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": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26145:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26132:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1337, - "nodeType": "ExpressionStatement", - "src": "26132:33:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1338, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "26177:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1339, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "26194:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26177:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1341, - "nodeType": "ExpressionStatement", - "src": "26177:26:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1342, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "26215:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1345, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "26244:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1343, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 953, - "src": "26230:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "26230:13: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": 1346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26230:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26215:38:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1348, - "nodeType": "ExpressionStatement", - "src": "26215:38:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1350, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "26282:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1349, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "26270:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26270:19:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1352, - "nodeType": "EmitStatement", - "src": "26265:24:1" - } - ] - }, - "id": 1354, - "nodeType": "IfStatement", - "src": "25613:687:1", - "trueBody": { - "id": 1330, - "nodeType": "Block", - "src": "25646:468:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1274, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25662:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25662:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1276, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "25681:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25662:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1311, - "nodeType": "Block", - "src": "25763:205:1", - "statements": [ - { - "assignments": [ - 1287 - ], - "declarations": [ - { - "constant": false, - "id": 1287, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 1311, - "src": "25779:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1286, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25779:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1293, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1290, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25816:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25816:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1288, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "25799:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 147, - "src": "25799:16: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": 1292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25799:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25779:53:1" - }, - { - "assignments": [ - 1295 - ], - "declarations": [ - { - "constant": false, - "id": 1295, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 1311, - "src": "25848:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25848:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1300, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1298, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "25881:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1296, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1287, - "src": "25867:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 208, - "src": "25867:13: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": 1299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25867:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25848:44:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1301, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "25908:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1307, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "25946:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1304, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1295, - "src": "25932:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1302, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "25921:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "25921:10: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": 1305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25921:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "25921:24: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": 1308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25921:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25908:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1310, - "nodeType": "ExpressionStatement", - "src": "25908:47:1" - } - ] - }, - "id": 1312, - "nodeType": "IfStatement", - "src": "25658:310:1", - "trueBody": { - "id": 1285, - "nodeType": "Block", - "src": "25695:62:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1278, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "25711:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1281, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "25735:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1279, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "25724:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 224, - "src": "25724:10: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": 1282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25724:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25711:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1284, - "nodeType": "ExpressionStatement", - "src": "25711:33:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1313, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "25979:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1314, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25996:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25996:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25979:32:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1317, - "nodeType": "ExpressionStatement", - "src": "25979:32:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1318, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 956, - "src": "26023:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1322, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "26058:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1319, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26038:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26038:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "26038:19: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": 1323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26038:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26023:44:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1325, - "nodeType": "ExpressionStatement", - "src": "26023:44:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1327, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1260, - "src": "26096:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1326, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "26084:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26084:19:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1329, - "nodeType": "EmitStatement", - "src": "26079:24:1" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1356, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1263, - "modifierName": { - "argumentTypes": null, - "id": 1262, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 809, - "src": "25543:22:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25543:22:1" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25595: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": 1265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25587:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25587:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 1268, - "modifierName": { - "argumentTypes": null, - "id": 1264, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "25574:12:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25574:24:1" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1260, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 1356, - "src": "25502:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1259, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25502:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25501:16:1" - }, - "returnParameters": { - "id": 1269, - "nodeType": "ParameterList", - "parameters": [], - "src": "25603:0:1" - }, - "scope": 1357, - "src": "25474:832:1", - "stateMutability": "nonpayable", - "superFunction": 797, - "visibility": "external" - } - ], - "scope": 1358, - "src": "22407:3901:1" - } - ], - "src": "1490:24819:1" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0x056fbbD3eB1DE19c085f10d32ed9D50C206ef681", - "transactionHash": "0x943423613d7ca709348c297a8061d4fb6afdb5a8cfa78202b0081b4e520f8e45" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.571Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMCOMPPool.json b/build/contracts/YAMCOMPPool.json deleted file mode 100644 index 4457b5e..0000000 --- a/build/contracts/YAMCOMPPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMCOMPPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comp", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"comp\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMCOMPPool.sol\":\"YAMCOMPPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMCOMPPool.sol\":{\"keccak256\":\"0x60ccb5e80002959328be44243ed151ac5e0cfb07e9d6687abd9e7c54abb37b15\",\"urls\":[\"bzz-raw://5ff90ca74a98aa5f4f03c670abdc8e7a32bcbb85e86d2435bccfc70656389412\",\"dweb:/ipfs/Qmf75YZ942ceqaESFPuGEKMhx2DCQCGQzMmkzzD2e6vWXc\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b031990811673c00e94cb662c3520282e6f5717214004a7f2688817825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b806318160ddd1161015b5780633c6b16ab116101355780633c6b16ab146102cd5780633d18b912146102ea57806370a08231146102f2578063715018a614610325576101ad565b806318160ddd146102a05780631be05289146102a85780632e1a7d4d146102b0576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf14610290578063109d0af814610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6102326105ab565b6101e56105c7565b6101e56105ce565b61028e600480360360208110156102c657600080fd5b50356105d5565b61028e600480360360208110156102e357600080fd5b503561076d565b61028e6109ac565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105de610f09565b600a556105e9610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561064a5761061181610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544210156106bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161072a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61073382611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff1661078e6111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b6000610804610f09565b600a5561080f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108705761083781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442111561094057600754421061089e57610896826209896863ffffffff6110bf16565b6008556108ec565b6007546000906108b4904263ffffffff61100316565b905060006108cd6008548361104c90919063ffffffff16565b90506108e662098968610489868463ffffffff61110116565b60085550505b426009819055610905906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a16109a8565b610953826209896863ffffffff6110bf16565b6008556006546009819055610971906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b336109b5610f09565b600a556109c0610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a21576109e881610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a9257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a9d33610414565b905080156109a857336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b505050506040513d6020811015610b4957600080fd5b505190506000610b6b670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b989073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105c7565b610f205750600a546105cb565b610cf2610f4e610f2e6105c7565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105d5565b610f7c6109ac565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820d26025b0d2306e1d734c0e29badcfe1fc0397005985f19014badafdeb840080e64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b806318160ddd1161015b5780633c6b16ab116101355780633c6b16ab146102cd5780633d18b912146102ea57806370a08231146102f2578063715018a614610325576101ad565b806318160ddd146102a05780631be05289146102a85780632e1a7d4d146102b0576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf14610290578063109d0af814610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6102326105ab565b6101e56105c7565b6101e56105ce565b61028e600480360360208110156102c657600080fd5b50356105d5565b61028e600480360360208110156102e357600080fd5b503561076d565b61028e6109ac565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105de610f09565b600a556105e9610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561064a5761061181610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544210156106bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161072a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61073382611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff1661078e6111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b6000610804610f09565b600a5561080f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108705761083781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442111561094057600754421061089e57610896826209896863ffffffff6110bf16565b6008556108ec565b6007546000906108b4904263ffffffff61100316565b905060006108cd6008548361104c90919063ffffffff16565b90506108e662098968610489868463ffffffff61110116565b60085550505b426009819055610905906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a16109a8565b610953826209896863ffffffff6110bf16565b6008556006546009819055610971906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b336109b5610f09565b600a556109c0610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a21576109e881610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a9257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a9d33610414565b905080156109a857336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b505050506040513d6020811015610b4957600080fd5b505190506000610b6b670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b989073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105c7565b610f205750600a546105cb565b610cf2610f4e610f2e6105c7565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105d5565b610f7c6109ac565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820d26025b0d2306e1d734c0e29badcfe1fc0397005985f19014badafdeb840080e64736f6c63430005110032", - "sourceMap": "22374:3902:2:-;;;21553:71;;;-1:-1:-1;;;;;;21553:71:2;;;21581:42;21553:71;;;22449:70;;;;;;22476:42;22449:70;;;22615:10;22588:37;;22669:31;;;;22706:29;;9510:12;-1:-1:-1;;;;;9510:10:2;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:2;-1:-1:-1;;;;;9501:21:2;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:2;;-1:-1:-1;;9537:40:2;22374:3902;;8448:96;8527:10;8448:96;:::o;22374:3902::-;;;;;;;", - "deployedSourceMap": "22374:3902:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22374:3902:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24126:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24126:259:2;;;;:::i;:::-;;;;;;;;;;;;;;;;22880:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22880:42:2;;;;:::i;22449:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:2;;;;:::i;:::-;;20906:33;;;:::i;21553:71::-;;;:::i;21717:89::-;;;:::i;22525:41::-;;;:::i;24677:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24677:210:2;;:::i;25442:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25442:832:2;;:::i;24993:443::-;;;:::i;21812:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21812:108:2;;;;:::i;10445:137::-;;;:::i;22706:29::-;;;:::i;23577:129::-;;;:::i;22817:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22817:57:2;;;;:::i;22588:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;24473:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24473:198:2;;:::i;22741:29::-;;;:::i;23712:408::-;;;:::i;22776:35::-;;;:::i;24893:94::-;;;:::i;22669:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:2;;;;:::i;24126:259::-;24361:16;;;24180:7;24361:16;;;:7;:16;;;;;;;;;24279:22;:31;;;;;;24218:160;;24361:16;24218:121;;24334:4;;24218:94;;24258:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24218:18;24228:7;24218:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24199:179;24126:259;-1:-1:-1;;24126:259:2:o;22880:42::-;;;;;;;;;;;;;:::o;22449:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21553:71::-;;;;;;:::o;21717:89::-;21787:12;;21717:89;;:::o;22525:41::-;22560:6;22525:41;:::o;24677:210::-;24731:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24781:1;24772:6;:10;24764:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24814:22;24829:6;24814:14;:22::i;:::-;24851:29;;;;;;;;24861:10;;24851:29;;;;;;;;;;24677:210;;:::o;25442:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25563:1;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;25603:9;;25585:15;:27;25581:687;;;25649:12;;25630:15;:31;25626:310;;25692:20;:6;22560;25692:20;:10;:20;:::i;:::-;25679:10;:33;25626:310;;;25767:12;;25747:17;;25767:33;;25784:15;25767:33;:16;:33;:::i;:::-;25747:53;;25816:16;25835:25;25849:10;;25835:9;:13;;:25;;;;:::i;:::-;25816:44;-1:-1:-1;25889:34:2;22560:6;25889:20;:6;25816:44;25889:20;:10;:20;:::i;:34::-;25876:10;:47;-1:-1:-1;;25626:310:2;25964:15;25947:14;:32;;;26006:29;;22560:6;26006:29;:19;:29;:::i;:::-;25991:12;:44;26052:19;;;;;;;;;;;;;;;;;25581:687;;;26113:20;:6;22560;26113:20;:10;:20;:::i;:::-;26100:10;:33;26162:9;;26145:14;:26;;;26198:23;;22560:6;26198:23;:13;:23;:::i;:::-;26183:12;:38;26238:19;;;;;;;;;;;;;;;;;25581:687;21139:1;25442:832;:::o;24993:443::-;25034:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25067:14;25084:18;25091:10;25084:6;:18::i;:::-;25067:35;-1:-1:-1;25116:10:2;;25112:318;;25150:10;25164:1;25142:19;;;:7;:19;;;;;;;;:23;;;25215:3;;25203:37;;;;;;;25142:19;25215:3;;;;25203:35;;:37;;;;;;;;;;;25164:1;25215:3;25203:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25203:37:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25203:37:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25203:37:2;;-1:-1:-1;25254:18:2;25275:37;25305:6;25275:25;:6;25203:37;25275:25;:10;:25;:::i;:37::-;25326:3;;25254:58;;-1:-1:-1;25326:40:2;;:3;;25343:10;25254:58;25326:40;:16;:40;:::i;:::-;25385:34;;;;;;;;25396:10;;25385:34;;;;;;;;;;25112:318;;23235:1;24993:443;:::o;21812:108::-;21895:18;;21869:7;21895:18;;;:9;:18;;;;;;;21812:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22706:29::-;;;;:::o;23577:129::-;23634:7;23660:39;23669:15;23686:12;;23660:8;:39::i;:::-;23653:46;;23577:129;:::o;22817:57::-;;;;;;;;;;;;;:::o;22588:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;24473:198::-;24524:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24574:1;24565:6;:10;24557:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24604:19;24616:6;24604:11;:19::i;:::-;24638:26;;;;;;;;24645:10;;24638:26;;;;;;;;;;24473:198;;:::o;22741:29::-;;;;:::o;23712:408::-;23759:7;23782:13;:11;:13::i;:::-;23778:76;;-1:-1:-1;23823:20:2;;23816:27;;23778:76;23882:231;23924:175;24085:13;:11;:13::i;:::-;23924:135;24054:4;23924:104;24017:10;;23924:67;23976:14;;23924:26;:24;:26::i;:175::-;23882:20;;;:231;:24;:231;:::i;22776:35::-;;;;:::o;24893:94::-;24928:31;24937:21;24947:10;24937:9;:21::i;:::-;24928:8;:31::i;:::-;24969:11;:9;:11::i;:::-;24893:94::o;22669:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:2:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:2;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22159:211;22225:12;;:24;;22242:6;22225:24;:16;:24;:::i;:::-;22210:12;:39;22293:10;22283:21;;;;:9;:21;;;;;;:33;;22309:6;22283:33;:25;:33;:::i;:::-;22269:10;22259:21;;;;:9;:21;;;;;:57;;;;22326:4;;:37;;22259:21;22326:4;;;;22356:6;22326:17;:37::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:2;;;;;;;;25:18:-1;;61:17;;17776:58:2;182:15:-1;17799:23:2;179:29:-1;160:49;;17750:85:2;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:2;;1848:104;-1:-1:-1;1848:104:2:o;21926:227::-;21989:12;;:24;;22006:6;21989:24;:16;:24;:::i;:::-;21974:12;:39;22057:10;22047:21;;;;:9;:21;;;;;;:33;;22073:6;22047:33;:25;:33;:::i;:::-;22033:10;22023:21;;;;:9;:21;;;;;:57;;;;22090:4;;:56;;22023:21;22090:4;;;;22132;22139:6;22090:21;:56::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:2;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:2;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:2:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:2;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:2;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:2;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:2;;;;;;;;25:18:-1;;61:17;;17974:68:2;182:15:-1;17997:27:2;179:29:-1;160:49;;17948:95:2;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:2:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public comp = IERC20(0xc00e94Cb662C3520282E6f5717214004A7f26888);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n comp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n comp.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMCOMPPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart() {\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMCOMPPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMCOMPPool.sol", - "exportedSymbols": { - "Address": [ - 1892 - ], - "Context": [ - 1638 - ], - "IERC20": [ - 1818 - ], - "IRewardDistributionRecipient": [ - 2143 - ], - "LPTokenWrapper": [ - 2259 - ], - "Math": [ - 1426 - ], - "Ownable": [ - 1750 - ], - "SafeERC20": [ - 2108 - ], - "SafeMath": [ - 1612 - ], - "YAM": [ - 2150 - ], - "YAMCOMPPool": [ - 2678 - ] - }, - "id": 2679, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1359, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 1426, - "linearizedBaseContracts": [ - 1426 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1375, - "nodeType": "Block", - "src": "1739:38:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1368, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1361, - "src": "1756:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1369, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1363, - "src": "1761:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 1372, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1363, - "src": "1769:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:2", - "trueExpression": { - "argumentTypes": null, - "id": 1371, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1361, - "src": "1765:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1367, - "id": 1374, - "nodeType": "Return", - "src": "1749:21:2" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 1376, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1361, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1376, - "src": "1685:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1360, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1363, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1376, - "src": "1696:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1362, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:2" - }, - "returnParameters": { - "id": 1367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1366, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1376, - "src": "1730:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:2" - }, - "scope": 1426, - "src": "1672:105:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1392, - "nodeType": "Block", - "src": "1915:37:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1385, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1378, - "src": "1932:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1386, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "1936:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 1389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "1944:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:2", - "trueExpression": { - "argumentTypes": null, - "id": 1388, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1378, - "src": "1940:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1384, - "id": 1391, - "nodeType": "Return", - "src": "1925:20:2" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 1393, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1381, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1378, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1393, - "src": "1861:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1377, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1380, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1393, - "src": "1872:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1379, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:2" - }, - "returnParameters": { - "id": 1384, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1383, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1393, - "src": "1906:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1382, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:2" - }, - "scope": 1426, - "src": "1848:104:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1424, - "nodeType": "Block", - "src": "2136:119:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1402, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1395, - "src": "2208:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1403, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1405, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1406, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "2218:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1409, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1411, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1395, - "src": "2229:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "2237:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1418, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1421, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1401, - "id": 1423, - "nodeType": "Return", - "src": "2200:48:2" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 1425, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1395, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1425, - "src": "2082:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1397, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1425, - "src": "2093:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:2" - }, - "returnParameters": { - "id": 1401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1400, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1425, - "src": "2127:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1399, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:2" - }, - "scope": 1426, - "src": "2065:190:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "1589:668:2" - }, - { - "id": 1427, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 1612, - "linearizedBaseContracts": [ - 1612 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1451, - "nodeType": "Block", - "src": "3212:109:2", - "statements": [ - { - "assignments": [ - 1437 - ], - "declarations": [ - { - "constant": false, - "id": 1437, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1451, - "src": "3222:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1436, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1441, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1438, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1429, - "src": "3234:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1439, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1431, - "src": "3238:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1443, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1437, - "src": "3257:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1444, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1429, - "src": "3262:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 1446, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 1442, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1448, - "nodeType": "ExpressionStatement", - "src": "3249:46:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1449, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1437, - "src": "3313:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1435, - "id": 1450, - "nodeType": "Return", - "src": "3306:8:2" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 1452, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1452, - "src": "3158:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1452, - "src": "3169:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:2" - }, - "returnParameters": { - "id": 1435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1452, - "src": "3203:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:2" - }, - "scope": 1612, - "src": "3145:176:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1467, - "nodeType": "Block", - "src": "3652:67:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1462, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "3673:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1463, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "3676:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 1464, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 1461, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1468, - 1495 - ], - "referencedDeclaration": 1495, - "src": "3669:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1460, - "id": 1466, - "nodeType": "Return", - "src": "3662:50:2" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 1468, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1454, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1468, - "src": "3598:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1453, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1456, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1468, - "src": "3609:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1455, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:2" - }, - "returnParameters": { - "id": 1460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1459, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1468, - "src": "3643:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:2" - }, - "scope": 1612, - "src": "3585:134:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1494, - "nodeType": "Block", - "src": "4138:92:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1480, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1472, - "src": "4156:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1481, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1470, - "src": "4161:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1483, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1474, - "src": "4164:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1479, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1485, - "nodeType": "ExpressionStatement", - "src": "4148:29:2" - }, - { - "assignments": [ - 1487 - ], - "declarations": [ - { - "constant": false, - "id": 1487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1494, - "src": "4187:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1470, - "src": "4199:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1472, - "src": "4203:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1492, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1487, - "src": "4222:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1478, - "id": 1493, - "nodeType": "Return", - "src": "4215:8:2" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 1495, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1470, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4056:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1469, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1472, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4067:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1474, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4078:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1473, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:2" - }, - "returnParameters": { - "id": 1478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4129:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:2" - }, - "scope": 1612, - "src": "4043:187:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1528, - "nodeType": "Block", - "src": "4537:392:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1504, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1497, - "src": "4769:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1505, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1510, - "nodeType": "IfStatement", - "src": "4765:45:2", - "trueBody": { - "id": 1509, - "nodeType": "Block", - "src": "4777:33:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1507, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 1503, - "id": 1508, - "nodeType": "Return", - "src": "4791:8:2" - } - ] - } - }, - { - "assignments": [ - 1512 - ], - "declarations": [ - { - "constant": false, - "id": 1512, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1528, - "src": "4820:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1511, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1516, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1513, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1497, - "src": "4832:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1514, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1499, - "src": "4836:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1518, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "4855:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1519, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1497, - "src": "4859:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1521, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1499, - "src": "4864:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 1523, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 1517, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1525, - "nodeType": "ExpressionStatement", - "src": "4847:56:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1526, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "4921:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1503, - "id": 1527, - "nodeType": "Return", - "src": "4914:8:2" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 1529, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1500, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1497, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1529, - "src": "4483:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1496, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1499, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1529, - "src": "4494:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1498, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:2" - }, - "returnParameters": { - "id": 1503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1502, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1529, - "src": "4528:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1501, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:2" - }, - "scope": 1612, - "src": "4470:459:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1544, - "nodeType": "Block", - "src": "5451:63:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1539, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1531, - "src": "5472:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1540, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "5475:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 1541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 1538, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1545, - 1572 - ], - "referencedDeclaration": 1572, - "src": "5468:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1537, - "id": 1543, - "nodeType": "Return", - "src": "5461:46:2" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 1545, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1534, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1531, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "5397:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1530, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1533, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "5408:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1532, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:2" - }, - "returnParameters": { - "id": 1537, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1536, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "5442:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1535, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:2" - }, - "scope": 1612, - "src": "5384:130:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1571, - "nodeType": "Block", - "src": "6124:243:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1557, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1549, - "src": "6208:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1560, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1551, - "src": "6215:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1556, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1562, - "nodeType": "ExpressionStatement", - "src": "6200:28:2" - }, - { - "assignments": [ - 1564 - ], - "declarations": [ - { - "constant": false, - "id": 1564, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "6238:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1563, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1568, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1565, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1547, - "src": "6250:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1566, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1549, - "src": "6254:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1569, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1564, - "src": "6359:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1555, - "id": 1570, - "nodeType": "Return", - "src": "6352:8:2" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 1572, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1547, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6042:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1549, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6053:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1551, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6064:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1550, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:2" - }, - "returnParameters": { - "id": 1555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6115:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:2" - }, - "scope": 1612, - "src": "6029:338:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1587, - "nodeType": "Block", - "src": "6878:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1582, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1574, - "src": "6899:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1583, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "6902:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 1584, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 1581, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1588, - 1611 - ], - "referencedDeclaration": 1611, - "src": "6895:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1580, - "id": 1586, - "nodeType": "Return", - "src": "6888:44:2" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 1588, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1577, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1574, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1588, - "src": "6824:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1573, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1576, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1588, - "src": "6835:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1575, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:2" - }, - "returnParameters": { - "id": 1580, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1579, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1588, - "src": "6869:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:2" - }, - "scope": 1612, - "src": "6811:128:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1610, - "nodeType": "Block", - "src": "7538:68:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1600, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1592, - "src": "7556:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1603, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1594, - "src": "7564:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1599, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1605, - "nodeType": "ExpressionStatement", - "src": "7548:29:2" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1606, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1590, - "src": "7594:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 1607, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1592, - "src": "7598:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1598, - "id": 1609, - "nodeType": "Return", - "src": "7587:12:2" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 1611, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1590, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7456:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1592, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7467:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1591, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1594, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7478:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1593, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:2" - }, - "returnParameters": { - "id": 1598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1597, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7529:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1596, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:2" - }, - "scope": 1612, - "src": "7443:163:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "2900:4708:2" - }, - { - "id": 1613, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1638, - "linearizedBaseContracts": [ - 1638 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1616, - "nodeType": "Block", - "src": "8386:3:2", - "statements": [] - }, - "documentation": null, - "id": 1617, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1614, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:2" - }, - "returnParameters": { - "id": 1615, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:2" - }, - "scope": 1638, - "src": "8362:27:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1625, - "nodeType": "Block", - "src": "8510:34:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1622, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 1621, - "id": 1624, - "nodeType": "Return", - "src": "8520:17:2" - } - ] - }, - "documentation": null, - "id": 1626, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1618, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:2" - }, - "returnParameters": { - "id": 1621, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1620, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1626, - "src": "8493:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 1619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:2", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:2" - }, - "scope": 1638, - "src": "8448:96:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1636, - "nodeType": "Block", - "src": "8607:165:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1631, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19285, - "src": "8617:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$1638", - "typeString": "contract Context" - } - }, - "id": 1632, - "nodeType": "ExpressionStatement", - "src": "8617:4:2" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1633, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 1630, - "id": 1635, - "nodeType": "Return", - "src": "8750:15:2" - } - ] - }, - "documentation": null, - "id": 1637, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1627, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:2" - }, - "returnParameters": { - "id": 1630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1629, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1637, - "src": "8593:12:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1628, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:2" - }, - "scope": 1638, - "src": "8550:222:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "8185:589:2" - }, - { - "id": 1639, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:2" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1640, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1638, - "src": "9238:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$1638", - "typeString": "contract Context" - } - }, - "id": 1641, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:2" - } - ], - "contractDependencies": [ - 1638 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 1750, - "linearizedBaseContracts": [ - 1750, - 1638 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1643, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 1750, - "src": "9252:22:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 1649, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 1648, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1645, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 1649, - "src": "9308:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1644, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1647, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 1649, - "src": "9339:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1646, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:2" - }, - "src": "9281:84:2" - }, - { - "body": { - "id": 1664, - "nodeType": "Block", - "src": "9491:93:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1652, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "9501:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1653, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1626, - "src": "9510:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1656, - "nodeType": "ExpressionStatement", - "src": "9501:21:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:2", - "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": 1658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1661, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "9570:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1657, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1649, - "src": "9537:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1663, - "nodeType": "EmitStatement", - "src": "9532:45:2" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 1665, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1650, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:2" - }, - "returnParameters": { - "id": 1651, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:2" - }, - "scope": 1750, - "src": "9467:117:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1672, - "nodeType": "Block", - "src": "9707:30:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1670, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "9724:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 1669, - "id": 1671, - "nodeType": "Return", - "src": "9717:13:2" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 1673, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1666, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:2" - }, - "returnParameters": { - "id": 1669, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1668, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1673, - "src": "9698:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:2" - }, - "scope": 1750, - "src": "9660:77:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1682, - "nodeType": "Block", - "src": "9846:82:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1676, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1694, - "src": "9864:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 1677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 1678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 1675, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1680, - "nodeType": "ExpressionStatement", - "src": "9856:54:2" - }, - { - "id": 1681, - "nodeType": "PlaceholderStatement", - "src": "9920:1:2" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 1683, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1674, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:2" - }, - "src": "9825:103:2", - "visibility": "internal" - }, - { - "body": { - "id": 1693, - "nodeType": "Block", - "src": "10057:46:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1688, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1626, - "src": "10074:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1690, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "10090:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1687, - "id": 1692, - "nodeType": "Return", - "src": "10067:29:2" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 1694, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1684, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:2" - }, - "returnParameters": { - "id": 1687, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1686, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "10051:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1685, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:2" - }, - "scope": 1750, - "src": "10011:92:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1712, - "nodeType": "Block", - "src": "10491:91:2", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1700, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "10527:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:2", - "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": 1701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1699, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1649, - "src": "10506:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1705, - "nodeType": "EmitStatement", - "src": "10501:45:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1706, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "10556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:2", - "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": 1707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1711, - "nodeType": "ExpressionStatement", - "src": "10556:19:2" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 1713, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1697, - "modifierName": { - "argumentTypes": null, - "id": 1696, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1683, - "src": "10481:9:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:2" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1695, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:2" - }, - "returnParameters": { - "id": 1698, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:2" - }, - "scope": 1750, - "src": "10445:137:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1724, - "nodeType": "Block", - "src": "10793:45:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1721, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1715, - "src": "10822:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1720, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1749, - "src": "10803:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 1722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1723, - "nodeType": "ExpressionStatement", - "src": "10803:28:2" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 1725, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1718, - "modifierName": { - "argumentTypes": null, - "id": 1717, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1683, - "src": "10783:9:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:2" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1716, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1715, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 1725, - "src": "10758:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1714, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:2" - }, - "returnParameters": { - "id": 1719, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:2" - }, - "scope": 1750, - "src": "10731:107:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1748, - "nodeType": "Block", - "src": "10994:170:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1731, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1727, - "src": "11012:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:2", - "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": 1732, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 1736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 1730, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1738, - "nodeType": "ExpressionStatement", - "src": "11004:73:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1740, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "11113:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1741, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1727, - "src": "11121:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1739, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1649, - "src": "11092:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1743, - "nodeType": "EmitStatement", - "src": "11087:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1744, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "11140:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1745, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1727, - "src": "11149:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1747, - "nodeType": "ExpressionStatement", - "src": "11140:17:2" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 1749, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1728, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1727, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 1749, - "src": "10967:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1726, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:2" - }, - "returnParameters": { - "id": 1729, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:2" - }, - "scope": 1750, - "src": "10939:225:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "9218:1948:2" - }, - { - "id": 1751, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 1818, - "linearizedBaseContracts": [ - 1818 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 1756, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1752, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:2" - }, - "returnParameters": { - "id": 1755, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1754, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1756, - "src": "11541:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1753, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:2" - }, - "scope": 1818, - "src": "11495:55:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 1763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1758, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1763, - "src": "11652:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:2" - }, - "returnParameters": { - "id": 1762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1763, - "src": "11692:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:2" - }, - "scope": 1818, - "src": "11633:68:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 1772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1765, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 1772, - "src": "11939:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1772, - "src": "11958:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:2" - }, - "returnParameters": { - "id": 1771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1772, - "src": "11992:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:2" - }, - "scope": 1818, - "src": "11921:77:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 1781, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1777, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1774, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1781, - "src": "12292:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1776, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1781, - "src": "12307:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:2" - }, - "returnParameters": { - "id": 1780, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1779, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1781, - "src": "12347:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1778, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:2" - }, - "scope": 1818, - "src": "12273:83:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 1790, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1783, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1790, - "src": "13026:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1782, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1785, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1790, - "src": "13043:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1784, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:2" - }, - "returnParameters": { - "id": 1789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1790, - "src": "13077:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1787, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:2" - }, - "scope": 1818, - "src": "13009:74:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 1801, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1797, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1792, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13412:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1791, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1794, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13428:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1793, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1796, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13447:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1795, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:2" - }, - "returnParameters": { - "id": 1800, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1799, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13481:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1798, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:2" - }, - "scope": 1818, - "src": "13390:97:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 1809, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1808, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1803, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1809, - "src": "13671:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1805, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1809, - "src": "13693:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1804, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1807, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1809, - "src": "13713:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1806, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:2" - }, - "src": "13656:72:2" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 1817, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1811, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1817, - "src": "13902:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1810, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1813, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1817, - "src": "13925:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1812, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1815, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1817, - "src": "13950:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1814, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:2" - }, - "src": "13887:78:2" - } - ], - "scope": 2679, - "src": "11401:2566:2" - }, - { - "id": 1819, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 1892, - "linearizedBaseContracts": [ - 1892 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1843, - "nodeType": "Block", - "src": "14644:731:2", - "statements": [ - { - "assignments": [ - 1827 - ], - "declarations": [ - { - "constant": false, - "id": 1827, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 1843, - "src": "15083:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1826, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1828, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:2" - }, - { - "assignments": [ - 1830 - ], - "declarations": [ - { - "constant": false, - "id": 1830, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 1843, - "src": "15109:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1829, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1832, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:2" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 1827, - "isOffset": false, - "isSlot": false, - "src": "15274:8:2", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 1821, - "isOffset": false, - "isSlot": false, - "src": "15298:7:2", - "valueSize": 1 - } - } - ], - "id": 1833, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1834, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1827, - "src": "15325:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1835, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1837, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1827, - "src": "15344:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 1838, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1830, - "src": "15356:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1841, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1825, - "id": 1842, - "nodeType": "Return", - "src": "15317:51:2" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 1844, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1822, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1821, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1844, - "src": "14598:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1820, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:2" - }, - "returnParameters": { - "id": 1825, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1824, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1844, - "src": "14638:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1823, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:2" - }, - "scope": 1892, - "src": "14578:797:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1857, - "nodeType": "Block", - "src": "15660:49:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1853, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1846, - "src": "15693:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 1854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 1851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 1850, - "id": 1856, - "nodeType": "Return", - "src": "15670:32:2" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 1858, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1846, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1858, - "src": "15603:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1845, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:2" - }, - "returnParameters": { - "id": 1850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1849, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1858, - "src": "15643:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 1848, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:2", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:2" - }, - "scope": 1892, - "src": "15584:125:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1890, - "nodeType": "Block", - "src": "16737:294:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1867, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19291, - "src": "16763:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$1892", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$1892", - "typeString": "library Address" - } - ], - "id": 1866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1870, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1862, - "src": "16780:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 1872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 1865, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1874, - "nodeType": "ExpressionStatement", - "src": "16747:73:2" - }, - { - "assignments": [ - 1876, - null - ], - "declarations": [ - { - "constant": false, - "id": 1876, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1890, - "src": "16886:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1875, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 1884, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 1880, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1862, - "src": "16925:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1877, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1860, - "src": "16904:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 1878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:2", - "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": 1879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 1881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:2", - "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": 1883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1886, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1876, - "src": "16954:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 1887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 1885, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1889, - "nodeType": "ExpressionStatement", - "src": "16946:78:2" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 1891, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1860, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 1891, - "src": "16685:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 1859, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:2", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1862, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1891, - "src": "16712:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1861, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:2" - }, - "returnParameters": { - "id": 1864, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:2" - }, - "scope": 1892, - "src": "16666:365:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "14114:2919:2" - }, - { - "id": 1893, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 2108, - "linearizedBaseContracts": [ - 2108 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 1896, - "libraryName": { - "contractScope": null, - "id": 1894, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1612, - "src": "17610:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$1612", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:2", - "typeName": { - "id": 1895, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 1899, - "libraryName": { - "contractScope": null, - "id": 1897, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1892, - "src": "17642:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$1892", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:2", - "typeName": { - "id": 1898, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 1920, - "nodeType": "Block", - "src": "17740:102:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1909, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1901, - "src": "17769:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1912, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1901, - "src": "17799:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1772, - "src": "17799:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 1914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 1915, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1903, - "src": "17824:2:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1916, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "17828:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1910, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 1917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1908, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "17750:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 1918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1919, - "nodeType": "ExpressionStatement", - "src": "17750:85:2" - } - ] - }, - "documentation": null, - "id": 1921, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1901, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1921, - "src": "17690:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1900, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "17690:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1903, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1921, - "src": "17704:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1905, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1921, - "src": "17716:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:2" - }, - "returnParameters": { - "id": 1907, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:2" - }, - "scope": 2108, - "src": "17668:174:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1945, - "nodeType": "Block", - "src": "17938:112:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1933, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1923, - "src": "17967:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1936, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1923, - "src": "17997:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1801, - "src": "17997:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 1938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 1939, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1925, - "src": "18026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1940, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "18032:2:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1941, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1929, - "src": "18036:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1934, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 1942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1932, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "17948:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 1943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1944, - "nodeType": "ExpressionStatement", - "src": "17948:95:2" - } - ] - }, - "documentation": null, - "id": 1946, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1930, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1923, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17874:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1922, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "17874:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1925, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17888:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1924, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1927, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17902:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1926, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1929, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17914:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:2" - }, - "returnParameters": { - "id": 1931, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:2" - }, - "scope": 2108, - "src": "17848:202:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1986, - "nodeType": "Block", - "src": "18132:536:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1956, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1952, - "src": "18421:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1957, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1959, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1963, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19293, - "src": "18461:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - ], - "id": 1962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1965, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1950, - "src": "18468:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1948, - "src": "18437:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 1781, - "src": "18437:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 1966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1969, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 1971, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 1955, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1973, - "nodeType": "ExpressionStatement", - "src": "18412:150:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1975, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1948, - "src": "18591:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1978, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1948, - "src": "18621:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 1790, - "src": "18621:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 1980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 1981, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1950, - "src": "18645:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1982, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1952, - "src": "18654:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1976, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1977, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 1983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1974, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "18572:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 1984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1985, - "nodeType": "ExpressionStatement", - "src": "18572:89:2" - } - ] - }, - "documentation": null, - "id": 1987, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1953, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1948, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "18077:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1947, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "18077:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1950, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "18091:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1949, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1952, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "18108:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1951, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:2" - }, - "returnParameters": { - "id": 1954, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:2" - }, - "scope": 2108, - "src": "18056:612:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2021, - "nodeType": "Block", - "src": "18760:196:2", - "statements": [ - { - "assignments": [ - 1997 - ], - "declarations": [ - { - "constant": false, - "id": 1997, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "18770:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1996, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2008, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2006, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1993, - "src": "18837:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2001, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19293, - "src": "18817:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - ], - "id": 2000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2003, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "18824:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1998, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "18793:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 1781, - "src": "18793:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 2004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "18793:43:2", - "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": 2007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2010, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "18872:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2013, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "18902:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 1790, - "src": "18902:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 2015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 2016, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "18926:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2017, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "18935:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2011, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2009, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "18853:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 2019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2020, - "nodeType": "ExpressionStatement", - "src": "18853:96:2" - } - ] - }, - "documentation": null, - "id": 2022, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1994, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1989, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 2022, - "src": "18705:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1988, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "18705:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1991, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2022, - "src": "18719:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1993, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 2022, - "src": "18736:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1992, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:2" - }, - "returnParameters": { - "id": 1995, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:2" - }, - "scope": 2108, - "src": "18674:282:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2057, - "nodeType": "Block", - "src": "19048:241:2", - "statements": [ - { - "assignments": [ - 2032 - ], - "declarations": [ - { - "constant": false, - "id": 2032, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 2057, - "src": "19058:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2031, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2044, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2041, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2028, - "src": "19125:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2036, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19293, - "src": "19105:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - ], - "id": 2035, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2038, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2026, - "src": "19112:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2033, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2024, - "src": "19081:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 1781, - "src": "19081:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 2039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1495, - "src": "19081:43:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2046, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2024, - "src": "19205:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2024, - "src": "19235:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 1790, - "src": "19235:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 2051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 2052, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2026, - "src": "19259:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2053, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2032, - "src": "19268:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2047, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 2054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2045, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "19186:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 2055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2056, - "nodeType": "ExpressionStatement", - "src": "19186:96:2" - } - ] - }, - "documentation": null, - "id": 2058, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2029, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2024, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 2058, - "src": "18993:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2023, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "18993:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2026, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2058, - "src": "19007:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2025, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2028, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 2058, - "src": "19024:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2027, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:2" - }, - "returnParameters": { - "id": 2030, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:2" - }, - "scope": 2108, - "src": "18962:327:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2106, - "nodeType": "Block", - "src": "19741:1026:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2067, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2060, - "src": "20275:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - ], - "id": 2066, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 1844, - "src": "20267:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 2070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 2071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 2065, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2073, - "nodeType": "ExpressionStatement", - "src": "20259:71:2" - }, - { - "assignments": [ - 2075, - 2077 - ], - "declarations": [ - { - "constant": false, - "id": 2075, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2106, - "src": "20401:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2074, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2077, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 2106, - "src": "20415:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2076, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2084, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2082, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2062, - "src": "20462:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2079, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2060, - "src": "20450:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - ], - "id": 2078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:2", - "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": 2083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2086, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2075, - "src": "20485:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 2087, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 2085, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2089, - "nodeType": "ExpressionStatement", - "src": "20477:52:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2090, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2077, - "src": "20544:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 2091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2092, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2105, - "nodeType": "IfStatement", - "src": "20540:221:2", - "trueBody": { - "id": 2104, - "nodeType": "Block", - "src": "20567:194:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2097, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2077, - "src": "20684:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 2098, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 2099, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 2095, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2096, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 2100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 2101, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 2094, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2103, - "nodeType": "ExpressionStatement", - "src": "20665:85:2" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 2107, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2063, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2060, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 2107, - "src": "19700:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2059, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "19700:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2062, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 2107, - "src": "19714:17:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2061, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:2" - }, - "returnParameters": { - "id": 2064, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:2" - }, - "scope": 2108, - "src": "19672:1095:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 2679, - "src": "17580:3189:2" - }, - { - "id": 2109, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:2" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2110, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1750, - "src": "20892:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$1750", - "typeString": "contract Ownable" - } - }, - "id": 2111, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:2" - } - ], - "contractDependencies": [ - 1638, - 1750 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 2143, - "linearizedBaseContracts": [ - 2143, - 1750, - 1638 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2113, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 2143, - "src": "20906:33:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2112, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 2118, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2116, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2115, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2118, - "src": "20974:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2114, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:2" - }, - "returnParameters": { - "id": 2117, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:2" - }, - "scope": 2143, - "src": "20946:53:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 2129, - "nodeType": "Block", - "src": "21039:108:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2121, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1626, - "src": "21057:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2123, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2113, - "src": "21073:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 2125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 2120, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2127, - "nodeType": "ExpressionStatement", - "src": "21049:80:2" - }, - { - "id": 2128, - "nodeType": "PlaceholderStatement", - "src": "21139:1:2" - } - ] - }, - "documentation": null, - "id": 2130, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2119, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:2" - }, - "src": "21005:142:2", - "visibility": "internal" - }, - { - "body": { - "id": 2141, - "nodeType": "Block", - "src": "21252:57:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2137, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2113, - "src": "21262:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2138, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "21283:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2140, - "nodeType": "ExpressionStatement", - "src": "21262:40:2" - } - ] - }, - "documentation": null, - "id": 2142, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2135, - "modifierName": { - "argumentTypes": null, - "id": 2134, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1683, - "src": "21238:9:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:2" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2133, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2132, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "21184:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2131, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:2" - }, - "returnParameters": { - "id": 2136, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:2" - }, - "scope": 2143, - "src": "21153:156:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 2679, - "src": "20851:460:2" - }, - { - "id": 2144, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 2150, - "linearizedBaseContracts": [ - 2150 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 2149, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2145, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:2" - }, - "returnParameters": { - "id": 2148, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2147, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2149, - "src": "21443:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2146, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:2" - }, - "scope": 2150, - "src": "21396:56:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 2679, - "src": "21376:78:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2259, - "linearizedBaseContracts": [ - 2259 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 2153, - "libraryName": { - "contractScope": null, - "id": 2151, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1612, - "src": "21494:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$1612", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:2", - "typeName": { - "id": 2152, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 2156, - "libraryName": { - "contractScope": null, - "id": 2154, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2108, - "src": "21526:9:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:2", - "typeName": { - "contractScope": null, - "id": 2155, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "21540:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 2161, - "name": "comp", - "nodeType": "VariableDeclaration", - "scope": 2259, - "src": "21553:71:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2157, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "21553:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307863303065393443623636324333353230323832453666353731373231343030344137663236383838", - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xc00e94Cb662C3520282E6f5717214004A7f26888" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2158, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1818, - "src": "21574:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$1818_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 2160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2163, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 2259, - "src": "21631:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2167, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 2259, - "src": "21665:45:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2166, - "keyType": { - "id": 2164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 2174, - "nodeType": "Block", - "src": "21770:36:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2172, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "21787:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2171, - "id": 2173, - "nodeType": "Return", - "src": "21780:19:2" - } - ] - }, - "documentation": null, - "id": 2175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2168, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:2" - }, - "returnParameters": { - "id": 2171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2170, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2175, - "src": "21761:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2169, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:2" - }, - "scope": 2259, - "src": "21717:89:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2186, - "nodeType": "Block", - "src": "21878:42:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2182, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "21895:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2184, - "indexExpression": { - "argumentTypes": null, - "id": 2183, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2177, - "src": "21905:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2181, - "id": 2185, - "nodeType": "Return", - "src": "21888:25:2" - } - ] - }, - "documentation": null, - "id": 2187, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2178, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2177, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2187, - "src": "21831:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:2" - }, - "returnParameters": { - "id": 2181, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2180, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2187, - "src": "21869:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:2" - }, - "scope": 2259, - "src": "21812:108:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2223, - "nodeType": "Block", - "src": "21964:189:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2192, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "21974:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2195, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "22006:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2193, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "21989:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "21989:16:2", - "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": 2196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2198, - "nodeType": "ExpressionStatement", - "src": "21974:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2199, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22023:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2202, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2200, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "22073:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2203, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22047:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2206, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2204, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "22047:25:2", - "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": 2209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2211, - "nodeType": "ExpressionStatement", - "src": "22023:57:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2215, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2218, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19299, - "src": "22132:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$2259", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$2259", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 2217, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2220, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "22139:6:2", - "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, - "id": 2212, - "name": "comp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2161, - "src": "22090:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1946, - "src": "22090:21:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1818_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 2221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2222, - "nodeType": "ExpressionStatement", - "src": "22090:56:2" - } - ] - }, - "documentation": null, - "id": 2224, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2189, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2224, - "src": "21941:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:2" - }, - "returnParameters": { - "id": 2191, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:2" - }, - "scope": 2259, - "src": "21926:227:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2257, - "nodeType": "Block", - "src": "22200:170:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2229, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "22210:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2232, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2226, - "src": "22242:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2230, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "22225:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "22225:16:2", - "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": 2233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2235, - "nodeType": "ExpressionStatement", - "src": "22210:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2236, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22259:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2239, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2237, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2245, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2226, - "src": "22309:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2240, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22283:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2243, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2241, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "22283:25:2", - "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": 2246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2248, - "nodeType": "ExpressionStatement", - "src": "22259:57:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2252, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2254, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2226, - "src": "22356:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2249, - "name": "comp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2161, - "src": "22326:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1921, - "src": "22326:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1818_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2256, - "nodeType": "ExpressionStatement", - "src": "22326:37:2" - } - ] - }, - "documentation": null, - "id": 2258, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2226, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2258, - "src": "22177:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:2" - }, - "returnParameters": { - "id": 2228, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:2" - }, - "scope": 2259, - "src": "22159:211:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2679, - "src": "21458:914:2" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2260, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2259, - "src": "22398:14:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$2259", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 2261, - "nodeType": "InheritanceSpecifier", - "src": "22398:14:2" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2262, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2143, - "src": "22414:28:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$2143", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 2263, - "nodeType": "InheritanceSpecifier", - "src": "22414:28:2" - } - ], - "contractDependencies": [ - 1638, - 1750, - 2143, - 2259 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2678, - "linearizedBaseContracts": [ - 2678, - 2143, - 1750, - 1638, - 2259 - ], - "name": "YAMCOMPPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2268, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22449:70:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2264, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "22449:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 2266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22476:42:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2265, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1818, - "src": "22469:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$1818_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22469:50:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2271, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22525:41:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2269, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22525:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 2270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22560:6:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2274, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22588:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22588:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 2273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22615:10:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2277, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22669:31:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2275, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22669:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 2276, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22699:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2280, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22706:29:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2278, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22706:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 2279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22734:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2282, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22741:29:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2281, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22741:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2284, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22776:35:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22776:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2288, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22817:57:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2287, - "keyType": { - "id": 2285, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22825:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22817:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2286, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22836:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2292, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22880:42:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2291, - "keyType": { - "id": 2289, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22888:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22880:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2290, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22899:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 2296, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 2295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2294, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2296, - "src": "22947:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22947:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22946:16:2" - }, - "src": "22929:34:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 2302, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 2301, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2298, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 2302, - "src": "22981:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22981:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2300, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2302, - "src": "23003:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2299, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22980:38:2" - }, - "src": "22968:51:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 2308, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 2307, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2304, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 2308, - "src": "23040:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2303, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23040:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2306, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2308, - "src": "23062:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2305, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23062:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23039:38:2" - }, - "src": "23024:54:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 2314, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 2313, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2310, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 2314, - "src": "23100:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23100:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2312, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2314, - "src": "23122:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2311, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23122:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23099:38:2" - }, - "src": "23083:55:2" - }, - { - "body": { - "id": 2325, - "nodeType": "Block", - "src": "23166:77:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2317, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23184:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23184:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2319, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "23203:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23184:28:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 2321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23213:11:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 2316, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23176:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23176:49:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2323, - "nodeType": "ExpressionStatement", - "src": "23176:49:2" - }, - { - "id": 2324, - "nodeType": "PlaceholderStatement", - "src": "23235:1:2" - } - ] - }, - "documentation": null, - "id": 2326, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2315, - "nodeType": "ParameterList", - "parameters": [], - "src": "23163:2:2" - }, - "src": "23144:99:2", - "visibility": "internal" - }, - { - "body": { - "id": 2362, - "nodeType": "Block", - "src": "23288:283:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2330, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23298:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2331, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2409, - "src": "23321:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23321:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23298:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2334, - "nodeType": "ExpressionStatement", - "src": "23298:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2335, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "23347:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2336, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2376, - "src": "23364:24:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23364:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23347:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2339, - "nodeType": "ExpressionStatement", - "src": "23347:43:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2340, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23404:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2342, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23423:1:2", - "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": 2341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23415:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23415:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23404:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2360, - "nodeType": "IfStatement", - "src": "23400:154:2", - "trueBody": { - "id": 2359, - "nodeType": "Block", - "src": "23427:127:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2345, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "23441:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2347, - "indexExpression": { - "argumentTypes": null, - "id": 2346, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23449:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23441:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2349, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23467:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2348, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2438, - "src": "23460:6:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23460:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23441:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2352, - "nodeType": "ExpressionStatement", - "src": "23441:34:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2353, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2288, - "src": "23489:22:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2355, - "indexExpression": { - "argumentTypes": null, - "id": 2354, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23512:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23489:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2356, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23523:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23489:54:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2358, - "nodeType": "ExpressionStatement", - "src": "23489:54:2" - } - ] - } - }, - { - "id": 2361, - "nodeType": "PlaceholderStatement", - "src": "23563:1:2" - } - ] - }, - "documentation": null, - "id": 2363, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2328, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2363, - "src": "23271:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2327, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23271:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23270:17:2" - }, - "src": "23249:322:2", - "visibility": "internal" - }, - { - "body": { - "id": 2375, - "nodeType": "Block", - "src": "23643:63:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2370, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23669:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23669:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2372, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "23686:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2368, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1426, - "src": "23660:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$1426_$", - "typeString": "type(library Math)" - } - }, - "id": 2369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 1393, - "src": "23660:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23660:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2367, - "id": 2374, - "nodeType": "Return", - "src": "23653:46:2" - } - ] - }, - "documentation": null, - "id": 2376, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2364, - "nodeType": "ParameterList", - "parameters": [], - "src": "23610:2:2" - }, - "returnParameters": { - "id": 2367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2366, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2376, - "src": "23634:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23634:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23633:9:2" - }, - "scope": 2678, - "src": "23577:129:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2408, - "nodeType": "Block", - "src": "23768:352:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2381, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2175, - "src": "23782:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23782:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23799:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23782:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2388, - "nodeType": "IfStatement", - "src": "23778:76:2", - "trueBody": { - "id": 2387, - "nodeType": "Block", - "src": "23802:52:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2385, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23823:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2380, - "id": 2386, - "nodeType": "Return", - "src": "23816:27:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2403, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2175, - "src": "24085:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24085:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 2400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24054:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2397, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "24017:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2394, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "23976:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2391, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2376, - "src": "23924:24:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "23924:51:2", - "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": 2395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "23924:92:2", - "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": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:104:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "23924:129:2", - "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": 2401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:135:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "23924:160:2", - "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": 2405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:175:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2389, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23882:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "23882:24:2", - "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": 2406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23882:231:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2380, - "id": 2407, - "nodeType": "Return", - "src": "23863:250:2" - } - ] - }, - "documentation": null, - "id": 2409, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2377, - "nodeType": "ParameterList", - "parameters": [], - "src": "23735:2:2" - }, - "returnParameters": { - "id": 2380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2379, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2409, - "src": "23759:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2378, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23759:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23758:9:2" - }, - "scope": 2678, - "src": "23712:408:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2437, - "nodeType": "Block", - "src": "24189:196:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2432, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "24361:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2434, - "indexExpression": { - "argumentTypes": null, - "id": 2433, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2411, - "src": "24369:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24361:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24334:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2423, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2288, - "src": "24279:22:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2425, - "indexExpression": { - "argumentTypes": null, - "id": 2424, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2411, - "src": "24302:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24279:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2420, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2409, - "src": "24258:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "24258:20:2", - "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": 2426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:53:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2417, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2411, - "src": "24228:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2416, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "24218:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "24218:39:2", - "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": 2427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:94:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "24218:115:2", - "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": 2430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:121:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "24218:142:2", - "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": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:160:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2415, - "id": 2436, - "nodeType": "Return", - "src": "24199:179:2" - } - ] - }, - "documentation": null, - "id": 2438, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2412, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2411, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2438, - "src": "24142:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2410, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24142:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24141:17:2" - }, - "returnParameters": { - "id": 2415, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2414, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2438, - "src": "24180:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2413, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24180:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24179:9:2" - }, - "scope": 2678, - "src": "24126:259:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2468, - "nodeType": "Block", - "src": "24547:124:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2450, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "24565:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2451, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24574:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24565:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 2453, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24577:16:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 2449, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24557:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24557:37:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2455, - "nodeType": "ExpressionStatement", - "src": "24557:37:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2459, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "24616:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2456, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "24604:5:2", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMCOMPPool_$2678", - "typeString": "contract super YAMCOMPPool" - } - }, - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 2224, - "src": "24604:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24604:19:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2461, - "nodeType": "ExpressionStatement", - "src": "24604:19:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2463, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24645:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24645:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2465, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "24657:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2462, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2302, - "src": "24638:6:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24638:26:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2467, - "nodeType": "EmitStatement", - "src": "24633:31:2" - } - ] - }, - "documentation": null, - "id": 2469, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2443, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24524:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24524:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2445, - "modifierName": { - "argumentTypes": null, - "id": 2442, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "24511:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24511:24:2" - }, - { - "arguments": null, - "id": 2447, - "modifierName": { - "argumentTypes": null, - "id": 2446, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2326, - "src": "24536:10:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24536:10:2" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2440, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2469, - "src": "24488:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24488:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24487:16:2" - }, - "returnParameters": { - "id": 2448, - "nodeType": "ParameterList", - "parameters": [], - "src": "24547:0:2" - }, - "scope": 2678, - "src": "24473:198:2", - "stateMutability": "nonpayable", - "superFunction": 2224, - "visibility": "public" - }, - { - "body": { - "id": 2499, - "nodeType": "Block", - "src": "24754:133:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2481, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2471, - "src": "24772:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24781:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24772:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 2484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24784:19:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 2480, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24764:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24764:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2486, - "nodeType": "ExpressionStatement", - "src": "24764:40:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2490, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2471, - "src": "24829:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2487, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "24814:5:2", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMCOMPPool_$2678", - "typeString": "contract super YAMCOMPPool" - } - }, - "id": 2489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 2258, - "src": "24814:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24814:22:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2492, - "nodeType": "ExpressionStatement", - "src": "24814:22:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2494, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24861:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24861:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2496, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2471, - "src": "24873:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2493, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2308, - "src": "24851:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24851:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2498, - "nodeType": "EmitStatement", - "src": "24846:34:2" - } - ] - }, - "documentation": null, - "id": 2500, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2474, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24731:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24731:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2476, - "modifierName": { - "argumentTypes": null, - "id": 2473, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "24718:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24718:24:2" - }, - { - "arguments": null, - "id": 2478, - "modifierName": { - "argumentTypes": null, - "id": 2477, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2326, - "src": "24743:10:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24743:10:2" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2472, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2471, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2500, - "src": "24695:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2470, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24695:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24694:16:2" - }, - "returnParameters": { - "id": 2479, - "nodeType": "ParameterList", - "parameters": [], - "src": "24754:0:2" - }, - "scope": 2678, - "src": "24677:210:2", - "stateMutability": "nonpayable", - "superFunction": 2258, - "visibility": "public" - }, - { - "body": { - "id": 2513, - "nodeType": "Block", - "src": "24918:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2505, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24947:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24947:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2504, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "24937:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24937:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2503, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2500 - ], - "referencedDeclaration": 2500, - "src": "24928:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24928:31:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2509, - "nodeType": "ExpressionStatement", - "src": "24928:31:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2510, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2579, - "src": "24969:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 2511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:11:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2512, - "nodeType": "ExpressionStatement", - "src": "24969:11:2" - } - ] - }, - "documentation": null, - "id": 2514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2501, - "nodeType": "ParameterList", - "parameters": [], - "src": "24906:2:2" - }, - "returnParameters": { - "id": 2502, - "nodeType": "ParameterList", - "parameters": [], - "src": "24918:0:2" - }, - "scope": 2678, - "src": "24893:94:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 2578, - "nodeType": "Block", - "src": "25057:379:2", - "statements": [ - { - "assignments": [ - 2524 - ], - "declarations": [ - { - "constant": false, - "id": 2524, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2578, - "src": "25067:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25067:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2529, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2526, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25091:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25091:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2525, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2438, - "src": "25084:6:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25084:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25067:35:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2530, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2524, - "src": "25116:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25125:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25116:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2577, - "nodeType": "IfStatement", - "src": "25112:318:2", - "trueBody": { - "id": 2576, - "nodeType": "Block", - "src": "25128:302:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2533, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "25142:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2536, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25150:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25150:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25142:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 2537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25164:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25142:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2539, - "nodeType": "ExpressionStatement", - "src": "25142:23:2" - }, - { - "assignments": [ - 2541 - ], - "declarations": [ - { - "constant": false, - "id": 2541, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 2576, - "src": "25179:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2540, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25179:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2549, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2544, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2268, - "src": "25215:3:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - ], - "id": 2543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25207:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2542, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2150, - "src": "25203:3:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$2150_$", - "typeString": "type(contract YAM)" - } - }, - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:17:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$2150", - "typeString": "contract YAM" - } - }, - "id": 2547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 2149, - "src": "25203:35:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 2548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25179:61:2" - }, - { - "assignments": [ - 2551 - ], - "declarations": [ - { - "constant": false, - "id": 2551, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 2576, - "src": "25254:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25254:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2561, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 2559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 2557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 2558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25309:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25305:6:2", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2554, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2541, - "src": "25286:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2552, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2524, - "src": "25275:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "25275:10:2", - "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": 2555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "25275:29:2", - "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": 2560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25254:58:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25343:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25343:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2551, - "src": "25355:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2562, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2268, - "src": "25326:3:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1921, - "src": "25326:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1818_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25326:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2569, - "nodeType": "ExpressionStatement", - "src": "25326:40:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2571, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25396:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25396:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2573, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2551, - "src": "25408:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2570, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2314, - "src": "25385:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:34:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2575, - "nodeType": "EmitStatement", - "src": "25380:39:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2579, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2517, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25034:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25034:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2519, - "modifierName": { - "argumentTypes": null, - "id": 2516, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "25021:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25021:24:2" - }, - { - "arguments": null, - "id": 2521, - "modifierName": { - "argumentTypes": null, - "id": 2520, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2326, - "src": "25046:10:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25046:10:2" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2515, - "nodeType": "ParameterList", - "parameters": [], - "src": "25011:2:2" - }, - "returnParameters": { - "id": 2522, - "nodeType": "ParameterList", - "parameters": [], - "src": "25057:0:2" - }, - "scope": 2678, - "src": "24993:443:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2676, - "nodeType": "Block", - "src": "25571:703:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2591, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25585:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25585:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2593, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "25603:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25585:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2674, - "nodeType": "Block", - "src": "26088:180:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2652, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "26100:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2655, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "26124:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2653, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "26113:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "26113:10:2", - "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": 2656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26113:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2658, - "nodeType": "ExpressionStatement", - "src": "26100:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2659, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "26145:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2660, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "26162:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26145:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2662, - "nodeType": "ExpressionStatement", - "src": "26145:26:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2663, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "26183:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2666, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "26212:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2664, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "26198:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "26198:13:2", - "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": 2667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26198:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26183:38:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2669, - "nodeType": "ExpressionStatement", - "src": "26183:38:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2671, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "26250:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2670, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2296, - "src": "26238:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26238:19:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2673, - "nodeType": "EmitStatement", - "src": "26233:24:2" - } - ] - }, - "id": 2675, - "nodeType": "IfStatement", - "src": "25581:687:2", - "trueBody": { - "id": 2651, - "nodeType": "Block", - "src": "25614:468:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2595, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25630:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25630:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2597, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "25649:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25630:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2632, - "nodeType": "Block", - "src": "25731:205:2", - "statements": [ - { - "assignments": [ - 2608 - ], - "declarations": [ - { - "constant": false, - "id": 2608, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 2632, - "src": "25747:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25747:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2614, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2611, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25784:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25784:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2609, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "25767:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "25767:16:2", - "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": 2613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25767:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25747:53:2" - }, - { - "assignments": [ - 2616 - ], - "declarations": [ - { - "constant": false, - "id": 2616, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 2632, - "src": "25816:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2615, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25816:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2621, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2619, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "25849:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2617, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2608, - "src": "25835:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "25835:13:2", - "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": 2620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25816:44:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2622, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "25876:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2628, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "25914:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2625, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2616, - "src": "25900:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2623, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "25889:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "25889:10:2", - "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": 2626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "25889:24:2", - "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": 2629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25876:47:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2631, - "nodeType": "ExpressionStatement", - "src": "25876:47:2" - } - ] - }, - "id": 2633, - "nodeType": "IfStatement", - "src": "25626:310:2", - "trueBody": { - "id": 2606, - "nodeType": "Block", - "src": "25663:62:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2599, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "25679:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2602, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "25703:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2600, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "25692:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "25692:10:2", - "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": 2603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25692:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25679:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2605, - "nodeType": "ExpressionStatement", - "src": "25679:33:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 2637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2634, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "25947:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2635, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25964:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25964:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25947:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2638, - "nodeType": "ExpressionStatement", - "src": "25947:32:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2639, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "25991:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2643, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "26026:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2640, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26006:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26006:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "26006:19:2", - "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": 2644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26006:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25991:44:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2646, - "nodeType": "ExpressionStatement", - "src": "25991:44:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2648, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "26064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2647, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2296, - "src": "26052:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:19:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2650, - "nodeType": "EmitStatement", - "src": "26047:24:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2677, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2584, - "modifierName": { - "argumentTypes": null, - "id": 2583, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2130, - "src": "25511:22:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25511:22:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25563:1:2", - "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": 2586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25555:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25555:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2589, - "modifierName": { - "argumentTypes": null, - "id": 2585, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "25542:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25542:24:2" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2582, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2581, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2677, - "src": "25470:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2580, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25470:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25469:16:2" - }, - "returnParameters": { - "id": 2590, - "nodeType": "ParameterList", - "parameters": [], - "src": "25571:0:2" - }, - "scope": 2678, - "src": "25442:832:2", - "stateMutability": "nonpayable", - "superFunction": 2118, - "visibility": "external" - } - ], - "scope": 2679, - "src": "22374:3902:2" - } - ], - "src": "1490:24787:2" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMCOMPPool.sol", - "exportedSymbols": { - "Address": [ - 1892 - ], - "Context": [ - 1638 - ], - "IERC20": [ - 1818 - ], - "IRewardDistributionRecipient": [ - 2143 - ], - "LPTokenWrapper": [ - 2259 - ], - "Math": [ - 1426 - ], - "Ownable": [ - 1750 - ], - "SafeERC20": [ - 2108 - ], - "SafeMath": [ - 1612 - ], - "YAM": [ - 2150 - ], - "YAMCOMPPool": [ - 2678 - ] - }, - "id": 2679, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1359, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 1426, - "linearizedBaseContracts": [ - 1426 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1375, - "nodeType": "Block", - "src": "1739:38:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1368, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1361, - "src": "1756:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1369, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1363, - "src": "1761:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 1372, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1363, - "src": "1769:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:2", - "trueExpression": { - "argumentTypes": null, - "id": 1371, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1361, - "src": "1765:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1367, - "id": 1374, - "nodeType": "Return", - "src": "1749:21:2" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 1376, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1361, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1376, - "src": "1685:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1360, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1363, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1376, - "src": "1696:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1362, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:2" - }, - "returnParameters": { - "id": 1367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1366, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1376, - "src": "1730:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:2" - }, - "scope": 1426, - "src": "1672:105:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1392, - "nodeType": "Block", - "src": "1915:37:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1385, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1378, - "src": "1932:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1386, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "1936:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 1389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "1944:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:2", - "trueExpression": { - "argumentTypes": null, - "id": 1388, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1378, - "src": "1940:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1384, - "id": 1391, - "nodeType": "Return", - "src": "1925:20:2" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 1393, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1381, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1378, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1393, - "src": "1861:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1377, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1380, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1393, - "src": "1872:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1379, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:2" - }, - "returnParameters": { - "id": 1384, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1383, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1393, - "src": "1906:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1382, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:2" - }, - "scope": 1426, - "src": "1848:104:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1424, - "nodeType": "Block", - "src": "2136:119:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1402, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1395, - "src": "2208:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1403, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1405, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1406, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "2218:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1409, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1411, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1395, - "src": "2229:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "2237:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1418, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1421, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1401, - "id": 1423, - "nodeType": "Return", - "src": "2200:48:2" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 1425, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1395, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1425, - "src": "2082:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1397, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1425, - "src": "2093:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:2" - }, - "returnParameters": { - "id": 1401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1400, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1425, - "src": "2127:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1399, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:2" - }, - "scope": 1426, - "src": "2065:190:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "1589:668:2" - }, - { - "id": 1427, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 1612, - "linearizedBaseContracts": [ - 1612 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1451, - "nodeType": "Block", - "src": "3212:109:2", - "statements": [ - { - "assignments": [ - 1437 - ], - "declarations": [ - { - "constant": false, - "id": 1437, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1451, - "src": "3222:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1436, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1441, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1438, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1429, - "src": "3234:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1439, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1431, - "src": "3238:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1443, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1437, - "src": "3257:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1444, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1429, - "src": "3262:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 1446, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 1442, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1448, - "nodeType": "ExpressionStatement", - "src": "3249:46:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1449, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1437, - "src": "3313:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1435, - "id": 1450, - "nodeType": "Return", - "src": "3306:8:2" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 1452, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1452, - "src": "3158:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1452, - "src": "3169:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:2" - }, - "returnParameters": { - "id": 1435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1452, - "src": "3203:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:2" - }, - "scope": 1612, - "src": "3145:176:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1467, - "nodeType": "Block", - "src": "3652:67:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1462, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "3673:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1463, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "3676:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 1464, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 1461, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1468, - 1495 - ], - "referencedDeclaration": 1495, - "src": "3669:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1460, - "id": 1466, - "nodeType": "Return", - "src": "3662:50:2" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 1468, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1454, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1468, - "src": "3598:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1453, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1456, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1468, - "src": "3609:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1455, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:2" - }, - "returnParameters": { - "id": 1460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1459, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1468, - "src": "3643:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:2" - }, - "scope": 1612, - "src": "3585:134:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1494, - "nodeType": "Block", - "src": "4138:92:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1480, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1472, - "src": "4156:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1481, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1470, - "src": "4161:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1483, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1474, - "src": "4164:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1479, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1485, - "nodeType": "ExpressionStatement", - "src": "4148:29:2" - }, - { - "assignments": [ - 1487 - ], - "declarations": [ - { - "constant": false, - "id": 1487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1494, - "src": "4187:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1470, - "src": "4199:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1472, - "src": "4203:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1492, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1487, - "src": "4222:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1478, - "id": 1493, - "nodeType": "Return", - "src": "4215:8:2" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 1495, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1470, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4056:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1469, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1472, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4067:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1474, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4078:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1473, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:2" - }, - "returnParameters": { - "id": 1478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1495, - "src": "4129:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:2" - }, - "scope": 1612, - "src": "4043:187:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1528, - "nodeType": "Block", - "src": "4537:392:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1504, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1497, - "src": "4769:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1505, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1510, - "nodeType": "IfStatement", - "src": "4765:45:2", - "trueBody": { - "id": 1509, - "nodeType": "Block", - "src": "4777:33:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1507, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 1503, - "id": 1508, - "nodeType": "Return", - "src": "4791:8:2" - } - ] - } - }, - { - "assignments": [ - 1512 - ], - "declarations": [ - { - "constant": false, - "id": 1512, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1528, - "src": "4820:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1511, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1516, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1513, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1497, - "src": "4832:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1514, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1499, - "src": "4836:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1518, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "4855:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1519, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1497, - "src": "4859:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1521, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1499, - "src": "4864:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 1523, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 1517, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1525, - "nodeType": "ExpressionStatement", - "src": "4847:56:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1526, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "4921:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1503, - "id": 1527, - "nodeType": "Return", - "src": "4914:8:2" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 1529, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1500, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1497, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1529, - "src": "4483:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1496, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1499, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1529, - "src": "4494:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1498, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:2" - }, - "returnParameters": { - "id": 1503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1502, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1529, - "src": "4528:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1501, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:2" - }, - "scope": 1612, - "src": "4470:459:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1544, - "nodeType": "Block", - "src": "5451:63:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1539, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1531, - "src": "5472:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1540, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1533, - "src": "5475:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 1541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 1538, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1545, - 1572 - ], - "referencedDeclaration": 1572, - "src": "5468:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1537, - "id": 1543, - "nodeType": "Return", - "src": "5461:46:2" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 1545, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1534, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1531, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "5397:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1530, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1533, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "5408:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1532, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:2" - }, - "returnParameters": { - "id": 1537, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1536, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1545, - "src": "5442:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1535, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:2" - }, - "scope": 1612, - "src": "5384:130:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1571, - "nodeType": "Block", - "src": "6124:243:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1557, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1549, - "src": "6208:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1560, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1551, - "src": "6215:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1556, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1562, - "nodeType": "ExpressionStatement", - "src": "6200:28:2" - }, - { - "assignments": [ - 1564 - ], - "declarations": [ - { - "constant": false, - "id": 1564, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "6238:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1563, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1568, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1565, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1547, - "src": "6250:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1566, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1549, - "src": "6254:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1569, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1564, - "src": "6359:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1555, - "id": 1570, - "nodeType": "Return", - "src": "6352:8:2" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 1572, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1547, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6042:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1549, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6053:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1551, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6064:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1550, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:2" - }, - "returnParameters": { - "id": 1555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1572, - "src": "6115:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:2" - }, - "scope": 1612, - "src": "6029:338:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1587, - "nodeType": "Block", - "src": "6878:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1582, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1574, - "src": "6899:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1583, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1576, - "src": "6902:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 1584, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 1581, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1588, - 1611 - ], - "referencedDeclaration": 1611, - "src": "6895:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1580, - "id": 1586, - "nodeType": "Return", - "src": "6888:44:2" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 1588, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1577, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1574, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1588, - "src": "6824:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1573, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1576, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1588, - "src": "6835:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1575, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:2" - }, - "returnParameters": { - "id": 1580, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1579, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1588, - "src": "6869:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:2" - }, - "scope": 1612, - "src": "6811:128:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1610, - "nodeType": "Block", - "src": "7538:68:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1600, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1592, - "src": "7556:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1603, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1594, - "src": "7564:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1599, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1605, - "nodeType": "ExpressionStatement", - "src": "7548:29:2" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1606, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1590, - "src": "7594:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 1607, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1592, - "src": "7598:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1598, - "id": 1609, - "nodeType": "Return", - "src": "7587:12:2" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 1611, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1590, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7456:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1592, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7467:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1591, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1594, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7478:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1593, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:2" - }, - "returnParameters": { - "id": 1598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1597, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1611, - "src": "7529:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1596, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:2" - }, - "scope": 1612, - "src": "7443:163:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "2900:4708:2" - }, - { - "id": 1613, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1638, - "linearizedBaseContracts": [ - 1638 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1616, - "nodeType": "Block", - "src": "8386:3:2", - "statements": [] - }, - "documentation": null, - "id": 1617, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1614, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:2" - }, - "returnParameters": { - "id": 1615, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:2" - }, - "scope": 1638, - "src": "8362:27:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1625, - "nodeType": "Block", - "src": "8510:34:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1622, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 1621, - "id": 1624, - "nodeType": "Return", - "src": "8520:17:2" - } - ] - }, - "documentation": null, - "id": 1626, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1618, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:2" - }, - "returnParameters": { - "id": 1621, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1620, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1626, - "src": "8493:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 1619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:2", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:2" - }, - "scope": 1638, - "src": "8448:96:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1636, - "nodeType": "Block", - "src": "8607:165:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1631, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19285, - "src": "8617:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$1638", - "typeString": "contract Context" - } - }, - "id": 1632, - "nodeType": "ExpressionStatement", - "src": "8617:4:2" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1633, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 1630, - "id": 1635, - "nodeType": "Return", - "src": "8750:15:2" - } - ] - }, - "documentation": null, - "id": 1637, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1627, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:2" - }, - "returnParameters": { - "id": 1630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1629, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1637, - "src": "8593:12:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1628, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:2" - }, - "scope": 1638, - "src": "8550:222:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "8185:589:2" - }, - { - "id": 1639, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:2" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1640, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1638, - "src": "9238:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$1638", - "typeString": "contract Context" - } - }, - "id": 1641, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:2" - } - ], - "contractDependencies": [ - 1638 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 1750, - "linearizedBaseContracts": [ - 1750, - 1638 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1643, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 1750, - "src": "9252:22:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 1649, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 1648, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1645, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 1649, - "src": "9308:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1644, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1647, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 1649, - "src": "9339:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1646, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:2" - }, - "src": "9281:84:2" - }, - { - "body": { - "id": 1664, - "nodeType": "Block", - "src": "9491:93:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1652, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "9501:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1653, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1626, - "src": "9510:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1656, - "nodeType": "ExpressionStatement", - "src": "9501:21:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:2", - "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": 1658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1661, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "9570:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1657, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1649, - "src": "9537:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1663, - "nodeType": "EmitStatement", - "src": "9532:45:2" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 1665, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1650, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:2" - }, - "returnParameters": { - "id": 1651, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:2" - }, - "scope": 1750, - "src": "9467:117:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1672, - "nodeType": "Block", - "src": "9707:30:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1670, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "9724:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 1669, - "id": 1671, - "nodeType": "Return", - "src": "9717:13:2" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 1673, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1666, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:2" - }, - "returnParameters": { - "id": 1669, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1668, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1673, - "src": "9698:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:2" - }, - "scope": 1750, - "src": "9660:77:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1682, - "nodeType": "Block", - "src": "9846:82:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1676, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1694, - "src": "9864:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 1677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 1678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 1675, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1680, - "nodeType": "ExpressionStatement", - "src": "9856:54:2" - }, - { - "id": 1681, - "nodeType": "PlaceholderStatement", - "src": "9920:1:2" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 1683, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1674, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:2" - }, - "src": "9825:103:2", - "visibility": "internal" - }, - { - "body": { - "id": 1693, - "nodeType": "Block", - "src": "10057:46:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1688, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1626, - "src": "10074:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1690, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "10090:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1687, - "id": 1692, - "nodeType": "Return", - "src": "10067:29:2" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 1694, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1684, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:2" - }, - "returnParameters": { - "id": 1687, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1686, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1694, - "src": "10051:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1685, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:2" - }, - "scope": 1750, - "src": "10011:92:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1712, - "nodeType": "Block", - "src": "10491:91:2", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1700, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "10527:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:2", - "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": 1701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1699, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1649, - "src": "10506:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1705, - "nodeType": "EmitStatement", - "src": "10501:45:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1706, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "10556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:2", - "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": 1707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1711, - "nodeType": "ExpressionStatement", - "src": "10556:19:2" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 1713, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1697, - "modifierName": { - "argumentTypes": null, - "id": 1696, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1683, - "src": "10481:9:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:2" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1695, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:2" - }, - "returnParameters": { - "id": 1698, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:2" - }, - "scope": 1750, - "src": "10445:137:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1724, - "nodeType": "Block", - "src": "10793:45:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1721, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1715, - "src": "10822:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1720, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1749, - "src": "10803:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 1722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1723, - "nodeType": "ExpressionStatement", - "src": "10803:28:2" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 1725, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1718, - "modifierName": { - "argumentTypes": null, - "id": 1717, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1683, - "src": "10783:9:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:2" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1716, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1715, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 1725, - "src": "10758:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1714, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:2" - }, - "returnParameters": { - "id": 1719, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:2" - }, - "scope": 1750, - "src": "10731:107:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1748, - "nodeType": "Block", - "src": "10994:170:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1731, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1727, - "src": "11012:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:2", - "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": 1732, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 1736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 1730, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1738, - "nodeType": "ExpressionStatement", - "src": "11004:73:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1740, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "11113:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1741, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1727, - "src": "11121:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1739, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1649, - "src": "11092:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1743, - "nodeType": "EmitStatement", - "src": "11087:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1744, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1643, - "src": "11140:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1745, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1727, - "src": "11149:8:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1747, - "nodeType": "ExpressionStatement", - "src": "11140:17:2" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 1749, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1728, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1727, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 1749, - "src": "10967:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1726, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:2" - }, - "returnParameters": { - "id": 1729, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:2" - }, - "scope": 1750, - "src": "10939:225:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "9218:1948:2" - }, - { - "id": 1751, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 1818, - "linearizedBaseContracts": [ - 1818 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 1756, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1752, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:2" - }, - "returnParameters": { - "id": 1755, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1754, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1756, - "src": "11541:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1753, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:2" - }, - "scope": 1818, - "src": "11495:55:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 1763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1758, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1763, - "src": "11652:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:2" - }, - "returnParameters": { - "id": 1762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1763, - "src": "11692:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:2" - }, - "scope": 1818, - "src": "11633:68:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 1772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1765, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 1772, - "src": "11939:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1772, - "src": "11958:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:2" - }, - "returnParameters": { - "id": 1771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1772, - "src": "11992:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:2" - }, - "scope": 1818, - "src": "11921:77:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 1781, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1777, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1774, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1781, - "src": "12292:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1776, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1781, - "src": "12307:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:2" - }, - "returnParameters": { - "id": 1780, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1779, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1781, - "src": "12347:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1778, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:2" - }, - "scope": 1818, - "src": "12273:83:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 1790, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1783, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1790, - "src": "13026:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1782, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1785, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1790, - "src": "13043:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1784, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:2" - }, - "returnParameters": { - "id": 1789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1790, - "src": "13077:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1787, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:2" - }, - "scope": 1818, - "src": "13009:74:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 1801, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1797, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1792, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13412:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1791, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1794, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13428:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1793, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1796, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13447:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1795, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:2" - }, - "returnParameters": { - "id": 1800, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1799, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1801, - "src": "13481:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1798, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:2" - }, - "scope": 1818, - "src": "13390:97:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 1809, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1808, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1803, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1809, - "src": "13671:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1805, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1809, - "src": "13693:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1804, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1807, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1809, - "src": "13713:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1806, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:2" - }, - "src": "13656:72:2" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 1817, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1811, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1817, - "src": "13902:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1810, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1813, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1817, - "src": "13925:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1812, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1815, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1817, - "src": "13950:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1814, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:2" - }, - "src": "13887:78:2" - } - ], - "scope": 2679, - "src": "11401:2566:2" - }, - { - "id": 1819, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 1892, - "linearizedBaseContracts": [ - 1892 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1843, - "nodeType": "Block", - "src": "14644:731:2", - "statements": [ - { - "assignments": [ - 1827 - ], - "declarations": [ - { - "constant": false, - "id": 1827, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 1843, - "src": "15083:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1826, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1828, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:2" - }, - { - "assignments": [ - 1830 - ], - "declarations": [ - { - "constant": false, - "id": 1830, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 1843, - "src": "15109:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1829, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1832, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:2" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 1827, - "isOffset": false, - "isSlot": false, - "src": "15274:8:2", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 1821, - "isOffset": false, - "isSlot": false, - "src": "15298:7:2", - "valueSize": 1 - } - } - ], - "id": 1833, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1834, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1827, - "src": "15325:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1835, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1837, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1827, - "src": "15344:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 1838, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1830, - "src": "15356:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1841, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1825, - "id": 1842, - "nodeType": "Return", - "src": "15317:51:2" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 1844, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1822, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1821, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1844, - "src": "14598:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1820, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:2" - }, - "returnParameters": { - "id": 1825, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1824, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1844, - "src": "14638:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1823, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:2" - }, - "scope": 1892, - "src": "14578:797:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1857, - "nodeType": "Block", - "src": "15660:49:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1853, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1846, - "src": "15693:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 1854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 1851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 1850, - "id": 1856, - "nodeType": "Return", - "src": "15670:32:2" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 1858, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1846, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 1858, - "src": "15603:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1845, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:2" - }, - "returnParameters": { - "id": 1850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1849, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1858, - "src": "15643:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 1848, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:2", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:2" - }, - "scope": 1892, - "src": "15584:125:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1890, - "nodeType": "Block", - "src": "16737:294:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1867, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19291, - "src": "16763:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$1892", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$1892", - "typeString": "library Address" - } - ], - "id": 1866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1870, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1862, - "src": "16780:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 1872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 1865, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1874, - "nodeType": "ExpressionStatement", - "src": "16747:73:2" - }, - { - "assignments": [ - 1876, - null - ], - "declarations": [ - { - "constant": false, - "id": 1876, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1890, - "src": "16886:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1875, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 1884, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 1880, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1862, - "src": "16925:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1877, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1860, - "src": "16904:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 1878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:2", - "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": 1879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 1881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:2", - "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": 1883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1886, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1876, - "src": "16954:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 1887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 1885, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1889, - "nodeType": "ExpressionStatement", - "src": "16946:78:2" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 1891, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1860, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 1891, - "src": "16685:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 1859, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:2", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1862, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1891, - "src": "16712:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1861, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:2" - }, - "returnParameters": { - "id": 1864, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:2" - }, - "scope": 1892, - "src": "16666:365:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2679, - "src": "14114:2919:2" - }, - { - "id": 1893, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 2108, - "linearizedBaseContracts": [ - 2108 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 1896, - "libraryName": { - "contractScope": null, - "id": 1894, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1612, - "src": "17610:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$1612", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:2", - "typeName": { - "id": 1895, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 1899, - "libraryName": { - "contractScope": null, - "id": 1897, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1892, - "src": "17642:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$1892", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:2", - "typeName": { - "id": 1898, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 1920, - "nodeType": "Block", - "src": "17740:102:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1909, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1901, - "src": "17769:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1912, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1901, - "src": "17799:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1772, - "src": "17799:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 1914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 1915, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1903, - "src": "17824:2:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1916, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "17828:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1910, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 1917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1908, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "17750:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 1918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1919, - "nodeType": "ExpressionStatement", - "src": "17750:85:2" - } - ] - }, - "documentation": null, - "id": 1921, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1901, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1921, - "src": "17690:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1900, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "17690:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1903, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1921, - "src": "17704:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1905, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1921, - "src": "17716:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:2" - }, - "returnParameters": { - "id": 1907, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:2" - }, - "scope": 2108, - "src": "17668:174:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1945, - "nodeType": "Block", - "src": "17938:112:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1933, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1923, - "src": "17967:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1936, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1923, - "src": "17997:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1801, - "src": "17997:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 1938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 1939, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1925, - "src": "18026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1940, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "18032:2:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1941, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1929, - "src": "18036:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1934, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 1942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1932, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "17948:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 1943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1944, - "nodeType": "ExpressionStatement", - "src": "17948:95:2" - } - ] - }, - "documentation": null, - "id": 1946, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1930, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1923, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17874:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1922, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "17874:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1925, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17888:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1924, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1927, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17902:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1926, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1929, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1946, - "src": "17914:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:2" - }, - "returnParameters": { - "id": 1931, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:2" - }, - "scope": 2108, - "src": "17848:202:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1986, - "nodeType": "Block", - "src": "18132:536:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1956, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1952, - "src": "18421:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1957, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1959, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1963, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19293, - "src": "18461:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - ], - "id": 1962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1965, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1950, - "src": "18468:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1948, - "src": "18437:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 1781, - "src": "18437:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 1966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1969, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 1971, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 1955, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1973, - "nodeType": "ExpressionStatement", - "src": "18412:150:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1975, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1948, - "src": "18591:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1978, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1948, - "src": "18621:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 1790, - "src": "18621:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 1980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 1981, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1950, - "src": "18645:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1982, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1952, - "src": "18654:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1976, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1977, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 1983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1974, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "18572:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 1984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1985, - "nodeType": "ExpressionStatement", - "src": "18572:89:2" - } - ] - }, - "documentation": null, - "id": 1987, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1953, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1948, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "18077:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1947, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "18077:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1950, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "18091:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1949, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1952, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1987, - "src": "18108:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1951, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:2" - }, - "returnParameters": { - "id": 1954, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:2" - }, - "scope": 2108, - "src": "18056:612:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2021, - "nodeType": "Block", - "src": "18760:196:2", - "statements": [ - { - "assignments": [ - 1997 - ], - "declarations": [ - { - "constant": false, - "id": 1997, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "18770:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1996, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2008, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2006, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1993, - "src": "18837:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2001, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19293, - "src": "18817:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - ], - "id": 2000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2003, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "18824:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1998, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "18793:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 1999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 1781, - "src": "18793:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 2004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "18793:43:2", - "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": 2007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2010, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "18872:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2013, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1989, - "src": "18902:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 1790, - "src": "18902:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 2015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 2016, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1991, - "src": "18926:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2017, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1997, - "src": "18935:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2011, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2009, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "18853:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 2019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2020, - "nodeType": "ExpressionStatement", - "src": "18853:96:2" - } - ] - }, - "documentation": null, - "id": 2022, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1994, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1989, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 2022, - "src": "18705:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 1988, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "18705:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1991, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2022, - "src": "18719:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1993, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 2022, - "src": "18736:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1992, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:2" - }, - "returnParameters": { - "id": 1995, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:2" - }, - "scope": 2108, - "src": "18674:282:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2057, - "nodeType": "Block", - "src": "19048:241:2", - "statements": [ - { - "assignments": [ - 2032 - ], - "declarations": [ - { - "constant": false, - "id": 2032, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 2057, - "src": "19058:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2031, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2044, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2041, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2028, - "src": "19125:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2036, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19293, - "src": "19105:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - ], - "id": 2035, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2038, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2026, - "src": "19112:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2033, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2024, - "src": "19081:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 1781, - "src": "19081:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 2039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1495, - "src": "19081:43:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2046, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2024, - "src": "19205:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2024, - "src": "19235:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 1790, - "src": "19235:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 2051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 2052, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2026, - "src": "19259:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2053, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2032, - "src": "19268:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2047, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 2054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2045, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2107, - "src": "19186:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 2055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2056, - "nodeType": "ExpressionStatement", - "src": "19186:96:2" - } - ] - }, - "documentation": null, - "id": 2058, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2029, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2024, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 2058, - "src": "18993:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2023, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "18993:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2026, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 2058, - "src": "19007:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2025, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2028, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 2058, - "src": "19024:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2027, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:2" - }, - "returnParameters": { - "id": 2030, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:2" - }, - "scope": 2108, - "src": "18962:327:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2106, - "nodeType": "Block", - "src": "19741:1026:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2067, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2060, - "src": "20275:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - ], - "id": 2066, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 1844, - "src": "20267:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 2070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 2071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 2065, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2073, - "nodeType": "ExpressionStatement", - "src": "20259:71:2" - }, - { - "assignments": [ - 2075, - 2077 - ], - "declarations": [ - { - "constant": false, - "id": 2075, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 2106, - "src": "20401:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2074, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2077, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 2106, - "src": "20415:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2076, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2084, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2082, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2062, - "src": "20462:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2079, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2060, - "src": "20450:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - ], - "id": 2078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:2", - "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": 2083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2086, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2075, - "src": "20485:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 2087, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 2085, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2089, - "nodeType": "ExpressionStatement", - "src": "20477:52:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2090, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2077, - "src": "20544:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 2091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2092, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2105, - "nodeType": "IfStatement", - "src": "20540:221:2", - "trueBody": { - "id": 2104, - "nodeType": "Block", - "src": "20567:194:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2097, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2077, - "src": "20684:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 2098, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 2099, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 2095, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2096, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 2100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 2101, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 2094, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2103, - "nodeType": "ExpressionStatement", - "src": "20665:85:2" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 2107, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2063, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2060, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 2107, - "src": "19700:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2059, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "19700:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2062, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 2107, - "src": "19714:17:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2061, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:2" - }, - "returnParameters": { - "id": 2064, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:2" - }, - "scope": 2108, - "src": "19672:1095:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 2679, - "src": "17580:3189:2" - }, - { - "id": 2109, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:2" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2110, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1750, - "src": "20892:7:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$1750", - "typeString": "contract Ownable" - } - }, - "id": 2111, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:2" - } - ], - "contractDependencies": [ - 1638, - 1750 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 2143, - "linearizedBaseContracts": [ - 2143, - 1750, - 1638 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2113, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 2143, - "src": "20906:33:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2112, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 2118, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2116, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2115, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2118, - "src": "20974:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2114, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:2" - }, - "returnParameters": { - "id": 2117, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:2" - }, - "scope": 2143, - "src": "20946:53:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 2129, - "nodeType": "Block", - "src": "21039:108:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2121, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1626, - "src": "21057:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2123, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2113, - "src": "21073:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 2125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 2120, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2127, - "nodeType": "ExpressionStatement", - "src": "21049:80:2" - }, - { - "id": 2128, - "nodeType": "PlaceholderStatement", - "src": "21139:1:2" - } - ] - }, - "documentation": null, - "id": 2130, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2119, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:2" - }, - "src": "21005:142:2", - "visibility": "internal" - }, - { - "body": { - "id": 2141, - "nodeType": "Block", - "src": "21252:57:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2137, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2113, - "src": "21262:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2138, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "21283:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2140, - "nodeType": "ExpressionStatement", - "src": "21262:40:2" - } - ] - }, - "documentation": null, - "id": 2142, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2135, - "modifierName": { - "argumentTypes": null, - "id": 2134, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1683, - "src": "21238:9:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:2" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2133, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2132, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 2142, - "src": "21184:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2131, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:2" - }, - "returnParameters": { - "id": 2136, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:2" - }, - "scope": 2143, - "src": "21153:156:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 2679, - "src": "20851:460:2" - }, - { - "id": 2144, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 2150, - "linearizedBaseContracts": [ - 2150 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 2149, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2145, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:2" - }, - "returnParameters": { - "id": 2148, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2147, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2149, - "src": "21443:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2146, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:2" - }, - "scope": 2150, - "src": "21396:56:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 2679, - "src": "21376:78:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2259, - "linearizedBaseContracts": [ - 2259 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 2153, - "libraryName": { - "contractScope": null, - "id": 2151, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1612, - "src": "21494:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$1612", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:2", - "typeName": { - "id": 2152, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 2156, - "libraryName": { - "contractScope": null, - "id": 2154, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2108, - "src": "21526:9:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$2108", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:2", - "typeName": { - "contractScope": null, - "id": 2155, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "21540:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 2161, - "name": "comp", - "nodeType": "VariableDeclaration", - "scope": 2259, - "src": "21553:71:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2157, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "21553:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307863303065393443623636324333353230323832453666353731373231343030344137663236383838", - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xc00e94Cb662C3520282E6f5717214004A7f26888" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2158, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1818, - "src": "21574:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$1818_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 2160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2163, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 2259, - "src": "21631:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2167, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 2259, - "src": "21665:45:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2166, - "keyType": { - "id": 2164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 2174, - "nodeType": "Block", - "src": "21770:36:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2172, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "21787:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2171, - "id": 2173, - "nodeType": "Return", - "src": "21780:19:2" - } - ] - }, - "documentation": null, - "id": 2175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2168, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:2" - }, - "returnParameters": { - "id": 2171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2170, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2175, - "src": "21761:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2169, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:2" - }, - "scope": 2259, - "src": "21717:89:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2186, - "nodeType": "Block", - "src": "21878:42:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2182, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "21895:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2184, - "indexExpression": { - "argumentTypes": null, - "id": 2183, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2177, - "src": "21905:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2181, - "id": 2185, - "nodeType": "Return", - "src": "21888:25:2" - } - ] - }, - "documentation": null, - "id": 2187, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2178, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2177, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2187, - "src": "21831:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:2" - }, - "returnParameters": { - "id": 2181, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2180, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2187, - "src": "21869:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:2" - }, - "scope": 2259, - "src": "21812:108:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2223, - "nodeType": "Block", - "src": "21964:189:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2192, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "21974:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2195, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "22006:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2193, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "21989:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "21989:16:2", - "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": 2196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2198, - "nodeType": "ExpressionStatement", - "src": "21974:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2199, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22023:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2202, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2200, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "22073:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2203, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22047:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2206, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2204, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "22047:25:2", - "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": 2209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2211, - "nodeType": "ExpressionStatement", - "src": "22023:57:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2215, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2218, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19299, - "src": "22132:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$2259", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$2259", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 2217, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2220, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2189, - "src": "22139:6:2", - "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, - "id": 2212, - "name": "comp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2161, - "src": "22090:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1946, - "src": "22090:21:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1818_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 2221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2222, - "nodeType": "ExpressionStatement", - "src": "22090:56:2" - } - ] - }, - "documentation": null, - "id": 2224, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2189, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2224, - "src": "21941:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:2" - }, - "returnParameters": { - "id": 2191, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:2" - }, - "scope": 2259, - "src": "21926:227:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2257, - "nodeType": "Block", - "src": "22200:170:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2229, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "22210:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2232, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2226, - "src": "22242:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2230, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2163, - "src": "22225:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "22225:16:2", - "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": 2233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2235, - "nodeType": "ExpressionStatement", - "src": "22210:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2236, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22259:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2239, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2237, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2245, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2226, - "src": "22309:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2240, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2167, - "src": "22283:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2243, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2241, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "22283:25:2", - "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": 2246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2248, - "nodeType": "ExpressionStatement", - "src": "22259:57:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2252, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2254, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2226, - "src": "22356:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2249, - "name": "comp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2161, - "src": "22326:4:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1921, - "src": "22326:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1818_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2256, - "nodeType": "ExpressionStatement", - "src": "22326:37:2" - } - ] - }, - "documentation": null, - "id": 2258, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2226, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2258, - "src": "22177:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:2" - }, - "returnParameters": { - "id": 2228, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:2" - }, - "scope": 2259, - "src": "22159:211:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2679, - "src": "21458:914:2" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2260, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2259, - "src": "22398:14:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$2259", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 2261, - "nodeType": "InheritanceSpecifier", - "src": "22398:14:2" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2262, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2143, - "src": "22414:28:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$2143", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 2263, - "nodeType": "InheritanceSpecifier", - "src": "22414:28:2" - } - ], - "contractDependencies": [ - 1638, - 1750, - 2143, - 2259 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2678, - "linearizedBaseContracts": [ - 2678, - 2143, - 1750, - 1638, - 2259 - ], - "name": "YAMCOMPPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2268, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22449:70:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2264, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1818, - "src": "22449:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 2266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22476:42:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2265, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1818, - "src": "22469:6:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$1818_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22469:50:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2271, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22525:41:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2269, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22525:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 2270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22560:6:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2274, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22588:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22588:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 2273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22615:10:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2277, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22669:31:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2275, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22669:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 2276, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22699:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2280, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22706:29:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2278, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22706:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 2279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22734:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2282, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22741:29:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2281, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22741:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2284, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22776:35:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22776:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2288, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22817:57:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2287, - "keyType": { - "id": 2285, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22825:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22817:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2286, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22836:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2292, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 2678, - "src": "22880:42:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2291, - "keyType": { - "id": 2289, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22888:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22880:27:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2290, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22899:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 2296, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 2295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2294, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2296, - "src": "22947:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22947:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22946:16:2" - }, - "src": "22929:34:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 2302, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 2301, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2298, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 2302, - "src": "22981:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22981:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2300, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2302, - "src": "23003:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2299, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22980:38:2" - }, - "src": "22968:51:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 2308, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 2307, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2304, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 2308, - "src": "23040:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2303, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23040:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2306, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2308, - "src": "23062:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2305, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23062:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23039:38:2" - }, - "src": "23024:54:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 2314, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 2313, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2310, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 2314, - "src": "23100:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23100:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2312, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2314, - "src": "23122:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2311, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23122:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23099:38:2" - }, - "src": "23083:55:2" - }, - { - "body": { - "id": 2325, - "nodeType": "Block", - "src": "23166:77:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2317, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23184:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23184:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2319, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "23203:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23184:28:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 2321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23213:11:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 2316, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23176:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23176:49:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2323, - "nodeType": "ExpressionStatement", - "src": "23176:49:2" - }, - { - "id": 2324, - "nodeType": "PlaceholderStatement", - "src": "23235:1:2" - } - ] - }, - "documentation": null, - "id": 2326, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2315, - "nodeType": "ParameterList", - "parameters": [], - "src": "23163:2:2" - }, - "src": "23144:99:2", - "visibility": "internal" - }, - { - "body": { - "id": 2362, - "nodeType": "Block", - "src": "23288:283:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2330, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23298:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2331, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2409, - "src": "23321:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23321:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23298:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2334, - "nodeType": "ExpressionStatement", - "src": "23298:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2335, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "23347:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2336, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2376, - "src": "23364:24:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23364:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23347:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2339, - "nodeType": "ExpressionStatement", - "src": "23347:43:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2340, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23404:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2342, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23423:1:2", - "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": 2341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23415:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23415:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23404:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2360, - "nodeType": "IfStatement", - "src": "23400:154:2", - "trueBody": { - "id": 2359, - "nodeType": "Block", - "src": "23427:127:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2345, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "23441:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2347, - "indexExpression": { - "argumentTypes": null, - "id": 2346, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23449:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23441:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2349, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23467:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2348, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2438, - "src": "23460:6:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23460:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23441:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2352, - "nodeType": "ExpressionStatement", - "src": "23441:34:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2353, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2288, - "src": "23489:22:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2355, - "indexExpression": { - "argumentTypes": null, - "id": 2354, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2328, - "src": "23512:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23489:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2356, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23523:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23489:54:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2358, - "nodeType": "ExpressionStatement", - "src": "23489:54:2" - } - ] - } - }, - { - "id": 2361, - "nodeType": "PlaceholderStatement", - "src": "23563:1:2" - } - ] - }, - "documentation": null, - "id": 2363, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2328, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2363, - "src": "23271:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2327, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23271:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23270:17:2" - }, - "src": "23249:322:2", - "visibility": "internal" - }, - { - "body": { - "id": 2375, - "nodeType": "Block", - "src": "23643:63:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2370, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23669:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23669:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2372, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "23686:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2368, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1426, - "src": "23660:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$1426_$", - "typeString": "type(library Math)" - } - }, - "id": 2369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 1393, - "src": "23660:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23660:39:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2367, - "id": 2374, - "nodeType": "Return", - "src": "23653:46:2" - } - ] - }, - "documentation": null, - "id": 2376, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2364, - "nodeType": "ParameterList", - "parameters": [], - "src": "23610:2:2" - }, - "returnParameters": { - "id": 2367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2366, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2376, - "src": "23634:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23634:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23633:9:2" - }, - "scope": 2678, - "src": "23577:129:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2408, - "nodeType": "Block", - "src": "23768:352:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2381, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2175, - "src": "23782:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23782:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23799:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23782:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2388, - "nodeType": "IfStatement", - "src": "23778:76:2", - "trueBody": { - "id": 2387, - "nodeType": "Block", - "src": "23802:52:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2385, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23823:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2380, - "id": 2386, - "nodeType": "Return", - "src": "23816:27:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2403, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2175, - "src": "24085:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24085:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 2400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24054:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2397, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "24017:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2394, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "23976:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2391, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2376, - "src": "23924:24:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "23924:51:2", - "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": 2395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "23924:92:2", - "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": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:104:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "23924:129:2", - "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": 2401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:135:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "23924:160:2", - "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": 2405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:175:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2389, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2284, - "src": "23882:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "23882:24:2", - "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": 2406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23882:231:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2380, - "id": 2407, - "nodeType": "Return", - "src": "23863:250:2" - } - ] - }, - "documentation": null, - "id": 2409, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2377, - "nodeType": "ParameterList", - "parameters": [], - "src": "23735:2:2" - }, - "returnParameters": { - "id": 2380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2379, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2409, - "src": "23759:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2378, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23759:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23758:9:2" - }, - "scope": 2678, - "src": "23712:408:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2437, - "nodeType": "Block", - "src": "24189:196:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2432, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "24361:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2434, - "indexExpression": { - "argumentTypes": null, - "id": 2433, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2411, - "src": "24369:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24361:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24334:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2423, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2288, - "src": "24279:22:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2425, - "indexExpression": { - "argumentTypes": null, - "id": 2424, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2411, - "src": "24302:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24279:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2420, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2409, - "src": "24258:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "24258:20:2", - "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": 2426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:53:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2417, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2411, - "src": "24228:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2416, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "24218:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "24218:39:2", - "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": 2427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:94:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "24218:115:2", - "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": 2430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:121:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "24218:142:2", - "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": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:160:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2415, - "id": 2436, - "nodeType": "Return", - "src": "24199:179:2" - } - ] - }, - "documentation": null, - "id": 2438, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2412, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2411, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 2438, - "src": "24142:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2410, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24142:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24141:17:2" - }, - "returnParameters": { - "id": 2415, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2414, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2438, - "src": "24180:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2413, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24180:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24179:9:2" - }, - "scope": 2678, - "src": "24126:259:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2468, - "nodeType": "Block", - "src": "24547:124:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2450, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "24565:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2451, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24574:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24565:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 2453, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24577:16:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 2449, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24557:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24557:37:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2455, - "nodeType": "ExpressionStatement", - "src": "24557:37:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2459, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "24616:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2456, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "24604:5:2", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMCOMPPool_$2678", - "typeString": "contract super YAMCOMPPool" - } - }, - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 2224, - "src": "24604:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24604:19:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2461, - "nodeType": "ExpressionStatement", - "src": "24604:19:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2463, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24645:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24645:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2465, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "24657:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2462, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2302, - "src": "24638:6:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24638:26:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2467, - "nodeType": "EmitStatement", - "src": "24633:31:2" - } - ] - }, - "documentation": null, - "id": 2469, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2443, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24524:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24524:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2445, - "modifierName": { - "argumentTypes": null, - "id": 2442, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "24511:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24511:24:2" - }, - { - "arguments": null, - "id": 2447, - "modifierName": { - "argumentTypes": null, - "id": 2446, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2326, - "src": "24536:10:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24536:10:2" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2440, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2469, - "src": "24488:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24488:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24487:16:2" - }, - "returnParameters": { - "id": 2448, - "nodeType": "ParameterList", - "parameters": [], - "src": "24547:0:2" - }, - "scope": 2678, - "src": "24473:198:2", - "stateMutability": "nonpayable", - "superFunction": 2224, - "visibility": "public" - }, - { - "body": { - "id": 2499, - "nodeType": "Block", - "src": "24754:133:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2481, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2471, - "src": "24772:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24781:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24772:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 2484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24784:19:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 2480, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24764:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24764:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2486, - "nodeType": "ExpressionStatement", - "src": "24764:40:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2490, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2471, - "src": "24829:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2487, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "24814:5:2", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMCOMPPool_$2678", - "typeString": "contract super YAMCOMPPool" - } - }, - "id": 2489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 2258, - "src": "24814:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24814:22:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2492, - "nodeType": "ExpressionStatement", - "src": "24814:22:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2494, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24861:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24861:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2496, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2471, - "src": "24873:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2493, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2308, - "src": "24851:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24851:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2498, - "nodeType": "EmitStatement", - "src": "24846:34:2" - } - ] - }, - "documentation": null, - "id": 2500, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2474, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24731:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24731:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2476, - "modifierName": { - "argumentTypes": null, - "id": 2473, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "24718:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24718:24:2" - }, - { - "arguments": null, - "id": 2478, - "modifierName": { - "argumentTypes": null, - "id": 2477, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2326, - "src": "24743:10:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24743:10:2" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2472, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2471, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 2500, - "src": "24695:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2470, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24695:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24694:16:2" - }, - "returnParameters": { - "id": 2479, - "nodeType": "ParameterList", - "parameters": [], - "src": "24754:0:2" - }, - "scope": 2678, - "src": "24677:210:2", - "stateMutability": "nonpayable", - "superFunction": 2258, - "visibility": "public" - }, - { - "body": { - "id": 2513, - "nodeType": "Block", - "src": "24918:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2505, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24947:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24947:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2504, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2187, - "src": "24937:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24937:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2503, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2500 - ], - "referencedDeclaration": 2500, - "src": "24928:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24928:31:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2509, - "nodeType": "ExpressionStatement", - "src": "24928:31:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2510, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2579, - "src": "24969:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 2511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:11:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2512, - "nodeType": "ExpressionStatement", - "src": "24969:11:2" - } - ] - }, - "documentation": null, - "id": 2514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2501, - "nodeType": "ParameterList", - "parameters": [], - "src": "24906:2:2" - }, - "returnParameters": { - "id": 2502, - "nodeType": "ParameterList", - "parameters": [], - "src": "24918:0:2" - }, - "scope": 2678, - "src": "24893:94:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 2578, - "nodeType": "Block", - "src": "25057:379:2", - "statements": [ - { - "assignments": [ - 2524 - ], - "declarations": [ - { - "constant": false, - "id": 2524, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2578, - "src": "25067:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25067:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2529, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2526, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25091:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25091:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 2525, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2438, - "src": "25084:6:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25084:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25067:35:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2530, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2524, - "src": "25116:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25125:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25116:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2577, - "nodeType": "IfStatement", - "src": "25112:318:2", - "trueBody": { - "id": 2576, - "nodeType": "Block", - "src": "25128:302:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2533, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "25142:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2536, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25150:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25150:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25142:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 2537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25164:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25142:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2539, - "nodeType": "ExpressionStatement", - "src": "25142:23:2" - }, - { - "assignments": [ - 2541 - ], - "declarations": [ - { - "constant": false, - "id": 2541, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 2576, - "src": "25179:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2540, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25179:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2549, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2544, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2268, - "src": "25215:3:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - ], - "id": 2543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25207:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2542, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2150, - "src": "25203:3:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$2150_$", - "typeString": "type(contract YAM)" - } - }, - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:17:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$2150", - "typeString": "contract YAM" - } - }, - "id": 2547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 2149, - "src": "25203:35:2", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 2548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25179:61:2" - }, - { - "assignments": [ - 2551 - ], - "declarations": [ - { - "constant": false, - "id": 2551, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 2576, - "src": "25254:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25254:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2561, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 2559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 2557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 2558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25309:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25305:6:2", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2554, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2541, - "src": "25286:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2552, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2524, - "src": "25275:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "25275:10:2", - "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": 2555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "25275:29:2", - "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": 2560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25254:58:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25343:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25343:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2551, - "src": "25355:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2562, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2268, - "src": "25326:3:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1818", - "typeString": "contract IERC20" - } - }, - "id": 2564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1921, - "src": "25326:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1818_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1818_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25326:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2569, - "nodeType": "ExpressionStatement", - "src": "25326:40:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2571, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25396:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25396:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2573, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2551, - "src": "25408:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2570, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2314, - "src": "25385:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:34:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2575, - "nodeType": "EmitStatement", - "src": "25380:39:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2579, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2517, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25034:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25034:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2519, - "modifierName": { - "argumentTypes": null, - "id": 2516, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "25021:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25021:24:2" - }, - { - "arguments": null, - "id": 2521, - "modifierName": { - "argumentTypes": null, - "id": 2520, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2326, - "src": "25046:10:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25046:10:2" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2515, - "nodeType": "ParameterList", - "parameters": [], - "src": "25011:2:2" - }, - "returnParameters": { - "id": 2522, - "nodeType": "ParameterList", - "parameters": [], - "src": "25057:0:2" - }, - "scope": 2678, - "src": "24993:443:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2676, - "nodeType": "Block", - "src": "25571:703:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2591, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25585:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25585:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2593, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "25603:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25585:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2674, - "nodeType": "Block", - "src": "26088:180:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2652, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "26100:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2655, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "26124:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2653, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "26113:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "26113:10:2", - "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": 2656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26113:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2658, - "nodeType": "ExpressionStatement", - "src": "26100:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2659, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "26145:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2660, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "26162:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26145:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2662, - "nodeType": "ExpressionStatement", - "src": "26145:26:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2663, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "26183:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2666, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "26212:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2664, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2274, - "src": "26198:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "26198:13:2", - "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": 2667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26198:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26183:38:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2669, - "nodeType": "ExpressionStatement", - "src": "26183:38:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2671, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "26250:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2670, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2296, - "src": "26238:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26238:19:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2673, - "nodeType": "EmitStatement", - "src": "26233:24:2" - } - ] - }, - "id": 2675, - "nodeType": "IfStatement", - "src": "25581:687:2", - "trueBody": { - "id": 2651, - "nodeType": "Block", - "src": "25614:468:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2595, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25630:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25630:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2597, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "25649:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25630:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2632, - "nodeType": "Block", - "src": "25731:205:2", - "statements": [ - { - "assignments": [ - 2608 - ], - "declarations": [ - { - "constant": false, - "id": 2608, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 2632, - "src": "25747:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25747:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2614, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2611, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25784:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25784:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2609, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "25767:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1468, - "src": "25767:16:2", - "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": 2613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25767:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25747:53:2" - }, - { - "assignments": [ - 2616 - ], - "declarations": [ - { - "constant": false, - "id": 2616, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 2632, - "src": "25816:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2615, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25816:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2621, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2619, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "25849:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2617, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2608, - "src": "25835:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 1529, - "src": "25835:13:2", - "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": 2620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25816:44:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2622, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "25876:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2628, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "25914:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2625, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2616, - "src": "25900:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2623, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "25889:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "25889:10:2", - "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": 2626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "25889:24:2", - "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": 2629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25876:47:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2631, - "nodeType": "ExpressionStatement", - "src": "25876:47:2" - } - ] - }, - "id": 2633, - "nodeType": "IfStatement", - "src": "25626:310:2", - "trueBody": { - "id": 2606, - "nodeType": "Block", - "src": "25663:62:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2599, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2280, - "src": "25679:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2602, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "25703:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2600, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "25692:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 1545, - "src": "25692:10:2", - "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": 2603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25692:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25679:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2605, - "nodeType": "ExpressionStatement", - "src": "25679:33:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 2637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2634, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2282, - "src": "25947:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2635, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25964:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25964:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25947:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2638, - "nodeType": "ExpressionStatement", - "src": "25947:32:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2639, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2277, - "src": "25991:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2643, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "26026:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2640, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26006:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26006:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 1452, - "src": "26006:19:2", - "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": 2644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26006:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25991:44:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2646, - "nodeType": "ExpressionStatement", - "src": "25991:44:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2648, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2581, - "src": "26064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2647, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2296, - "src": "26052:11:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 2649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:19:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2650, - "nodeType": "EmitStatement", - "src": "26047:24:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2677, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2584, - "modifierName": { - "argumentTypes": null, - "id": 2583, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2130, - "src": "25511:22:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25511:22:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25563:1:2", - "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": 2586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25555:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25555:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 2589, - "modifierName": { - "argumentTypes": null, - "id": 2585, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2363, - "src": "25542:12:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25542:24:2" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2582, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2581, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 2677, - "src": "25470:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2580, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25470:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25469:16:2" - }, - "returnParameters": { - "id": 2590, - "nodeType": "ParameterList", - "parameters": [], - "src": "25571:0:2" - }, - "scope": 2678, - "src": "25442:832:2", - "stateMutability": "nonpayable", - "superFunction": 2118, - "visibility": "external" - } - ], - "scope": 2679, - "src": "22374:3902:2" - } - ], - "src": "1490:24787:2" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0x77115087D679eCC95613d069f46ca6598b9AF587", - "transactionHash": "0xf765d924be4d5cf1ab7649bc0008052a2cb86a19d8740c35bb8f3026df78fd88" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.689Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMDelegate.json b/build/contracts/YAMDelegate.json deleted file mode 100644 index a9089c1..0000000 --- a/build/contracts/YAMDelegate.json +++ /dev/null @@ -1,3820 +0,0 @@ -{ - "contractName": "YAMDelegate", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "BASE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "incentivizer_", - "type": "address" - } - ], - "name": "_setIncentivizer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "incentivizer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address", - "name": "initial_owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initSupply_", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "internalDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "indexDelta", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "positive", - "type": "bool" - } - ], - "name": "rebase", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamsScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldIncentivizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newIncentivizer\",\"type\":\"address\"}],\"name\":\"NewIncentivizer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevYamsScalingFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newYamsScalingFactor\",\"type\":\"uint256\"}],\"name\":\"Rebase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_becomeImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_resignImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"incentivizer_\",\"type\":\"address\"}],\"name\":\"_setIncentivizer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"incentivizer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"initial_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initSupply_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"internalDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexDelta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"positive\",\"type\":\"bool\"}],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamsScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_becomeImplementation(bytes)\":{\"params\":{\"data\":\"The encoded bytes data for any initialization\"}},\"_setIncentivizer(address)\":{\"params\":{\"incentivizer_\":\"The address of the rebaser contract to use for authentication.\"}},\"_setPendingGov(address)\":{\"params\":{\"pendingGov_\":\"The address of the rebaser contract to use for authentication.\"}},\"_setRebaser(address)\":{\"params\":{\"rebaser_\":\"The address of the rebaser contract to use for authentication.\"}},\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner has allowed to a spender.\",\"params\":{\"owner_\":\"The address which owns the funds.\",\"spender\":\"The address which will spend the funds.\"},\"return\":\"The number of tokens still available for the spender.\"},\"approve(address,uint256)\":{\"details\":\"Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. This method is included for ERC20 compatibility. increaseAllowance and decreaseAllowance should be used instead. Changing an allowance with this method brings the risk that someone may transfer both the old and the new allowance - if they are both greater than zero - if a transfer transaction is mined before the later approve() call is mined.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"}},\"balanceOf(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"The balance of the specified address.\"},\"balanceOfUnderlying(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"The underlying balance of the specified address.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Decrease the amount of tokens that an owner has allowed to a spender.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"subtractedValue\":\"The amount of tokens to decrease the allowance by.\"}},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\",\"expiry\":\"The time at which to expire the signature\",\"nonce\":\"The contract state required to match the signature\",\"r\":\"Half of the ECDSA signature pair\",\"s\":\"Half of the ECDSA signature pair\",\"v\":\"The recovery byte of the signature\"}},\"delegates(address)\":{\"params\":{\"delegator\":\"The address to get delegatee for\"}},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"The address to get votes balance\"},\"return\":\"The number of current votes for `account`\"},\"getPriorVotes(address,uint256)\":{\"details\":\"Block number must be a finalized block or else this function will revert to prevent misinformation.\",\"params\":{\"account\":\"The address of the account to check\",\"blockNumber\":\"The block number to get the vote balance at\"},\"return\":\"The number of votes the account had as of the given block\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.\",\"params\":{\"addedValue\":\"The amount of tokens to increase the allowance by.\",\"spender\":\"The address which will spend the funds.\"}},\"initialize(string,string,uint8,address,uint256)\":{\"params\":{\"decimals_\":\"ERC-20 decimal precision of this token\",\"name_\":\"ERC-20 name of this token\",\"symbol_\":\"ERC-20 symbol of this token\"}},\"mint(address,uint256)\":{\"details\":\"Limited to onlyMinter modifier\"},\"rebase(uint256,uint256,bool)\":{\"details\":\"The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi\"},\"transfer(address,uint256)\":{\"details\":\"Transfer tokens to a specified address.\",\"params\":{\"to\":\"The address to transfer to.\",\"value\":\"The amount to be transferred.\"},\"return\":\"True on success, false otherwise.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfer tokens from one address to another.\",\"params\":{\"from\":\"The address you want to send tokens from.\",\"to\":\"The address you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"}}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"lets msg.sender accept governance \"},\"_becomeImplementation(bytes)\":{\"notice\":\"Called by the delegator on a delegate to initialize it for duty\"},\"_resignImplementation()\":{\"notice\":\"Called by the delegator on a delegate to forfeit its responsibility\"},\"_setIncentivizer(address)\":{\"notice\":\"sets the incentivizer\"},\"_setPendingGov(address)\":{\"notice\":\"sets the pendingGov\"},\"_setRebaser(address)\":{\"notice\":\"sets the rebaser\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Currently returns the internal storage amount\"},\"constructor\":\"Construct an empty delegate\",\"delegate(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Delegates votes from signatory to `delegatee`\"},\"delegates(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"getCurrentVotes(address)\":{\"notice\":\"Gets the current votes balance for `account`\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"Determine the prior number of votes for an account as of a block number\"},\"initialize(string,string,uint8,address,uint256)\":{\"notice\":\"Initialize the new money market\"},\"maxScalingFactor()\":{\"notice\":\"Computes the current max scaling factor\"},\"mint(address,uint256)\":{\"notice\":\"Mints new tokens, increasing totalSupply, initSupply, and a users balance.\"},\"rebase(uint256,uint256,bool)\":{\"notice\":\"Initiates a new rebase operation, provided the minimum time period has elapsed.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":\"YAMDelegate\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":{\"keccak256\":\"0x37805294539ffc72da1145dce61bffee4437b329f5aee47e4ff3c24b805fb734\",\"urls\":[\"bzz-raw://13ffb729ad13edf89c0c21f4e01d66a58de29fc0741ac1a98b5f24be66f31fbd\",\"dweb:/ipfs/QmUvabJwLsrEYstkwbCB5gF1MPH2HuJvYrf2TDDb44MazA\"]},\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":{\"keccak256\":\"0x9d14e5bfa7dcce0163bcc40052326853f35743539b6c3e68ee2dc1a23af928d9\",\"urls\":[\"bzz-raw://84df0a04bf8024506121bb66ac8a67684e78f459629d99f5c9da24cdad2f6cb6\",\"dweb:/ipfs/QmcKKLn9SMBJQ7Emq3AwzZho8rpD8XLWazXYSD5Y2NnK2E\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506130c6806100206000396000f3fe608060405234801561001057600080fd5b50600436106102de5760003560e01c80636c9452211161018657806398dca210116100e3578063c3cda52011610097578063ec342ad011610071578063ec342ad014610ba7578063f1127ed814610baf578063fa8f345514610c0e576102de565b8063c3cda52014610b10578063dd62ed3e14610b64578063e7a324dc14610b9f576102de565b8063a9059cbb116100c8578063a9059cbb14610a9c578063b4b5ea5714610ad5578063b6fa857614610b08576102de565b806398dca21014610a30578063a457c2d714610a63576102de565b8063782d6fe11161013a5780637ecebe001161011f5780637ecebe00146109ed57806395d89b4114610a2057806397d63f9314610a28576102de565b8063782d6fe1146109895780637af548c1146109c2576102de565b80636fcfff451161016b5780636fcfff45146108d757806370a082311461092357806373f03dff14610956576102de565b80636c9452211461077e5780636fc6407c146108cf576102de565b8063252408101161023f5780634bda2e20116101f35780635c19a95c116101cd5780635c19a95c1461073b5780635c60da1b1461076e57806364dd48f514610776576102de565b80634bda2e201461065a57806356e6772814610662578063587cde1e14610708576102de565b8063395093511161022457806339509351146105b55780633af9e669146105ee57806340c10f1914610621576102de565b8063252408101461058f578063313ce56714610597576102de565b8063153ab5051161029657806318160ddd1161027b57806318160ddd1461053c57806320606b701461054457806323b872dd1461054c576102de565b8063153ab505146104005780631624f6c61461040a576102de565b806311d3e6c4116102c757806311d3e6c4146103ad57806311fd8a83146103c757806312d43a51146103f8576102de565b806306fdde03146102e3578063095ea7b314610360575b600080fd5b6102eb610c41565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103996004803603604081101561037657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610cec565b604080519115158252519081900360200190f35b6103b5610d60565b60408051918252519081900360200190f35b6103cf610d70565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103cf610d8c565b610408610dad565b005b6104086004803603606081101561042057600080fd5b81019060208101813564010000000081111561043b57600080fd5b82018360208201111561044d57600080fd5b8035906020019184600183028401116401000000008311171561046f57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156104c257600080fd5b8201836020820111156104d457600080fd5b803590602001918460018302840111640100000000831117156104f657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b6103b5610ef1565b6103b5610ef7565b6103996004803603606081101561056257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610f12565b6103cf611124565b61059f611140565b6040805160ff9092168252519081900360200190f35b610399600480360360408110156105cb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611149565b6103b56004803603602081101561060457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111fc565b6103996004803603604081101561063757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611224565b610408611309565b6104086004803603602081101561067857600080fd5b81019060208101813564010000000081111561069357600080fd5b8201836020820111156106a557600080fd5b803590602001918460018302840111640100000000831117156106c757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061144c945050505050565b6103cf6004803603602081101561071e57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114c4565b6104086004803603602081101561075157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114ef565b6103cf6114f9565b6103b5611515565b610408600480360360a081101561079457600080fd5b8101906020810181356401000000008111156107af57600080fd5b8201836020820111156107c157600080fd5b803590602001918460018302840111640100000000831117156107e357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561083657600080fd5b82018360208201111561084857600080fd5b8035906020019184600183028401116401000000008311171561086a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff169060400135611523565b6103cf61161e565b61090a600480360360208110156108ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661163a565b6040805163ffffffff9092168252519081900360200190f35b6103b56004803603602081101561093957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611652565b6104086004803603602081101561096c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661169d565b6103b56004803603604081101561099f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561174e565b6103b5600480360360608110156109d857600080fd5b50803590602081013590604001351515611a18565b6103b560048036036020811015610a0357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611b80565b6102eb611b92565b6103b5611c08565b61040860048036036020811015610a4657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611c0e565b61039960048036036040811015610a7957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611cbf565b61039960048036036040811015610ab257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611de2565b6103b560048036036020811015610aeb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611f59565b6103b5611ff4565b610408600480360360c0811015610b2657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611ffa565b6103b560048036036040811015610b7a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166123b1565b6103b56123e9565b6103b5612404565b610bee60048036036040811015610bc557600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16612410565b6040805163ffffffff909316835260208301919091528051918290030190f35b61040860048036036020811015610c2457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661243d565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610ce45780601f10610cb957610100808354040283529160200191610ce4565b820191906000526020600020905b815481529060010190602001808311610cc757829003601f168201915b505050505081565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000610d6a6124ee565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314610e22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180612f20602b913960400191505060405180910390fd5b565b60085415610e9357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251610ea6906001906020860190612e2a565b508151610eba906002906020850190612e2a565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b604051806043612f9c82396043019050604051809103902081565b60008273ffffffffffffffffffffffffffffffffffffffff8116610f3557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415610f5857600080fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a60209081526040808320338452909152902054610f99908463ffffffff61252116565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60209081526040808320338452909152812091909155600854610ffa90610fee8669d3c21bcecceda100000063ffffffff61256316565b9063ffffffff6125d616565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260096020526040902054909150611033908263ffffffff61252116565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600960205260408082209390935590871681522054611075908263ffffffff61261816565b73ffffffffffffffffffffffffffffffffffffffff80871660008181526009602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a373ffffffffffffffffffffffffffffffffffffffff8087166000908152600c60205260408082205488841683529120546111189291821691168361268c565b50600195945050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205461118a908363ffffffff61261816565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331480611264575060065473ffffffffffffffffffffffffffffffffffffffff1633145b8061128b5750600354610100900473ffffffffffffffffffffffffffffffffffffffff1633145b6112f657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74206d696e74657200000000000000000000000000000000000000000000604482015290519081900360640190fd5b611300838361287e565b50600192915050565b60045473ffffffffffffffffffffffffffffffffffffffff16331461138f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380546004805473ffffffffffffffffffffffffffffffffffffffff8181166101009081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff861617958690557fffffffffffffffffffffffff000000000000000000000000000000000000000090921690925560408051938290048316808552919094049091166020830152825190927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523928290030190a150565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146114c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180612f71602b913960400191505060405180910390fd5b50565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600c60205260409020541690565b6114c133826129e9565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b6000811161159257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f3020696e697420737570706c7900000000000000000000000000000000000000604482015290519081900360640190fd5b61159d858585610e24565b6115c4670de0b6b3a764000069d3c21bcecceda10000005b8391900463ffffffff61256316565b600b556007819055670de0b6b3a764000060088190556115ee9069d3c21bcecceda10000006115b5565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526009602052604090209190915550505050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b60085473ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408120549091610d5a9169d3c21bcecceda100000091610fee919063ffffffff61256316565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146116c657600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60004382106117a8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612f4b6026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205463ffffffff16806117e3576000915050610d5a565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601811685529252909120541683106118a85773ffffffffffffffffffffffffffffffffffffffff84166000908152600d602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff16835292905220600101549050610d5a565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832083805290915290205463ffffffff168310156118f0576000915050610d5a565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff1611156119d457600282820363ffffffff16048103611940612ea8565b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600d6020908152604080832063ffffffff8086168552908352928190208151808301909252805490931680825260019093015491810191909152908714156119af57602001519450610d5a9350505050565b805163ffffffff168711156119c6578193506119cd565b6001820392505b5050611916565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff9094168352929052206001015491505092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff163314611a3f57600080fd5b82611a9057600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150600754611b79565b60085482611ace57611ac6670de0b6b3a7640000610fee611ab7828863ffffffff61252116565b6008549063ffffffff61256316565b600855611b18565b6000611aef670de0b6b3a7640000610fee611ab7828963ffffffff61261816565b9050611af96124ee565b811015611b0a576008819055611b16565b611b126124ee565b6008555b505b600854600b54611b2d9163ffffffff61256316565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610ce45780601f10610cb957610100808354040283529160200191610ce4565b600b5481565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314611c3757600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896929181900390910190a15050565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054808310611d2d57336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611d6f565b611d3d818463ffffffff61252116565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008273ffffffffffffffffffffffffffffffffffffffff8116611e0557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415611e2857600080fd5b600854600090611e4c90610fee8669d3c21bcecceda100000063ffffffff61256316565b33600090815260096020526040902054909150611e6f908263ffffffff61252116565b336000908152600960205260408082209290925573ffffffffffffffffffffffffffffffffffffffff871681522054611eae908263ffffffff61261816565b73ffffffffffffffffffffffffffffffffffffffff86166000818152600960209081526040918290209390935580518781529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3336000908152600c60205260408082205473ffffffffffffffffffffffffffffffffffffffff88811684529190922054611f4e92821691168361268c565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e602052604081205463ffffffff1680611f91576000611b79565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101549392505050565b60085481565b60006040518080612f9c6043913960430190506040518091039020600160405180828054600181600116156101000203166002900480156120725780601f10612050576101008083540402835291820191612072565b820191906000526020600020905b81548152906001019060200180831161205e575b50509150506040518091039020612087612a8e565b30604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405160208183030381529060405280519060200120905060006040518080613058603a91396040805191829003603a01822060208084019190915273ffffffffffffffffffffffffffffffffffffffff8c1683830152606083018b905260808084018b90528251808503909101815260a0840183528051908201207f190100000000000000000000000000000000000000000000000000000000000060c085015260c2840187905260e2808501829052835180860390910181526101028501808552815191840191909120600091829052610122860180865281905260ff8c1661014287015261016286018b905261018286018a9052935191965092945091926001926101a280830193927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa158015612225573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166122bc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612efb6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600f602052604090208054600181019091558914612341576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612eda6021913960400191505060405180910390fd5b8742111561239a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806130006025913960400191505060405180910390fd5b6123a4818b6129e9565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60405180603a6130588239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461246657600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161251b57fe5b04905090565b6000611b7983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612a92565b60008261257257506000610d5a565b8282028284828161257f57fe5b0414611b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612fdf6021913960400191505060405180910390fd5b6000611b7983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b43565b600082820183811015611b7957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156126c85750600081115b156128795773ffffffffffffffffffffffffffffffffffffffff8316156127a55773ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081205463ffffffff16908161272257600061277f565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000612793828563ffffffff61252116565b90506127a186848484612bc2565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156128795773ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604081205463ffffffff1690816127fa576000612857565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b9050600061286b828563ffffffff61261816565b90506123a985848484612bc2565b505050565b600754612891908263ffffffff61261816565b6007556008546000906128b890610fee8469d3c21bcecceda100000063ffffffff61256316565b600b549091506128ce908263ffffffff61261816565b600b556128d96124ee565b600854111561294957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178207363616c696e6720666163746f7220746f6f206c6f77000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205461297f908263ffffffff61261816565b73ffffffffffffffffffffffffffffffffffffffff841660008181526009602090815260409182902093909355805191825291810184905281517f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885929181900390910190a1505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600c6020818152604080842080546009845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4612a8882848361268c565b50505050565b4690565b60008184841115612b3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b00578181015183820152602001612ae8565b50505050905090810190601f168015612b2d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183612bac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315612b00578181015183820152602001612ae8565b506000838581612bb857fe5b0495945050505050565b6000612be64360405180606001604052806033815260200161302560339139612db2565b905060008463ffffffff16118015612c5a575073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15612cc25773ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612d5b565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600d84528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009182161787559251600196870155908152600e9092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315612b00578181015183820152602001612ae8565b509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e6b57805160ff1916838001178555612e98565b82800160010185558215612e98579182015b82811115612e98578251825591602001919060010190612e7d565b50612ea4929150612ebf565b5090565b604080518082019091526000808252602082015290565b610d6d91905b80821115612ea45760008155600101612ec556fe59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e636559414d3a3a64656c656761746542795369673a20696e76616c6964207369676e61747572656f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e59414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e65646f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7759414d3a3a64656c656761746542795369673a207369676e6174757265206578706972656459414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747344656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a72315820b338989c558bdd43410045e9f0e4dca226e860961343118240085d56718a3a2d64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102de5760003560e01c80636c9452211161018657806398dca210116100e3578063c3cda52011610097578063ec342ad011610071578063ec342ad014610ba7578063f1127ed814610baf578063fa8f345514610c0e576102de565b8063c3cda52014610b10578063dd62ed3e14610b64578063e7a324dc14610b9f576102de565b8063a9059cbb116100c8578063a9059cbb14610a9c578063b4b5ea5714610ad5578063b6fa857614610b08576102de565b806398dca21014610a30578063a457c2d714610a63576102de565b8063782d6fe11161013a5780637ecebe001161011f5780637ecebe00146109ed57806395d89b4114610a2057806397d63f9314610a28576102de565b8063782d6fe1146109895780637af548c1146109c2576102de565b80636fcfff451161016b5780636fcfff45146108d757806370a082311461092357806373f03dff14610956576102de565b80636c9452211461077e5780636fc6407c146108cf576102de565b8063252408101161023f5780634bda2e20116101f35780635c19a95c116101cd5780635c19a95c1461073b5780635c60da1b1461076e57806364dd48f514610776576102de565b80634bda2e201461065a57806356e6772814610662578063587cde1e14610708576102de565b8063395093511161022457806339509351146105b55780633af9e669146105ee57806340c10f1914610621576102de565b8063252408101461058f578063313ce56714610597576102de565b8063153ab5051161029657806318160ddd1161027b57806318160ddd1461053c57806320606b701461054457806323b872dd1461054c576102de565b8063153ab505146104005780631624f6c61461040a576102de565b806311d3e6c4116102c757806311d3e6c4146103ad57806311fd8a83146103c757806312d43a51146103f8576102de565b806306fdde03146102e3578063095ea7b314610360575b600080fd5b6102eb610c41565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103996004803603604081101561037657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610cec565b604080519115158252519081900360200190f35b6103b5610d60565b60408051918252519081900360200190f35b6103cf610d70565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103cf610d8c565b610408610dad565b005b6104086004803603606081101561042057600080fd5b81019060208101813564010000000081111561043b57600080fd5b82018360208201111561044d57600080fd5b8035906020019184600183028401116401000000008311171561046f57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156104c257600080fd5b8201836020820111156104d457600080fd5b803590602001918460018302840111640100000000831117156104f657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b6103b5610ef1565b6103b5610ef7565b6103996004803603606081101561056257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610f12565b6103cf611124565b61059f611140565b6040805160ff9092168252519081900360200190f35b610399600480360360408110156105cb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611149565b6103b56004803603602081101561060457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111fc565b6103996004803603604081101561063757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611224565b610408611309565b6104086004803603602081101561067857600080fd5b81019060208101813564010000000081111561069357600080fd5b8201836020820111156106a557600080fd5b803590602001918460018302840111640100000000831117156106c757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061144c945050505050565b6103cf6004803603602081101561071e57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114c4565b6104086004803603602081101561075157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114ef565b6103cf6114f9565b6103b5611515565b610408600480360360a081101561079457600080fd5b8101906020810181356401000000008111156107af57600080fd5b8201836020820111156107c157600080fd5b803590602001918460018302840111640100000000831117156107e357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561083657600080fd5b82018360208201111561084857600080fd5b8035906020019184600183028401116401000000008311171561086a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff169060400135611523565b6103cf61161e565b61090a600480360360208110156108ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661163a565b6040805163ffffffff9092168252519081900360200190f35b6103b56004803603602081101561093957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611652565b6104086004803603602081101561096c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661169d565b6103b56004803603604081101561099f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561174e565b6103b5600480360360608110156109d857600080fd5b50803590602081013590604001351515611a18565b6103b560048036036020811015610a0357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611b80565b6102eb611b92565b6103b5611c08565b61040860048036036020811015610a4657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611c0e565b61039960048036036040811015610a7957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611cbf565b61039960048036036040811015610ab257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611de2565b6103b560048036036020811015610aeb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611f59565b6103b5611ff4565b610408600480360360c0811015610b2657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611ffa565b6103b560048036036040811015610b7a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166123b1565b6103b56123e9565b6103b5612404565b610bee60048036036040811015610bc557600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16612410565b6040805163ffffffff909316835260208301919091528051918290030190f35b61040860048036036020811015610c2457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661243d565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610ce45780601f10610cb957610100808354040283529160200191610ce4565b820191906000526020600020905b815481529060010190602001808311610cc757829003601f168201915b505050505081565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000610d6a6124ee565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314610e22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180612f20602b913960400191505060405180910390fd5b565b60085415610e9357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251610ea6906001906020860190612e2a565b508151610eba906002906020850190612e2a565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b604051806043612f9c82396043019050604051809103902081565b60008273ffffffffffffffffffffffffffffffffffffffff8116610f3557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415610f5857600080fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a60209081526040808320338452909152902054610f99908463ffffffff61252116565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60209081526040808320338452909152812091909155600854610ffa90610fee8669d3c21bcecceda100000063ffffffff61256316565b9063ffffffff6125d616565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260096020526040902054909150611033908263ffffffff61252116565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600960205260408082209390935590871681522054611075908263ffffffff61261816565b73ffffffffffffffffffffffffffffffffffffffff80871660008181526009602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a373ffffffffffffffffffffffffffffffffffffffff8087166000908152600c60205260408082205488841683529120546111189291821691168361268c565b50600195945050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205461118a908363ffffffff61261816565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331480611264575060065473ffffffffffffffffffffffffffffffffffffffff1633145b8061128b5750600354610100900473ffffffffffffffffffffffffffffffffffffffff1633145b6112f657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74206d696e74657200000000000000000000000000000000000000000000604482015290519081900360640190fd5b611300838361287e565b50600192915050565b60045473ffffffffffffffffffffffffffffffffffffffff16331461138f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380546004805473ffffffffffffffffffffffffffffffffffffffff8181166101009081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff861617958690557fffffffffffffffffffffffff000000000000000000000000000000000000000090921690925560408051938290048316808552919094049091166020830152825190927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523928290030190a150565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146114c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180612f71602b913960400191505060405180910390fd5b50565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600c60205260409020541690565b6114c133826129e9565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b6000811161159257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f3020696e697420737570706c7900000000000000000000000000000000000000604482015290519081900360640190fd5b61159d858585610e24565b6115c4670de0b6b3a764000069d3c21bcecceda10000005b8391900463ffffffff61256316565b600b556007819055670de0b6b3a764000060088190556115ee9069d3c21bcecceda10000006115b5565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526009602052604090209190915550505050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b60085473ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408120549091610d5a9169d3c21bcecceda100000091610fee919063ffffffff61256316565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146116c657600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60004382106117a8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612f4b6026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205463ffffffff16806117e3576000915050610d5a565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601811685529252909120541683106118a85773ffffffffffffffffffffffffffffffffffffffff84166000908152600d602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff16835292905220600101549050610d5a565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832083805290915290205463ffffffff168310156118f0576000915050610d5a565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff1611156119d457600282820363ffffffff16048103611940612ea8565b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600d6020908152604080832063ffffffff8086168552908352928190208151808301909252805490931680825260019093015491810191909152908714156119af57602001519450610d5a9350505050565b805163ffffffff168711156119c6578193506119cd565b6001820392505b5050611916565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff9094168352929052206001015491505092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff163314611a3f57600080fd5b82611a9057600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150600754611b79565b60085482611ace57611ac6670de0b6b3a7640000610fee611ab7828863ffffffff61252116565b6008549063ffffffff61256316565b600855611b18565b6000611aef670de0b6b3a7640000610fee611ab7828963ffffffff61261816565b9050611af96124ee565b811015611b0a576008819055611b16565b611b126124ee565b6008555b505b600854600b54611b2d9163ffffffff61256316565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610ce45780601f10610cb957610100808354040283529160200191610ce4565b600b5481565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314611c3757600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896929181900390910190a15050565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054808310611d2d57336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611d6f565b611d3d818463ffffffff61252116565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008273ffffffffffffffffffffffffffffffffffffffff8116611e0557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415611e2857600080fd5b600854600090611e4c90610fee8669d3c21bcecceda100000063ffffffff61256316565b33600090815260096020526040902054909150611e6f908263ffffffff61252116565b336000908152600960205260408082209290925573ffffffffffffffffffffffffffffffffffffffff871681522054611eae908263ffffffff61261816565b73ffffffffffffffffffffffffffffffffffffffff86166000818152600960209081526040918290209390935580518781529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3336000908152600c60205260408082205473ffffffffffffffffffffffffffffffffffffffff88811684529190922054611f4e92821691168361268c565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e602052604081205463ffffffff1680611f91576000611b79565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101549392505050565b60085481565b60006040518080612f9c6043913960430190506040518091039020600160405180828054600181600116156101000203166002900480156120725780601f10612050576101008083540402835291820191612072565b820191906000526020600020905b81548152906001019060200180831161205e575b50509150506040518091039020612087612a8e565b30604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405160208183030381529060405280519060200120905060006040518080613058603a91396040805191829003603a01822060208084019190915273ffffffffffffffffffffffffffffffffffffffff8c1683830152606083018b905260808084018b90528251808503909101815260a0840183528051908201207f190100000000000000000000000000000000000000000000000000000000000060c085015260c2840187905260e2808501829052835180860390910181526101028501808552815191840191909120600091829052610122860180865281905260ff8c1661014287015261016286018b905261018286018a9052935191965092945091926001926101a280830193927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa158015612225573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166122bc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612efb6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600f602052604090208054600181019091558914612341576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612eda6021913960400191505060405180910390fd5b8742111561239a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806130006025913960400191505060405180910390fd5b6123a4818b6129e9565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60405180603a6130588239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461246657600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161251b57fe5b04905090565b6000611b7983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612a92565b60008261257257506000610d5a565b8282028284828161257f57fe5b0414611b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612fdf6021913960400191505060405180910390fd5b6000611b7983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b43565b600082820183811015611b7957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156126c85750600081115b156128795773ffffffffffffffffffffffffffffffffffffffff8316156127a55773ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081205463ffffffff16908161272257600061277f565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000612793828563ffffffff61252116565b90506127a186848484612bc2565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156128795773ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604081205463ffffffff1690816127fa576000612857565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b9050600061286b828563ffffffff61261816565b90506123a985848484612bc2565b505050565b600754612891908263ffffffff61261816565b6007556008546000906128b890610fee8469d3c21bcecceda100000063ffffffff61256316565b600b549091506128ce908263ffffffff61261816565b600b556128d96124ee565b600854111561294957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178207363616c696e6720666163746f7220746f6f206c6f77000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205461297f908263ffffffff61261816565b73ffffffffffffffffffffffffffffffffffffffff841660008181526009602090815260409182902093909355805191825291810184905281517f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885929181900390910190a1505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600c6020818152604080842080546009845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4612a8882848361268c565b50505050565b4690565b60008184841115612b3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b00578181015183820152602001612ae8565b50505050905090810190601f168015612b2d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183612bac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315612b00578181015183820152602001612ae8565b506000838581612bb857fe5b0495945050505050565b6000612be64360405180606001604052806033815260200161302560339139612db2565b905060008463ffffffff16118015612c5a575073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15612cc25773ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612d5b565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600d84528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009182161787559251600196870155908152600e9092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315612b00578181015183820152602001612ae8565b509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e6b57805160ff1916838001178555612e98565b82800160010185558215612e98579182015b82811115612e98578251825591602001919060010190612e7d565b50612ea4929150612ebf565b5090565b604080518082019091526000808252602082015290565b610d6d91905b80821115612ea45760008155600101612ec556fe59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e636559414d3a3a64656c656761746542795369673a20696e76616c6964207369676e61747572656f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e59414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e65646f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7759414d3a3a64656c656761746542795369673a207369676e6174757265206578706972656459414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747344656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a72315820b338989c558bdd43410045e9f0e4dca226e860961343118240085d56718a3a2d64736f6c63430005110032", - "sourceMap": "1417:1014:23:-;;;1532:23;8:9:-1;5:2;;;30:1;27;20:12;5:2;1532:23:23;1417:1014;;;;;;", - "deployedSourceMap": "1417:1014:23:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1417:1014:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;330:18:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;330:18:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6006:228:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6006:228:22;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;966:131;;;:::i;:::-;;;;;;;;;;;;;;;;793:22:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;602:18;;;:::i;2161:268:23:-;;;:::i;:::-;;611:279:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;611:279:22;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;;;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;-1:-1:-1;;;611:279:22;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;611:279:22:i;971:26:28:-;;;:::i;685:122:26:-;;;:::i;3662:652:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3662:652:22;;;;;;;;;;;;;;;;;;:::i;695:25:28:-;;;:::i;516:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6598:337:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6598:337:22;;;;;;;;;:::i;4773:135::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4773:135:22;;;;:::i;1584:160::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1584:160:22;;;;;;;;;:::i;8873:228::-;;;:::i;1721:335:23:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1721:335:23;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1721:335:23;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1721:335:23;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1721:335:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1721:335:23;;-1:-1:-1;1721:335:23;;-1:-1:-1;;;;;1721:335:23:i;698:143:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;698:143:25;;;;:::i;979:102::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;979:102:25;;;;:::i;154:29:23:-;;;:::i;1083:49:28:-;;;:::i;10695:632:22:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;10695:632:22;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;10695:632:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10695:632:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10695:632:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10695:632:22;;;;;;;;-1:-1:-1;10695:632:22;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;10695:632:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10695:632:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10695:632:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10695:632:22;;-1:-1:-1;;;10695:632:22;;;;;-1:-1:-1;;10695:632:22;;;;;;;;;;;:::i;885:27:28:-;;;:::i;566:49:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;566:49:26;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4426:170:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4426:170:22;;;;:::i;8579:223::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8579:223:22;;;;:::i;3500:1216:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3500:1216:25;;;;;;;;;:::i;9478:960:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9478:960:22;;;;;;;;;;;;;;:::i;1093:39:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1093:39:26;;;;:::i;421:20:28:-;;;:::i;1498:25::-;;;:::i;8199:241:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8199:241:22;;;;:::i;7189:502::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7189:502:22;;;;;;;;;:::i;2588:825::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2588:825:22;;;;;;;;;:::i;2830:248:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2830:248:25;;;;:::i;1319:32:28:-;;;:::i;1504:1132:25:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1504:1132:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5207:170:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5207:170:22;;;;;;;;;;;:::i;898:117:26:-;;;:::i;1196:37:28:-;;;:::i;430:70:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;430:70:26;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;7860:196:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7860:196:22;;;;:::i;330:18:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6006:228:22:-;6127:10;6089:4;6109:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;;:46;;;6170:36;;;;;;;6089:4;;6109:38;;6127:10;;6170:36;;;;;;;;-1:-1:-1;6223:4:22;6006:228;;;;;:::o;966:131::-;1041:7;1071:19;:17;:19::i;:::-;1064:26;;966:131;;:::o;793:22:28:-;;;;;;:::o;602:18::-;;;;;;;;;:::o;2161:268:23:-;2371:3;;;;;;;2357:10;:17;2349:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2161:268::o;611:279:22:-;759:17;;:22;751:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;815:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;837:16:22;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;863:8:22;:20;;;;;;;;;;;;;;;-1:-1:-1;;611:279:22:o;971:26:28:-;;;;:::o;685:122:26:-;727:80;;;;;;;;;;;;;;;;;;685:122;:::o;3662:652:22:-;3786:4;3765:2;530:18;;;522:27;;;;;;567:19;;;581:4;567:19;;559:28;;;;;;3874:23;;;;;;;:17;:23;;;;;;;;3898:10;3874:35;;;;;;;;:46;;3914:5;3874:46;:39;:46;:::i;:::-;3836:23;;;;;;;:17;:23;;;;;;;;3860:10;3836:35;;;;;;;:84;;;;4011:17;;3979:50;;:27;:5;1126:6:28;3979:27:22;:9;:27;:::i;:::-;:31;:50;:31;:50;:::i;:::-;4086:18;;;;;;;:12;:18;;;;;;3960:69;;-1:-1:-1;4086:32:22;;3960:69;4086:32;:22;:32;:::i;:::-;4065:18;;;;;;;;:12;:18;;;;;;:53;;;;4147:16;;;;;;;:30;;4168:8;4147:30;:20;:30;:::i;:::-;4128:16;;;;;;;;:12;:16;;;;;;;;;:49;;;;4192:25;;;;;;;4128:16;;4192:25;;;;;;;;;;;;;4243:16;;;;;;;;:10;:16;;;;;;;4261:14;;;;;;;;4228:58;;4243:16;;;;4261:14;4277:8;4228:14;:58::i;:::-;-1:-1:-1;4303:4:22;;3662:652;-1:-1:-1;;;;;3662:652:22:o;695:25:28:-;;;;;;:::o;516:21::-;;;;;;:::o;6598:337:22:-;6787:10;6696:4;6769:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;:54;;6812:10;6769:54;:42;:54;:::i;:::-;6734:10;6716:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;;;;:107;;;6838:69;;;;;;6716:38;;6838:69;;;;;;;;;;;-1:-1:-1;6924:4:22;6598:337;;;;:::o;4773:135::-;4884:17;;4856:7;4884:17;;;:12;:17;;;;;;;4773:135::o;1584:160::-;379:7;;1679:4;;379:7;;365:10;:21;;:51;;-1:-1:-1;404:12:22;;;;390:10;:26;365:51;:72;;;-1:-1:-1;434:3:22;;;;;;;420:10;:17;365:72;357:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1699:17;1705:2;1709:6;1699:5;:17::i;:::-;-1:-1:-1;1733:4:22;1584:160;;;;:::o;8873:228::-;8948:10;;;;8934;:24;8926:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8998:3;;;9017:10;;;8998:3;9017:10;;;8998:3;9011:16;;;;;;;;;;;9037:23;;;;;;;9075:19;;;8998:3;;;;;;9075:19;;;9090:3;;;;;;;9075:19;;;;;;8998:3;;9075:19;;;;;;;;8873:228;:::o;1721:335:23:-;1998:3;;;;;;;1984:10;:17;1976:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1721:335;:::o;698:143:25:-;813:21;;;;783:7;813:21;;;:10;:21;;;;;;;;698:143::o;979:102::-;1042:32;1052:10;1064:9;1042;:32::i;154:29:23:-;;;;;;:::o;1083:49:28:-;1126:6;1083:49;:::o;10695:632:22:-;10917:1;10903:11;:15;10895:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10947:43;10964:5;10971:7;10980:9;10947:16;:43::i;:::-;11014:31;1227:6:28;11030::22;:14;11014:11;;11030:14;;11014:31;:15;:31;:::i;:::-;11001:10;:44;11055:11;:25;;;1227:6:28;11090:17:22;:24;;;11154:32;;11170:6;:15;;11154:32;11124:27;;;;;;;;:12;:27;;;;;:62;;;;-1:-1:-1;;;;10695:632:22:o;885:27:28:-;;;;;;:::o;566:49:26:-;;;;;;;;;;;;;;;:::o;4426:170:22:-;4549:17;;4527;;;4499:7;4527:17;;;:12;:17;;;;;;4499:7;;4527:62;;1126:6:28;;4527:40:22;;:17;:40;:21;:40;:::i;8579:223::-;210:3;;;;;;;196:10;:17;188:26;;;;;;8695:10;;;;8715:24;;;;;;;;;;;8754:41;;;8695:10;;;;8754:41;;;;;;;;;;;;;;;;;;;;;;;224:1;8579:223;:::o;3500:1216:25:-;3605:7;3650:12;3636:11;:26;3628:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3738:23;;;3716:19;3738:23;;;:14;:23;;;;;;;;3775:17;3771:56;;3815:1;3808:8;;;;;3771:56;3884:20;;;;;;;:11;:20;;;;;;;;:38;3905:16;;;3884:38;;;;;;;;;:48;;:63;-1:-1:-1;3880:145:25;;3970:20;;;;;;;:11;:20;;;;;;;;3991:16;;;;;3970:38;;;;;;;;4006:1;3970:44;;;-1:-1:-1;3963:51:25;;3880:145;4083:20;;;;;;;:11;:20;;;;;;;;:23;;;;;;;;:33;:23;:33;:47;-1:-1:-1;4079:86:25;;;4153:1;4146:8;;;;;4079:86;4175:12;4216:16;;;4242:418;4257:5;4249:13;;:5;:13;;;4242:418;;;4320:1;4303:13;;;4302:19;;;4294:27;;4362:20;;:::i;:::-;-1:-1:-1;4385:20:25;;;;;;;:11;:20;;;;;;;;:28;;;;;;;;;;;;;4362:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4431:27;;4427:223;;;4485:8;;;;-1:-1:-1;4478:15:25;;-1:-1:-1;;;;4478:15:25;4427:223;4518:12;;:26;;;-1:-1:-1;4514:136:25;;;4572:6;4564:14;;4514:136;;;4634:1;4625:6;:10;4617:18;;4514:136;4242:418;;;;;-1:-1:-1;4676:20:25;;;;;;;:11;:20;;;;;;;;:27;;;;;;;;;;:33;;;;-1:-1:-1;;3500:1216:25;;;;:::o;9478:960:22:-;293:7;;9628;;293;;279:10;:21;271:30;;;;;;9655:15;9651:130;;9703:17;;9689:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9759:11:22;;9752:18;;9651:130;9823:17;;9856:8;9851:425;;9899:53;1227:6:28;9899:43:22;9921:20;1227:6:28;9930:10:22;9921:20;:8;:20;:::i;:::-;9899:17;;;:43;:21;:43;:::i;:53::-;9879:17;:73;9851:425;;;9983:24;10010:53;1227:6:28;10010:43:22;10032:20;1227:6:28;10041:10:22;10032:20;:8;:20;:::i;10010:53::-;9983:80;;10100:19;:17;:19::i;:::-;10081:16;:38;10077:189;;;10139:17;:36;;;10077:189;;;10232:19;:17;:19::i;:::-;10212:17;:39;10077:189;9851:425;;10315:17;;10300:10;;:33;;;:14;:33;:::i;:::-;10286:11;:47;10385:17;;10348:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;10420:11:22;;311:1;9478:960;;;;;:::o;1093:39:26:-;;;;;;;;;;;;;:::o;421:20:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1498:25;;;;:::o;8199:241:22:-;210:3;;;;;;;196:10;:17;188:26;;;;;;8321:12;;;;8343:28;;;;;;;;;;;8386:47;;;8321:12;;;;8386:47;;;;;;;;;;;;;;;;;;;;;;;224:1;8199:241;:::o;7189:502::-;7349:10;7292:4;7331:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;7383:27;;;7379:201;;7444:10;7467:1;7426:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;:42;7379:201;;;7540:29;:8;7553:15;7540:29;:12;:29;:::i;:::-;7517:10;7499:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;:70;7379:201;7603:10;7624:29;;;;:17;:29;;;;;;;;7594:69;;;7624:38;;;;;;;;;;;7594:69;;;;;;;;;7603:10;7594:69;;;;;;;;;;;-1:-1:-1;7680:4:22;;7189:502;-1:-1:-1;;;7189:502:22:o;2588:825::-;2694:4;2673:2;530:18;;;522:27;;;;;;567:19;;;581:4;567:19;;559:28;;;;;;3034:17;;2983:16;;3002:50;;:27;:5;1126:6:28;3002:27:22;:9;:27;:::i;:50::-;3141:10;3128:24;;;;:12;:24;;;;;;2983:69;;-1:-1:-1;3128:38:22;;2983:69;3128:38;:28;:38;:::i;:::-;3114:10;3101:24;;;;:12;:24;;;;;;:65;;;;:24;3234:16;;;;;;:30;;3255:8;3234:30;:20;:30;:::i;:::-;3215:16;;;;;;;:12;:16;;;;;;;;;:49;;;;3279:31;;;;;;;3215:16;;3288:10;;3279:31;;;;;;;;;;3347:10;3336:22;;;;:10;:22;;;;;;;;3360:14;;;;;;;;;;3321:64;;3336:22;;;3360:14;3376:8;3321:14;:64::i;:::-;-1:-1:-1;3402:4:22;;2588:825;-1:-1:-1;;;;2588:825:22:o;2830:248:25:-;2964:23;;;2919:7;2964:23;;;:14;:23;;;;;;;;3004:16;:67;;3070:1;3004:67;;;3023:20;;;;;;;:11;:20;;;;;;;;:38;3044:16;;;3023:38;;;;;;;;3059:1;3023:44;;2997:74;2830:248;-1:-1:-1;;;2830:248:25:o;1319:32:28:-;;;;:::o;1504:1132:25:-;1687:23;727:80:26;;;;;;;;;;;;;;;;;;;1813:4:25;1797:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1837:12;:10;:12::i;:::-;1875:4;1736:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;1736:158:25;;;1713:191;;;;;;1687:217;;1915:18;944:71:26;;;;;;;;;;;;;;;;;;;1959:135:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1959:135:25;;;;;1936:168;;;;;;2155:119;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2155:119:25;;;;;;2132:152;;;;;;;;;-1:-1:-1;2315:26:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1936:168;;-1:-1:-1;2132:152:25;;-1:-1:-1;;;2315:26:25;;;;;;;1959:135;-1:-1:-1;2315:26:25;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2315:26:25;;;;;;-1:-1:-1;;2359:23:25;;;2351:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2451:17;;;;;;;:6;:17;;;;;:19;;;;;;;;2442:28;;2434:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2533:6;2526:3;:13;;2518:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2598:31;2608:9;2619;2598;:31::i;:::-;2591:38;;;;1504:1132;;;;;;;:::o;5207:170:22:-;5336:25;;;;5306:7;5336:25;;;:17;:25;;;;;;;;:34;;;;;;;;;;;;;5207:170::o;898:117:26:-;944:71;;;;;;;;;;;;;;;;;;898:117;:::o;1196:37:28:-;1227:6;1196:37;:::o;430:70:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7860:196:22:-;210:3;;;;;;;196:10;:17;188:26;;;;;;7967:7;;;;7984:18;;;;;;;;;;;8017:32;;;7967:7;;;;8017:32;;;;;;;;;;;;;;;;;;;;;;;224:1;7860:196;:::o;1103:329::-;1179:7;1415:10;;1409:2;1401:24;;;;;;1394:31;;1103:329;:::o;1322:134:18:-;1380:7;1406:43;1410:1;1413;1406:43;;;;;;;;;;;;;;;;;:3;:43::i;2181:459::-;2239:7;2480:6;2476:45;;-1:-1:-1;2509:1:18;2502:8;;2476:45;2543:5;;;2547:1;2543;:5;:1;2566:5;;;;;:10;2558:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3102:130;3160:7;3186:39;3190:1;3193;3186:39;;;;;;;;;;;;;;;;;:3;:39::i;875:176::-;933:7;964:5;;;987:6;;;;979:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5158:929:25;5263:6;5253:16;;:6;:16;;;;:30;;;;;5282:1;5273:6;:10;5253:30;5249:832;;;5303:20;;;;5299:379;;5409:22;;;5390:16;5409:22;;;:14;:22;;;;;;;;;5469:13;:60;;5528:1;5469:60;;;5485:19;;;;;;;:11;:19;;;;;;;;:34;5505:13;;;5485:34;;;;;;;;5517:1;5485:40;;5469:60;5449:80;-1:-1:-1;5547:17:25;5567:21;5449:80;5581:6;5567:21;:13;:21;:::i;:::-;5547:41;;5606:57;5623:6;5631:9;5642;5653;5606:16;:57::i;:::-;5299:379;;;;5696:20;;;;5692:379;;5802:22;;;5783:16;5802:22;;;:14;:22;;;;;;;;;5862:13;:60;;5921:1;5862:60;;;5878:19;;;;;;;:11;:19;;;;;;;;:34;5898:13;;;5878:34;;;;;;;;5910:1;5878:40;;5862:60;5842:80;-1:-1:-1;5940:17:25;5960:21;5842:80;5974:6;5960:21;:13;:21;:::i;:::-;5940:41;;5999:57;6016:6;6024:9;6035;6046;5999:16;:57::i;5692:379::-;5158:929;;;:::o;1750:590:22:-;1866:11;;:23;;1882:6;1866:23;:15;:23;:::i;:::-;1852:11;:37;1980:17;;1928:16;;1947:51;;:28;:6;1126::28;1947:28:22;:10;:28;:::i;:51::-;2049:10;;1928:70;;-1:-1:-1;2049:24:22;;1928:70;2049:24;:14;:24;:::i;:::-;2036:10;:37;2175:19;:17;:19::i;:::-;2154:17;;:40;;2146:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2274:16;;;;;;;:12;:16;;;;;;:30;;2295:8;2274:30;:20;:30;:::i;:::-;2255:16;;;;;;;:12;:16;;;;;;;;;:49;;;;2317:16;;;;;;;;;;;;;;;;;;;;;;;;1750:590;;;:::o;4722:430:25:-;4836:21;;;;4810:23;4836:21;;;:10;:21;;;;;;;;;;4894:12;:23;;;;;;4971:21;;;;:33;;;;;;;;;;;5020:54;;4836:21;;;;;4894:23;;4971:33;;4836:21;;;5020:54;;4810:23;5020:54;5085:60;5100:15;5117:9;5128:16;5085:14;:60::i;:::-;4722:430;;;;:::o;6948:149::-;7056:9;6948:149;:::o;1747:187:18:-;1833:7;1868:12;1860:6;;;;1852:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1852:29:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1903:5:18;;;1747:187::o;3714:272::-;3800:7;3834:12;3827:5;3819:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3819:28:18;;3857:9;3873:1;3869;:5;;;;;;;3714:272;-1:-1:-1;;;;;3714:272:18:o;6093:685:25:-;6264:18;6285:75;6292:12;6285:75;;;;;;;;;;;;;;;;;:6;:75::i;:::-;6264:96;;6390:1;6375:12;:16;;;:85;;;;-1:-1:-1;6395:22:25;;;;;;;:11;:22;;;;;;;;:65;6418:16;;;6395:40;;;;;;;;;:50;:65;;;:50;;:65;6375:85;6371:334;;;6476:22;;;;;;;:11;:22;;;;;;;;:40;6499:16;;;6476:40;;;;;;;;6514:1;6476:46;:57;;;6371:334;;;6603:33;;;;;;;;;;;;;;;;;;;;;6564:22;;;-1:-1:-1;6564:22:25;;;:11;:22;;;;;:36;;;;;;;;;;:72;;;;;;;;;;;;;;;;;;;;;6650:25;;;:14;:25;;;;;;:44;;6678:16;;;6650:44;;;;;;;;;;6371:334;6720:51;;;;;;;;;;;;;;;;;;;;;;;;;;6093:685;;;;;:::o;6784:158::-;6859:6;6896:12;6889:5;6885:9;;6877:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6877:32:25;-1:-1:-1;6933:1:25;;6784:158;-1:-1:-1;;6784:158:25:o;1417:1014:23:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1417:1014:23;;;-1:-1:-1;1417:1014:23;:::i;:::-;;;:::o;:::-;;;;;;;;;;-1:-1:-1;1417:1014:23;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;", - "source": "pragma solidity 0.5.17;\n\nimport \"./YAM.sol\";\n\ncontract YAMDelegationStorage {\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n}\n\ncontract YAMDelegatorInterface is YAMDelegationStorage {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the gov to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public;\n}\n\ncontract YAMDelegateInterface is YAMDelegationStorage {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n\n\ncontract YAMDelegate is YAM, YAMDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _resignImplementation\");\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event", - "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" - }, - "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event", - "signature": "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f" - }, - "0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event", - "signature": "0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724" - }, - "0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event", - "signature": "0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885" - }, - "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event", - "signature": "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523" - }, - "0x2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event", - "signature": "0x2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896" - }, - "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event", - "signature": "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e" - }, - "0x51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event", - "signature": "0x51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545" - }, - "0xc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c0": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event", - "signature": "0xc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c0" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event", - "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" - }, - "0x1f6441da26c13719b8cd4757028002a9e1720f3ad33eb0c56cf40f2371ff0493": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "Test", - "type": "event", - "signature": "0x1f6441da26c13719b8cd4757028002a9e1720f3ad33eb0c56cf40f2371ff0493" - }, - "0x01340388dff19495691e9b974bae2930522d66af97d354461f4f419285d76c5a": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "Test", - "type": "event", - "signature": "0x01340388dff19495691e9b974bae2930522d66af97d354461f4f419285d76c5a" - } - }, - "links": {}, - "address": "0xcDEbC91133F6Daa533ae72259e869f5b229c698a", - "transactionHash": "0x319ba89845c47be09a4dc77867d913de487eda94d3abcb6c1db05668cee8dc73" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.391Z", - "devdoc": { - "methods": { - "_becomeImplementation(bytes)": { - "params": { - "data": "The encoded bytes data for any initialization" - } - }, - "_setIncentivizer(address)": { - "params": { - "incentivizer_": "The address of the rebaser contract to use for authentication." - } - }, - "_setPendingGov(address)": { - "params": { - "pendingGov_": "The address of the rebaser contract to use for authentication." - } - }, - "_setRebaser(address)": { - "params": { - "rebaser_": "The address of the rebaser contract to use for authentication." - } - }, - "allowance(address,address)": { - "details": "Function to check the amount of tokens that an owner has allowed to a spender.", - "params": { - "owner_": "The address which owns the funds.", - "spender": "The address which will spend the funds." - }, - "return": "The number of tokens still available for the spender." - }, - "approve(address,uint256)": { - "details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. This method is included for ERC20 compatibility. increaseAllowance and decreaseAllowance should be used instead. Changing an allowance with this method brings the risk that someone may transfer both the old and the new allowance - if they are both greater than zero - if a transfer transaction is mined before the later approve() call is mined.", - "params": { - "spender": "The address which will spend the funds.", - "value": "The amount of tokens to be spent." - } - }, - "balanceOf(address)": { - "params": { - "who": "The address to query." - }, - "return": "The balance of the specified address." - }, - "balanceOfUnderlying(address)": { - "params": { - "who": "The address to query." - }, - "return": "The underlying balance of the specified address." - }, - "decreaseAllowance(address,uint256)": { - "details": "Decrease the amount of tokens that an owner has allowed to a spender.", - "params": { - "spender": "The address which will spend the funds.", - "subtractedValue": "The amount of tokens to decrease the allowance by." - } - }, - "delegate(address)": { - "params": { - "delegatee": "The address to delegate votes to" - } - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "params": { - "delegatee": "The address to delegate votes to", - "expiry": "The time at which to expire the signature", - "nonce": "The contract state required to match the signature", - "r": "Half of the ECDSA signature pair", - "s": "Half of the ECDSA signature pair", - "v": "The recovery byte of the signature" - } - }, - "delegates(address)": { - "params": { - "delegator": "The address to get delegatee for" - } - }, - "getCurrentVotes(address)": { - "params": { - "account": "The address to get votes balance" - }, - "return": "The number of current votes for `account`" - }, - "getPriorVotes(address,uint256)": { - "details": "Block number must be a finalized block or else this function will revert to prevent misinformation.", - "params": { - "account": "The address of the account to check", - "blockNumber": "The block number to get the vote balance at" - }, - "return": "The number of votes the account had as of the given block" - }, - "increaseAllowance(address,uint256)": { - "details": "Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.", - "params": { - "addedValue": "The amount of tokens to increase the allowance by.", - "spender": "The address which will spend the funds." - } - }, - "initialize(string,string,uint8,address,uint256)": { - "params": { - "decimals_": "ERC-20 decimal precision of this token", - "name_": "ERC-20 name of this token", - "symbol_": "ERC-20 symbol of this token" - } - }, - "mint(address,uint256)": { - "details": "Limited to onlyMinter modifier" - }, - "rebase(uint256,uint256,bool)": { - "details": "The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi" - }, - "transfer(address,uint256)": { - "details": "Transfer tokens to a specified address.", - "params": { - "to": "The address to transfer to.", - "value": "The amount to be transferred." - }, - "return": "True on success, false otherwise." - }, - "transferFrom(address,address,uint256)": { - "details": "Transfer tokens from one address to another.", - "params": { - "from": "The address you want to send tokens from.", - "to": "The address you want to transfer to.", - "value": "The amount of tokens to be transferred." - } - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "lets msg.sender accept governance " - }, - "_becomeImplementation(bytes)": { - "notice": "Called by the delegator on a delegate to initialize it for duty" - }, - "_resignImplementation()": { - "notice": "Called by the delegator on a delegate to forfeit its responsibility" - }, - "_setIncentivizer(address)": { - "notice": "sets the incentivizer" - }, - "_setPendingGov(address)": { - "notice": "sets the pendingGov" - }, - "_setRebaser(address)": { - "notice": "sets the rebaser" - }, - "balanceOfUnderlying(address)": { - "notice": "Currently returns the internal storage amount" - }, - "constructor": "Construct an empty delegate", - "delegate(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "notice": "Delegates votes from signatory to `delegatee`" - }, - "delegates(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "getCurrentVotes(address)": { - "notice": "Gets the current votes balance for `account`" - }, - "getPriorVotes(address,uint256)": { - "notice": "Determine the prior number of votes for an account as of a block number" - }, - "initialize(string,string,uint8,address,uint256)": { - "notice": "Initialize the new money market" - }, - "maxScalingFactor()": { - "notice": "Computes the current max scaling factor" - }, - "mint(address,uint256)": { - "notice": "Mints new tokens, increasing totalSupply, initSupply, and a users balance." - }, - "rebase(uint256,uint256,bool)": { - "notice": "Initiates a new rebase operation, provided the minimum time period has elapsed." - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMDelegateInterface.json b/build/contracts/YAMDelegateInterface.json deleted file mode 100644 index 4ec3d03..0000000 --- a/build/contracts/YAMDelegateInterface.json +++ /dev/null @@ -1,2342 +0,0 @@ -{ - "contractName": "YAMDelegateInterface", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_becomeImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_resignImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_becomeImplementation(bytes)\":{\"details\":\"Should revert if any issues arise which make it unfit for delegation\",\"params\":{\"data\":\"The encoded bytes data for any initialization\"}}}},\"userdoc\":{\"methods\":{\"_becomeImplementation(bytes)\":{\"notice\":\"Called by the delegator on a delegate to initialize it for duty\"},\"_resignImplementation()\":{\"notice\":\"Called by the delegator on a delegate to forfeit its responsibility\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":\"YAMDelegateInterface\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":{\"keccak256\":\"0x37805294539ffc72da1145dce61bffee4437b329f5aee47e4ff3c24b805fb734\",\"urls\":[\"bzz-raw://13ffb729ad13edf89c0c21f4e01d66a58de29fc0741ac1a98b5f24be66f31fbd\",\"dweb:/ipfs/QmUvabJwLsrEYstkwbCB5gF1MPH2HuJvYrf2TDDb44MazA\"]},\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":{\"keccak256\":\"0x9d14e5bfa7dcce0163bcc40052326853f35743539b6c3e68ee2dc1a23af928d9\",\"urls\":[\"bzz-raw://84df0a04bf8024506121bb66ac8a67684e78f459629d99f5c9da24cdad2f6cb6\",\"dweb:/ipfs/QmcKKLn9SMBJQ7Emq3AwzZho8rpD8XLWazXYSD5Y2NnK2E\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity 0.5.17;\n\nimport \"./YAM.sol\";\n\ncontract YAMDelegationStorage {\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n}\n\ncontract YAMDelegatorInterface is YAMDelegationStorage {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the gov to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public;\n}\n\ncontract YAMDelegateInterface is YAMDelegationStorage {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n\n\ncontract YAMDelegate is YAM, YAMDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _resignImplementation\");\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.450Z", - "devdoc": { - "methods": { - "_becomeImplementation(bytes)": { - "details": "Should revert if any issues arise which make it unfit for delegation", - "params": { - "data": "The encoded bytes data for any initialization" - } - } - } - }, - "userdoc": { - "methods": { - "_becomeImplementation(bytes)": { - "notice": "Called by the delegator on a delegate to initialize it for duty" - }, - "_resignImplementation()": { - "notice": "Called by the delegator on a delegate to forfeit its responsibility" - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMDelegationStorage.json b/build/contracts/YAMDelegationStorage.json deleted file mode 100644 index fe9286d..0000000 --- a/build/contracts/YAMDelegationStorage.json +++ /dev/null @@ -1,2304 +0,0 @@ -{ - "contractName": "YAMDelegationStorage", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":\"YAMDelegationStorage\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":{\"keccak256\":\"0x37805294539ffc72da1145dce61bffee4437b329f5aee47e4ff3c24b805fb734\",\"urls\":[\"bzz-raw://13ffb729ad13edf89c0c21f4e01d66a58de29fc0741ac1a98b5f24be66f31fbd\",\"dweb:/ipfs/QmUvabJwLsrEYstkwbCB5gF1MPH2HuJvYrf2TDDb44MazA\"]},\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":{\"keccak256\":\"0x9d14e5bfa7dcce0163bcc40052326853f35743539b6c3e68ee2dc1a23af928d9\",\"urls\":[\"bzz-raw://84df0a04bf8024506121bb66ac8a67684e78f459629d99f5c9da24cdad2f6cb6\",\"dweb:/ipfs/QmcKKLn9SMBJQ7Emq3AwzZho8rpD8XLWazXYSD5Y2NnK2E\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x6080604052348015600f57600080fd5b5060ad8061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80635c60da1b14602d575b600080fd5b6033605c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff168156fea265627a7a723158204fb9bc0950c95af08fd77057a9eea754f8a04140e63cd4359954d5f69541ebeb64736f6c63430005110032", - "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c80635c60da1b14602d575b600080fd5b6033605c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff168156fea265627a7a723158204fb9bc0950c95af08fd77057a9eea754f8a04140e63cd4359954d5f69541ebeb64736f6c63430005110032", - "sourceMap": "46:140:23:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;46:140:23;;;;;;;", - "deployedSourceMap": "46:140:23:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;46:140:23;;;;;;;;;;;;;;;;;;;154:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "pragma solidity 0.5.17;\n\nimport \"./YAM.sol\";\n\ncontract YAMDelegationStorage {\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n}\n\ncontract YAMDelegatorInterface is YAMDelegationStorage {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the gov to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public;\n}\n\ncontract YAMDelegateInterface is YAMDelegationStorage {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n\n\ncontract YAMDelegate is YAM, YAMDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _resignImplementation\");\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.451Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMDelegator.json b/build/contracts/YAMDelegator.json deleted file mode 100644 index f75e3c2..0000000 --- a/build/contracts/YAMDelegator.json +++ /dev/null @@ -1,12778 +0,0 @@ -{ - "contractName": "YAMDelegator", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "initSupply_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": true, - "inputs": [], - "name": "BASE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "incentivizer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address", - "name": "initial_owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initSupply_", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "internalDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "indexDelta", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "positive", - "type": "bool" - } - ], - "name": "rebase", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamsScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "incentivizer_", - "type": "address" - } - ], - "name": "_setIncentivizer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"initSupply_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"becomeImplementationData\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"NewImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldIncentivizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newIncentivizer\",\"type\":\"address\"}],\"name\":\"NewIncentivizer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevYamsScalingFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newYamsScalingFactor\",\"type\":\"uint256\"}],\"name\":\"Rebase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowResign\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"becomeImplementationData\",\"type\":\"bytes\"}],\"name\":\"_setImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"incentivizer_\",\"type\":\"address\"}],\"name\":\"_setIncentivizer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"delegateToImplementation\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"delegateToViewImplementation\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"incentivizer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"initial_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initSupply_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"internalDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexDelta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"positive\",\"type\":\"bool\"}],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamsScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_acceptGov()\":{\"details\":\"Gov function for pending gov to accept role and update gov\",\"return\":\"uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\"},\"_setImplementation(address,bool,bytes)\":{\"params\":{\"allowResign\":\"Flag to indicate whether to call _resignImplementation on the old implementation\",\"becomeImplementationData\":\"The encoded bytes data to be passed to _becomeImplementation\",\"implementation_\":\"The address of the new implementation for delegation\"}},\"_setPendingGov(address)\":{\"details\":\"Gov function to begin change of gov. The newPendingGov must call `_acceptGov` to finalize the transfer.\",\"params\":{\"newPendingGov\":\"New pending gov.\"}},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address of the account which owns the tokens to be spent\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"The number of tokens allowed to be spent (-1 means infinite)\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"amount\":\"The number of tokens that are approved (-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"Whether or not the approval succeeded\"},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The number of tokens owned by `owner`\"},\"balanceOfUnderlying(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The number of underlying tokens owned by `owner`\"},\"constructor\":{\"params\":{\"becomeImplementationData\":\"The encoded args for becomeImplementation\",\"decimals_\":\"ERC-20 decimal precision of this token\",\"implementation_\":\"The address of the implementation the contract delegates to\",\"initSupply_\":\"Initial token amount\",\"name_\":\"ERC-20 name of this token\",\"symbol_\":\"ERC-20 symbol of this token\"}},\"decreaseAllowance(address,uint256)\":{\"details\":\"Decrease the amount of tokens that an owner has allowed to a spender.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"subtractedValue\":\"The amount of tokens to decrease the allowance by.\"}},\"delegateToImplementation(bytes)\":{\"details\":\"It returns to the external caller whatever the implementation returns or forwards reverts\",\"params\":{\"data\":\"The raw data to delegatecall\"},\"return\":\"The returned bytes from the delegatecall\"},\"delegateToViewImplementation(bytes)\":{\"details\":\"It returns to the external caller whatever the implementation returns or forwards reverts There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\",\"params\":{\"data\":\"The raw data to delegatecall\"},\"return\":\"The returned bytes from the delegatecall\"},\"delegates(address)\":{\"params\":{\"delegator\":\"The address of the account which has designated a delegate\"},\"return\":\"Address of delegatee\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.\",\"params\":{\"addedValue\":\"The amount of tokens to increase the allowance by.\",\"spender\":\"The address which will spend the funds.\"}},\"initialize(string,string,uint8,address,uint256)\":{\"params\":{\"decimals_\":\"ERC-20 decimal precision of this token\",\"name_\":\"ERC-20 name of this token\",\"symbol_\":\"ERC-20 symbol of this token\"}},\"mint(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\"},\"rebase(uint256,uint256,bool)\":{\"details\":\"The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi\"},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\"},\"return\":\"Whether or not the transfer succeeded\"},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\",\"src\":\"The address of the source account\"},\"return\":\"Whether or not the transfer succeeded\"}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"Accepts transfer of gov rights. msg.sender must be pendingGov\"},\"_setImplementation(address,bool,bytes)\":{\"notice\":\"Called by the gov to update the implementation of the delegator\"},\"_setPendingGov(address)\":{\"notice\":\"Begins transfer of gov rights. The newPendingGov must call `_acceptGov` to finalize the transfer.\"},\"allowance(address,address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer up to `amount` from `src`\"},\"balanceOf(address)\":{\"notice\":\"Get the token balance of the `owner`\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Currently unused. For future compatability\"},\"constructor\":\"Construct a new YAM\",\"delegateToImplementation(bytes)\":{\"notice\":\"Delegates execution to the implementation contract\"},\"delegateToViewImplementation(bytes)\":{\"notice\":\"Delegates execution to an implementation contract\"},\"delegates(address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"initialize(string,string,uint8,address,uint256)\":{\"notice\":\"Initialize the new money market\"},\"maxScalingFactor()\":{\"notice\":\"Computes the current max scaling factor\"},\"mint(address,uint256)\":{\"notice\":\"Sender supplies assets into the market and receives cTokens in exchange\"},\"rebase(uint256,uint256,bool)\":{\"notice\":\"Initiates a new rebase operation, provided the minimum time period has elapsed.\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `msg.sender` to `dst`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `src` to `dst`\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMDelegator.sol\":\"YAMDelegator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":{\"keccak256\":\"0x37805294539ffc72da1145dce61bffee4437b329f5aee47e4ff3c24b805fb734\",\"urls\":[\"bzz-raw://13ffb729ad13edf89c0c21f4e01d66a58de29fc0741ac1a98b5f24be66f31fbd\",\"dweb:/ipfs/QmUvabJwLsrEYstkwbCB5gF1MPH2HuJvYrf2TDDb44MazA\"]},\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":{\"keccak256\":\"0x9d14e5bfa7dcce0163bcc40052326853f35743539b6c3e68ee2dc1a23af928d9\",\"urls\":[\"bzz-raw://84df0a04bf8024506121bb66ac8a67684e78f459629d99f5c9da24cdad2f6cb6\",\"dweb:/ipfs/QmcKKLn9SMBJQ7Emq3AwzZho8rpD8XLWazXYSD5Y2NnK2E\"]},\"/Users/brockelmore/YAM/contracts/token/YAMDelegator.sol\":{\"keccak256\":\"0x06c7cc58e6ca870a343ce552f0d472059711bab8df7da7276c982a9e715b3aaa\",\"urls\":[\"bzz-raw://64968643a6bde21fa569165e6145f267e40d77963e2e2db081144c3d0847e58c\",\"dweb:/ipfs/QmUJH6uNjEtMzL4WpdQvGvhuiqcAqGJJJwJMSHMhAUj1P3\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162002a1d38038062002a1d833981810160405260c08110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b50604081815260208301519083015160608401516080909401805192969195919284640100000000821115620001cd57600080fd5b908301906020820185811115620001e357600080fd5b8251640100000000811182820188101715620001fe57600080fd5b82525081516020918201929091019080838360005b838110156200022d57818101518382015260200162000213565b50505050905090810190601f1680156200025b5780820380516001836020036101000a031916815260200191505b5060405250505033600360016101000a8154816001600160a01b0302191690836001600160a01b03160217905550620003d48287878733886040516024018080602001806020018660ff1660ff168152602001856001600160a01b03166001600160a01b03168152602001848152602001838103835288818151815260200191508051906020019080838360005b8381101562000303578181015183820152602001620002e9565b50505050905090810190601f168015620003315780820380516001836020036101000a031916815260200191505b50838103825287518152875160209182019189019080838360005b83811015620003665781810151838201526020016200034c565b50505050905090810190601f168015620003945780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116636c94522160e01b17909152909850620003f8169650505050505050565b50620003ec826000836001600160e01b03620004bf16565b505050505050620006a0565b606060006060846001600160a01b0316846040518082805190602001908083835b602083106200043a5780518252601f19909201916020918201910162000419565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146200049c576040519150601f19603f3d011682016040523d82523d6000602084013e620004a1565b606091505b50915091506000821415620004b7573d60208201fd5b949350505050565b60035461010090046001600160a01b031633146200050f5760405162461bcd60e51b8152600401808060200182810382526034815260200180620029e96034913960400191505060405180910390fd5b811562000551576040805160048152602481019091526020810180516001600160e01b0390811663153ab50560e01b179091526200054f91906200067616565b505b601080546001600160a01b038581166001600160a01b0319831617909255604051602060248201818152855160448401528551949093169362000627938693909283926064909201919085019080838360005b83811015620005be578181015183820152602001620005a4565b50505050905090810190601f168015620005ec5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116630adccee560e31b179091529093506200067616915050565b50601054604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b6010546060906200069a906001600160a01b0316836001600160e01b03620003f816565b92915050565b61233980620006b06000396000f3fe6080604052600436106102dc5760003560e01c806364dd48f51161018457806398dca210116100d6578063c3cda5201161008a578063ec342ad011610064578063ec342ad014610dc9578063f1127ed814610dde578063fa8f345514610992576102dc565b8063c3cda52014610d0b578063dd62ed3e14610d6c578063e7a324dc14610db4576102dc565b8063a9059cbb116100bb578063a9059cbb1461047b578063b4b5ea5714610790578063b6fa857614610cf6576102dc565b806398dca21014610992578063a457c2d714610cb0576102dc565b806373f03dff116101385780637ecebe00116101125780637ecebe0014610c4657806395d89b4114610c8657806397d63f9314610c9b576102dc565b806373f03dff14610992578063782d6fe114610bc85780637af548c114610c0e576102dc565b80636fc6407c116101695780636fc6407c14610b5a5780636fcfff4514610b6f57806370a0823114610790576102dc565b806364dd48f5146109e75780636c945221146109fc576102dc565b8063252408101161023d5780634487152f116101f1578063587cde1e116101cb578063587cde1e1461096f5780635c19a95c146109925780635c60da1b146109d2576102dc565b80634487152f146107d05780634bda2e2014610883578063555bcc4014610898576102dc565b80633950935111610222578063395093511461074a5780633af9e6691461079057806340c10f191461047b576102dc565b8063252408101461070a578063313ce5671461071f576102dc565b806312d43a511161029457806318160ddd1161027957806318160ddd1461069057806320606b70146106a557806323b872dd146106ba576102dc565b806312d43a511461053a5780631624f6c61461054f576102dc565b8063095ea7b3116102c5578063095ea7b31461047b57806311d3e6c4146104d557806311fd8a83146104fc576102dc565b806306fdde031461033e5780630933c1ed146103c8575b3415610333576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806122336034913960400191505060405180910390fd5b61033b610e4a565b50005b34801561034a57600080fd5b50610353610edf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d457600080fd5b50610353600480360360208110156103eb57600080fd5b81019060208101813564010000000081111561040657600080fd5b82018360208201111561041857600080fd5b8035906020019184600183028401116401000000008311171561043a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f8a945050505050565b34801561048757600080fd5b506104c16004803603604081101561049e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fb6565b604080519115158252519081900360200190f35b3480156104e157600080fd5b506104ea610fc7565b60408051918252519081900360200190f35b34801561050857600080fd5b50610511610fd7565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561054657600080fd5b50610511610ff3565b34801561055b57600080fd5b5061068e6004803603606081101561057257600080fd5b81019060208101813564010000000081111561058d57600080fd5b82018360208201111561059f57600080fd5b803590602001918460018302840111640100000000831117156105c157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561061457600080fd5b82018360208201111561062657600080fd5b8035906020019184600183028401116401000000008311171561064857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506110149050565b005b34801561069c57600080fd5b506104ea6110e1565b3480156106b157600080fd5b506104ea6110e7565b3480156106c657600080fd5b506104c1600480360360608110156106dd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611102565b34801561071657600080fd5b50610511611114565b34801561072b57600080fd5b50610734611130565b6040805160ff9092168252519081900360200190f35b34801561075657600080fd5b506104c16004803603604081101561076d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611139565b34801561079c57600080fd5b506104ea600480360360208110156107b357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111ec565b3480156107dc57600080fd5b50610353600480360360208110156107f357600080fd5b81019060208101813564010000000081111561080e57600080fd5b82018360208201111561082057600080fd5b8035906020019184600183028401116401000000008311171561084257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111fc945050505050565b34801561088f57600080fd5b5061068e611494565b3480156108a457600080fd5b5061068e600480360360608110156108bb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101351515918101906060810160408201356401000000008111156108fa57600080fd5b82018360208201111561090c57600080fd5b8035906020019184600183028401116401000000008311171561092e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061149f945050505050565b34801561097b57600080fd5b50610511600480360360208110156107b357600080fd5b34801561099e57600080fd5b5061068e600480360360208110156109b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611715565b3480156109de57600080fd5b50610511611721565b3480156109f357600080fd5b506104ea61173d565b348015610a0857600080fd5b5061068e600480360360a0811015610a1f57600080fd5b810190602081018135640100000000811115610a3a57600080fd5b820183602082011115610a4c57600080fd5b80359060200191846001830284011164010000000083111715610a6e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610ac157600080fd5b820183602082011115610ad357600080fd5b80359060200191846001830284011164010000000083111715610af557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff16906040013561174b565b348015610b6657600080fd5b50610511611846565b348015610b7b57600080fd5b50610baf60048036036020811015610b9257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611862565b6040805163ffffffff9092168252519081900360200190f35b348015610bd457600080fd5b506104ea60048036036040811015610beb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561187a565b348015610c1a57600080fd5b506104ea60048036036060811015610c3157600080fd5b50803590602081013590604001351515611884565b348015610c5257600080fd5b506104ea60048036036020811015610c6957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166119f8565b348015610c9257600080fd5b50610353611a0a565b348015610ca757600080fd5b506104ea611a80565b348015610cbc57600080fd5b506104c160048036036040811015610cd357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611a86565b348015610d0257600080fd5b506104ea611ba9565b348015610d1757600080fd5b5061068e600480360360c0811015610d2e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611baf565b348015610d7857600080fd5b506104ea60048036036040811015610d8f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602001351661187a565b348015610dc057600080fd5b506104ea611bc0565b348015610dd557600080fd5b506104ea611bdb565b348015610dea57600080fd5b50610e2a60048036036040811015610e0157600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611be7565b6040805163ffffffff909316835260208301919091528051918290030190f35b60105460405160609160009173ffffffffffffffffffffffffffffffffffffffff90911690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610ebf576040519150601f19603f3d011682016040523d82523d6000602084013e610ec4565b606091505b505090506040513d6000823e818015610edb573d82f35b3d82fd5b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610f825780601f10610f5757610100808354040283529160200191610f82565b820191906000526020600020905b815481529060010190602001808311610f6557829003601f168201915b505050505081565b601054606090610fb09073ffffffffffffffffffffffffffffffffffffffff1683611c14565b92915050565b6000610fc0610e4a565b5092915050565b6000610fd1611d01565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6008541561108357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251611096906001906020860190612166565b5081516110aa906002906020850190612166565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b60405180604361226782396043019050604051809103902081565b600061110c610e4a565b509392505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205461117a908363ffffffff611d3416565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b60006111f6611da8565b50919050565b6060600060603073ffffffffffffffffffffffffffffffffffffffff16846040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561125a578181015183820152602001611242565b50505050905090810190601f1680156112875780820380516001836020036101000a031916815260200191505b50604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f0933c1ed00000000000000000000000000000000000000000000000000000000178152905182519295509350839250908083835b6020831061134c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161130f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113ac576040519150601f19603f3d011682016040523d82523d6000602084013e6113b1565b606091505b509150915060008214156113c6573d60208201fd5b8080602001905160208110156113db57600080fd5b81019080805160405193929190846401000000008211156113fb57600080fd5b90830190602082018581111561141057600080fd5b825164010000000081118282018810171561142a57600080fd5b82525081516020918201929091019080838360005b8381101561145757818101518382015260200161143f565b50505050905090810190601f1680156114845780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b61149c610e4a565b50565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314611514576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806121ff6034913960400191505060405180910390fd5b811561157c576040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f153ab5050000000000000000000000000000000000000000000000000000000017905261157a90610f8a565b505b6010805473ffffffffffffffffffffffffffffffffffffffff8581167fffffffffffffffffffffffff000000000000000000000000000000000000000083161790925560405160206024820181815285516044840152855194909316936116b9938693909283926064909201919085019080838360005b8381101561160b5781810151838201526020016115f3565b50505050905090810190601f1680156116385780820380516001836020036101000a031916815260200191505b50604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f56e67728000000000000000000000000000000000000000000000000000000001790529250610f8a915050565b506010546040805173ffffffffffffffffffffffffffffffffffffffff8085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b61171d610e4a565b5050565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b600081116117ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f3020696e697420737570706c7900000000000000000000000000000000000000604482015290519081900360640190fd5b6117c5858585611014565b6117ec670de0b6b3a764000069d3c21bcecceda10000005b8391900463ffffffff611f3f16565b600b556007819055670de0b6b3a764000060088190556118169069d3c21bcecceda10000006117dd565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526009602052604090209190915550505050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b6000610fc0611da8565b60055460009073ffffffffffffffffffffffffffffffffffffffff1633146118ab57600080fd5b826118fc57600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a1506007546119f1565b600854826119465761193e670de0b6b3a7640000611932611923828863ffffffff611fb216565b6008549063ffffffff611f3f16565b9063ffffffff611ff416565b600855611990565b6000611967670de0b6b3a7640000611932611923828963ffffffff611d3416565b9050611971611d01565b81101561198257600881905561198e565b61198a611d01565b6008555b505b600854600b546119a59163ffffffff611f3f16565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610f825780601f10610f5757610100808354040283529160200191610f82565b600b5481565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054808310611af457336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611b36565b611b04818463ffffffff611fb216565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60085481565b611bb7610e4a565b50505050505050565b60405180603a6122cb8239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6060600060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b60208310611c7f57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611c42565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611cdf576040519150601f19603f3d011682016040523d82523d6000602084013e611ce4565b606091505b50915091506000821415611cf9573d60208201fd5b949350505050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81611d2e57fe5b04905090565b6000828201838110156119f157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606060003073ffffffffffffffffffffffffffffffffffffffff166000366040516024018080602001828103825284848281815260200192508082843760008382015260408051601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090811690940182810390940182529283526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f0933c1ed0000000000000000000000000000000000000000000000000000000017815292518151919750955085945091925081905083835b60208310611ec057805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611e83565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611f20576040519150601f19603f3d011682016040523d82523d6000602084013e611f25565b606091505b505090506040513d6000823e818015610edb573d60408301f35b600082611f4e57506000610fb0565b82820282848281611f5b57fe5b04146119f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806122aa6021913960400191505060405180910390fd5b60006119f183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612036565b60006119f183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120e7565b600081848411156120df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120a457818101518382015260200161208c565b50505050905090810190601f1680156120d15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183612150576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156120a457818101518382015260200161208c565b50600083858161215c57fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106121a757805160ff19168380011785556121d4565b828001600101855582156121d4579182015b828111156121d45782518255916020019190600101906121b9565b506121e09291506121e4565b5090565b610fd491905b808211156121e057600081556001016121ea56fe59414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f7659414d44656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7744656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a723158207fe6a3658024447dc38626986a8b6160bb1ec9b5c03cf0fe127027aba863a27864736f6c6343000511003259414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f76", - "deployedBytecode": "0x6080604052600436106102dc5760003560e01c806364dd48f51161018457806398dca210116100d6578063c3cda5201161008a578063ec342ad011610064578063ec342ad014610dc9578063f1127ed814610dde578063fa8f345514610992576102dc565b8063c3cda52014610d0b578063dd62ed3e14610d6c578063e7a324dc14610db4576102dc565b8063a9059cbb116100bb578063a9059cbb1461047b578063b4b5ea5714610790578063b6fa857614610cf6576102dc565b806398dca21014610992578063a457c2d714610cb0576102dc565b806373f03dff116101385780637ecebe00116101125780637ecebe0014610c4657806395d89b4114610c8657806397d63f9314610c9b576102dc565b806373f03dff14610992578063782d6fe114610bc85780637af548c114610c0e576102dc565b80636fc6407c116101695780636fc6407c14610b5a5780636fcfff4514610b6f57806370a0823114610790576102dc565b806364dd48f5146109e75780636c945221146109fc576102dc565b8063252408101161023d5780634487152f116101f1578063587cde1e116101cb578063587cde1e1461096f5780635c19a95c146109925780635c60da1b146109d2576102dc565b80634487152f146107d05780634bda2e2014610883578063555bcc4014610898576102dc565b80633950935111610222578063395093511461074a5780633af9e6691461079057806340c10f191461047b576102dc565b8063252408101461070a578063313ce5671461071f576102dc565b806312d43a511161029457806318160ddd1161027957806318160ddd1461069057806320606b70146106a557806323b872dd146106ba576102dc565b806312d43a511461053a5780631624f6c61461054f576102dc565b8063095ea7b3116102c5578063095ea7b31461047b57806311d3e6c4146104d557806311fd8a83146104fc576102dc565b806306fdde031461033e5780630933c1ed146103c8575b3415610333576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806122336034913960400191505060405180910390fd5b61033b610e4a565b50005b34801561034a57600080fd5b50610353610edf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103d457600080fd5b50610353600480360360208110156103eb57600080fd5b81019060208101813564010000000081111561040657600080fd5b82018360208201111561041857600080fd5b8035906020019184600183028401116401000000008311171561043a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f8a945050505050565b34801561048757600080fd5b506104c16004803603604081101561049e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fb6565b604080519115158252519081900360200190f35b3480156104e157600080fd5b506104ea610fc7565b60408051918252519081900360200190f35b34801561050857600080fd5b50610511610fd7565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561054657600080fd5b50610511610ff3565b34801561055b57600080fd5b5061068e6004803603606081101561057257600080fd5b81019060208101813564010000000081111561058d57600080fd5b82018360208201111561059f57600080fd5b803590602001918460018302840111640100000000831117156105c157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561061457600080fd5b82018360208201111561062657600080fd5b8035906020019184600183028401116401000000008311171561064857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506110149050565b005b34801561069c57600080fd5b506104ea6110e1565b3480156106b157600080fd5b506104ea6110e7565b3480156106c657600080fd5b506104c1600480360360608110156106dd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611102565b34801561071657600080fd5b50610511611114565b34801561072b57600080fd5b50610734611130565b6040805160ff9092168252519081900360200190f35b34801561075657600080fd5b506104c16004803603604081101561076d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611139565b34801561079c57600080fd5b506104ea600480360360208110156107b357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111ec565b3480156107dc57600080fd5b50610353600480360360208110156107f357600080fd5b81019060208101813564010000000081111561080e57600080fd5b82018360208201111561082057600080fd5b8035906020019184600183028401116401000000008311171561084257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111fc945050505050565b34801561088f57600080fd5b5061068e611494565b3480156108a457600080fd5b5061068e600480360360608110156108bb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101351515918101906060810160408201356401000000008111156108fa57600080fd5b82018360208201111561090c57600080fd5b8035906020019184600183028401116401000000008311171561092e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061149f945050505050565b34801561097b57600080fd5b50610511600480360360208110156107b357600080fd5b34801561099e57600080fd5b5061068e600480360360208110156109b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611715565b3480156109de57600080fd5b50610511611721565b3480156109f357600080fd5b506104ea61173d565b348015610a0857600080fd5b5061068e600480360360a0811015610a1f57600080fd5b810190602081018135640100000000811115610a3a57600080fd5b820183602082011115610a4c57600080fd5b80359060200191846001830284011164010000000083111715610a6e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610ac157600080fd5b820183602082011115610ad357600080fd5b80359060200191846001830284011164010000000083111715610af557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff16906040013561174b565b348015610b6657600080fd5b50610511611846565b348015610b7b57600080fd5b50610baf60048036036020811015610b9257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611862565b6040805163ffffffff9092168252519081900360200190f35b348015610bd457600080fd5b506104ea60048036036040811015610beb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561187a565b348015610c1a57600080fd5b506104ea60048036036060811015610c3157600080fd5b50803590602081013590604001351515611884565b348015610c5257600080fd5b506104ea60048036036020811015610c6957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166119f8565b348015610c9257600080fd5b50610353611a0a565b348015610ca757600080fd5b506104ea611a80565b348015610cbc57600080fd5b506104c160048036036040811015610cd357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611a86565b348015610d0257600080fd5b506104ea611ba9565b348015610d1757600080fd5b5061068e600480360360c0811015610d2e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611baf565b348015610d7857600080fd5b506104ea60048036036040811015610d8f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602001351661187a565b348015610dc057600080fd5b506104ea611bc0565b348015610dd557600080fd5b506104ea611bdb565b348015610dea57600080fd5b50610e2a60048036036040811015610e0157600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611be7565b6040805163ffffffff909316835260208301919091528051918290030190f35b60105460405160609160009173ffffffffffffffffffffffffffffffffffffffff90911690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610ebf576040519150601f19603f3d011682016040523d82523d6000602084013e610ec4565b606091505b505090506040513d6000823e818015610edb573d82f35b3d82fd5b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610f825780601f10610f5757610100808354040283529160200191610f82565b820191906000526020600020905b815481529060010190602001808311610f6557829003601f168201915b505050505081565b601054606090610fb09073ffffffffffffffffffffffffffffffffffffffff1683611c14565b92915050565b6000610fc0610e4a565b5092915050565b6000610fd1611d01565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6008541561108357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251611096906001906020860190612166565b5081516110aa906002906020850190612166565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b60405180604361226782396043019050604051809103902081565b600061110c610e4a565b509392505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205461117a908363ffffffff611d3416565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b60006111f6611da8565b50919050565b6060600060603073ffffffffffffffffffffffffffffffffffffffff16846040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561125a578181015183820152602001611242565b50505050905090810190601f1680156112875780820380516001836020036101000a031916815260200191505b50604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f0933c1ed00000000000000000000000000000000000000000000000000000000178152905182519295509350839250908083835b6020831061134c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161130f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113ac576040519150601f19603f3d011682016040523d82523d6000602084013e6113b1565b606091505b509150915060008214156113c6573d60208201fd5b8080602001905160208110156113db57600080fd5b81019080805160405193929190846401000000008211156113fb57600080fd5b90830190602082018581111561141057600080fd5b825164010000000081118282018810171561142a57600080fd5b82525081516020918201929091019080838360005b8381101561145757818101518382015260200161143f565b50505050905090810190601f1680156114845780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b61149c610e4a565b50565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314611514576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806121ff6034913960400191505060405180910390fd5b811561157c576040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f153ab5050000000000000000000000000000000000000000000000000000000017905261157a90610f8a565b505b6010805473ffffffffffffffffffffffffffffffffffffffff8581167fffffffffffffffffffffffff000000000000000000000000000000000000000083161790925560405160206024820181815285516044840152855194909316936116b9938693909283926064909201919085019080838360005b8381101561160b5781810151838201526020016115f3565b50505050905090810190601f1680156116385780820380516001836020036101000a031916815260200191505b50604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f56e67728000000000000000000000000000000000000000000000000000000001790529250610f8a915050565b506010546040805173ffffffffffffffffffffffffffffffffffffffff8085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b61171d610e4a565b5050565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b69d3c21bcecceda100000081565b600081116117ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f3020696e697420737570706c7900000000000000000000000000000000000000604482015290519081900360640190fd5b6117c5858585611014565b6117ec670de0b6b3a764000069d3c21bcecceda10000005b8391900463ffffffff611f3f16565b600b556007819055670de0b6b3a764000060088190556118169069d3c21bcecceda10000006117dd565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526009602052604090209190915550505050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b6000610fc0611da8565b60055460009073ffffffffffffffffffffffffffffffffffffffff1633146118ab57600080fd5b826118fc57600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a1506007546119f1565b600854826119465761193e670de0b6b3a7640000611932611923828863ffffffff611fb216565b6008549063ffffffff611f3f16565b9063ffffffff611ff416565b600855611990565b6000611967670de0b6b3a7640000611932611923828963ffffffff611d3416565b9050611971611d01565b81101561198257600881905561198e565b61198a611d01565b6008555b505b600854600b546119a59163ffffffff611f3f16565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610f825780601f10610f5757610100808354040283529160200191610f82565b600b5481565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054808310611af457336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611b36565b611b04818463ffffffff611fb216565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60085481565b611bb7610e4a565b50505050505050565b60405180603a6122cb8239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6060600060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b60208310611c7f57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611c42565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611cdf576040519150601f19603f3d011682016040523d82523d6000602084013e611ce4565b606091505b50915091506000821415611cf9573d60208201fd5b949350505050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81611d2e57fe5b04905090565b6000828201838110156119f157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606060003073ffffffffffffffffffffffffffffffffffffffff166000366040516024018080602001828103825284848281815260200192508082843760008382015260408051601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090811690940182810390940182529283526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f0933c1ed0000000000000000000000000000000000000000000000000000000017815292518151919750955085945091925081905083835b60208310611ec057805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611e83565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611f20576040519150601f19603f3d011682016040523d82523d6000602084013e611f25565b606091505b505090506040513d6000823e818015610edb573d60408301f35b600082611f4e57506000610fb0565b82820282848281611f5b57fe5b04146119f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806122aa6021913960400191505060405180910390fd5b60006119f183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612036565b60006119f183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120e7565b600081848411156120df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120a457818101518382015260200161208c565b50505050905090810190601f1680156120d15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183612150576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156120a457818101518382015260200161208c565b50600083858161215c57fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106121a757805160ff19168380011785556121d4565b828001600101855582156121d4579182015b828111156121d45782518255916020019190600101906121b9565b506121e09291506121e4565b5090565b610fd491905b808211156121e057600081556001016121ea56fe59414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f7659414d44656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7744656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a723158207fe6a3658024447dc38626986a8b6160bb1ec9b5c03cf0fe127027aba863a27864736f6c63430005110032", - "sourceMap": "74:11179:24:-;;;560:882;8:9:-1;5:2;;;30:1;27;20:12;5:2;560:882:24;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;560:882:24;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;560:882:24;;420:4:-1;411:14;;;;560:882:24;;;;;411:14:-1;560:882:24;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;560:882:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;560:882:24;;420:4:-1;411:14;;;;560:882:24;;;;;411:14:-1;560:882:24;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;560:882:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;560:882:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19:11:-1;11:20;;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;560:882:24;;420:4:-1;411:14;;;;560:882:24;;;;;411:14:-1;560:882:24;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;560:882:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;873:10;867:3;;:16;;;;;-1:-1:-1;;;;;867:16:24;;;;;-1:-1:-1;;;;;867:16:24;;;;;;977:299;1001:15;1138:5;1161:7;1186:9;1213:10;1241:11;1030:236;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1030:236:24;-1:-1:-1;;;;;1030:236:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1030:236:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1030:236:24;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1030:236:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1030:236:24;;;-1:-1:-1;;26:21;;;22:32;6:49;;1030:236:24;;;49:4:-1;25:18;;61:17;;-1:-1;;;;;182:15;;;-1:-1;;;179:29;160:49;;;1030:236:24;;-1:-1:-1;977:10:24;:299;;-1:-1:-1;;;;;;;977:299:24:i;:::-;-1:-1:-1;1366:68:24;1385:15;1402:5;1409:24;-1:-1:-1;;;;;1366:18:24;:68;:::i;:::-;560:882;;;;;;74:11179;;8312:335;8385:12;8410;8424:23;8451:6;-1:-1:-1;;;;;8451:19:24;8471:4;8451:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;8451:25:24;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;8409:67:24;;;;8524:1;8515:7;8512:14;8509:2;;;8575:14;8568:4;8556:10;8552:21;8545:45;8509:2;8630:10;8312:335;-1:-1:-1;;;;8312:335:24:o;1833:625::-;1982:3;;;;;-1:-1:-1;;;;;1982:3:24;1968:10;:17;1960:82;;;;-1:-1:-1;;;1960:82:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2057:11;2053:118;;;2109:50;;;22:32:-1;6:49;;2109:50:24;;;;;;49:4:-1;25:18;;61:17;;-1:-1;;;;;182:15;;;-1:-1;;;179:29;160:49;;;2084:76:24;;2109:50;2084:24;:76;:::i;:::-;;2053:118;2209:14;;;-1:-1:-1;;;;;2233:32:24;;;-1:-1:-1;;;;;;2233:32:24;;;;;;2301:81;;;;;;;;;;;;;;;;;2209:14;;;;;2276:107;;2357:24;;2301:81;;;;;;;;;;;;;;;;2181:25;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2301:81:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2301:81:24;;;-1:-1:-1;;26:21;;;22:32;6:49;;2301:81:24;;;49:4:-1;25:18;;61:17;;-1:-1;;;;;182:15;;;-1:-1;;;179:29;160:49;;;2301:81:24;;-1:-1:-1;2276:24:24;:107;;-1:-1:-1;;2276:107:24:i;:::-;-1:-1:-1;2436:14:24;;2399:52;;;-1:-1:-1;;;;;2399:52:24;;;;;2436:14;;;2399:52;;;;;;;;;;;;;;;;1833:625;;;;:::o;8941:139::-;9052:14;;9010:12;;9041:32;;-1:-1:-1;;;;;9052:14:24;9068:4;-1:-1:-1;;;;;9041:10:24;:32;:::i;:::-;9034:39;8941:139;-1:-1:-1;;8941:139:24:o;74:11179::-;;;;;;;", - "deployedSourceMap": "74:11179:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11078:9;:14;11070:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11225:19;:17;:19::i;:::-;;74:11179;330:18:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;330:18:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;330:18:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8941:139:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8941:139:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8941:139:24;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;8941:139:24;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8941:139:24;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8941:139:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8941:139:24;;-1:-1:-1;8941:139:24;;-1:-1:-1;;;;;8941:139:24:i;4338:184::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4338:184:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4338:184:24;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;966:131:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;966:131:22;;;:::i;:::-;;;;;;;;;;;;;;;;793:22:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;793:22:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;602:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;602:18:28;;;:::i;611:279:22:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;611:279:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;611:279:22;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;;;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;-1:-1:-1;;;611:279:22;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;611:279:22:i;:::-;;971:26:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;971:26:28;;;:::i;685:122:26:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;685:122:26;;;:::i;3671:207:24:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3671:207:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3671:207:24;;;;;;;;;;;;;;;;;;:::i;695:25:28:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;695:25:28;;;:::i;516:21::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;516:21:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6598:337:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6598:337:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6598:337:22;;;;;;;;;:::i;5980:168:24:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5980:168:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5980:168:24;;;;:::i;9493:426::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9493:426:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9493:426:24;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;9493:426:24;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;9493:426:24;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;9493:426:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;9493:426:24;;-1:-1:-1;9493:426:24;;-1:-1:-1;;;;;9493:426:24:i;7141:79::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7141:79:24;;;:::i;1833:625::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1833:625:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1833:625:24;;;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1833:625:24;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1833:625:24;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1833:625:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1833:625:24;;-1:-1:-1;1833:625:24;;-1:-1:-1;;;;;1833:625:24:i;5259:180::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5259:180:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;7681:113:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7681:113:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7681:113:24;;;;:::i;154:29:23:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;154:29:23;;;:::i;1083:49:28:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1083:49:28;;;:::i;10695:632:22:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10695:632:22;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;10695:632:22;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;10695:632:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10695:632:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10695:632:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10695:632:22;;;;;;;;-1:-1:-1;10695:632:22;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;10695:632:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10695:632:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10695:632:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10695:632:22;;-1:-1:-1;;;10695:632:22;;;;;-1:-1:-1;;10695:632:22;;;;;;;;;;;:::i;885:27:28:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;885:27:28;;;:::i;566:49:26:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;566:49:26;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;566:49:26;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7227:190:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7227:190:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7227:190:24;;;;;;;;;:::i;9478:960:22:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9478:960:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9478:960:22;;;;;;;;;;;;;;:::i;1093:39:26:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1093:39:26;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1093:39:26;;;;:::i;421:20:28:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;421:20:28;;;:::i;1498:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1498:25:28;;;:::i;7189:502:22:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7189:502:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7189:502:22;;;;;;;;;:::i;1319:32:28:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1319:32:28;;;:::i;7423:252:24:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7423:252:24;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;7423:252:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;4844:206::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4844:206:24;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4844:206:24;;;;;;;;;;;:::i;898:117:26:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;898:117:26;;;:::i;1196:37:28:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1196:37:28;;;:::i;430:70:26:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;430:70:26;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;430:70:26;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;10426:416:24;10515:14;;:37;;10472:12;;10497;;10515:14;;;;;10497:12;;10543:8;;10515:37;10497:12;10543:8;;10497:12;10515:37;1:33:-1;10515:37:24;;45:16:-1;;;-1:-1;10515:37:24;;-1:-1:-1;10515:37:24;;-1:-1:-1;;10515:37:24;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;10496:56:24;;;10612:4;10606:11;10662:14;10659:1;10645:12;10630:47;10698:7;10718:47;;;;10809:14;10795:12;10788:36;10718:47;10748:14;10734:12;10727:36;330:18:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;8941:139:24:-;9052:14;;9010:12;;9041:32;;9052:14;;9068:4;9041:10;:32::i;:::-;9034:39;8941:139;-1:-1:-1;;8941:139:24:o;4338:184::-;4444:4;4496:19;:17;:19::i;:::-;;4338:184;;;;:::o;966:131:22:-;1041:7;1071:19;:17;:19::i;:::-;1064:26;;966:131;;:::o;793:22:28:-;;;;;;:::o;602:18::-;;;;;;;;;:::o;611:279:22:-;759:17;;:22;751:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;815:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;837:16:22;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;863:8:22;:20;;;;;;;;;;;;;;;-1:-1:-1;;611:279:22:o;971:26:28:-;;;;:::o;685:122:26:-;727:80;;;;;;;;;;;;;;;;;;685:122;:::o;3671:207:24:-;3799:4;3852:19;:17;:19::i;:::-;;3671:207;;;;;:::o;695:25:28:-;;;;;;:::o;516:21::-;;;;;;:::o;6598:337:22:-;6787:10;6696:4;6769:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;:54;;6812:10;6769:54;:42;:54;:::i;:::-;6734:10;6716:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;;;;:107;;;6838:69;;;;;;6716:38;;6838:69;;;;;;;;;;;-1:-1:-1;6924:4:22;6598:337;;;;:::o;5980:168:24:-;6071:7;6116:25;:23;:25::i;:::-;;5980:168;;;:::o;9493:426::-;9571:12;9596;9610:23;9645:4;9637:24;;9721:4;9662:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9662:64:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9662:64:24;;;22:32:-1;26:21;;;22:32;6:49;;9662:64:24;;;49:4:-1;25:18;;61:17;;9662:64:24;182:15:-1;9662:64:24;179:29:-1;160:49;;9637:90:24;;;;9662:64;;-1:-1:-1;9637:90:24;-1:-1:-1;9637:90:24;;-1:-1:-1;25:18;9637:90:24;;25:18:-1;36:153;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;9637:90:24;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;9595:132:24;;;;9775:1;9766:7;9763:14;9760:2;;;9826:14;9819:4;9807:10;9803:21;9796:45;9760:2;9892:10;9881:31;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9881:31:24;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;9881:31:24;;420:4:-1;411:14;;;;9881:31:24;;;;;411:14:-1;9881:31:24;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9881:31:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9874:38;;;;9493:426;;;:::o;7141:79::-;7194:19;:17;:19::i;:::-;;7141:79::o;1833:625::-;1982:3;;;;;;;1968:10;:17;1960:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2057:11;2053:118;;;2109:50;;;22:32:-1;6:49;;2109:50:24;;;;;;49:4:-1;25:18;;61:17;;2109:50:24;182:15:-1;2109:50:24;179:29:-1;160:49;;2084:76:24;;:24;:76::i;:::-;;2053:118;2209:14;;;;2233:32;;;;;;;;;;2301:81;;;;;;;;;;;;;;;;;2209:14;;;;;2276:107;;2357:24;;2301:81;;;;;;;;;;;;;;;;2181:25;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2301:81:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2301:81:24;;;22:32:-1;26:21;;;22:32;6:49;;2301:81:24;;;49:4:-1;25:18;;61:17;;2301:81:24;182:15:-1;2301:81:24;179:29:-1;160:49;;2301:81:24;-1:-1:-1;2276:24:24;;-1:-1:-1;;2276:107:24:i;:::-;-1:-1:-1;2436:14:24;;2399:52;;;2436:14;2399:52;;;;;2436:14;;;2399:52;;;;;;;;;;;;;;;;1833:625;;;;:::o;7681:113::-;7768:19;:17;:19::i;:::-;;7681:113;:::o;154:29:23:-;;;;;;:::o;1083:49:28:-;1126:6;1083:49;:::o;10695:632:22:-;10917:1;10903:11;:15;10895:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10947:43;10964:5;10971:7;10980:9;10947:16;:43::i;:::-;11014:31;1227:6:28;11030::22;:14;11014:11;;11030:14;;11014:31;:15;:31;:::i;:::-;11001:10;:44;11055:11;:25;;;1227:6:28;11090:17:22;:24;;;11154:32;;11170:6;:15;;11154:32;11124:27;;;;;;;;:12;:27;;;;;:62;;;;-1:-1:-1;;;;10695:632:22:o;885:27:28:-;;;;;;:::o;566:49:26:-;;;;;;;;;;;;;;;:::o;7227:190:24:-;7332:7;7385:25;:23;:25::i;9478:960:22:-;293:7;;9628;;293;;279:10;:21;271:30;;;;;;9655:15;9651:130;;9703:17;;9689:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9759:11:22;;9752:18;;9651:130;9823:17;;9856:8;9851:425;;9899:53;1227:6:28;9899:43:22;9921:20;1227:6:28;9930:10:22;9921:20;:8;:20;:::i;:::-;9899:17;;;:43;:21;:43;:::i;:::-;:47;:53;:47;:53;:::i;:::-;9879:17;:73;9851:425;;;9983:24;10010:53;1227:6:28;10010:43:22;10032:20;1227:6:28;10041:10:22;10032:20;:8;:20;:::i;10010:53::-;9983:80;;10100:19;:17;:19::i;:::-;10081:16;:38;10077:189;;;10139:17;:36;;;10077:189;;;10232:19;:17;:19::i;:::-;10212:17;:39;10077:189;9851:425;;10315:17;;10300:10;;:33;;;:14;:33;:::i;:::-;10286:11;:47;10385:17;;10348:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;10420:11:22;;311:1;9478:960;;;;;:::o;1093:39:26:-;;;;;;;;;;;;;:::o;421:20:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1498:25;;;;:::o;7189:502:22:-;7349:10;7292:4;7331:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;7383:27;;;7379:201;;7444:10;7467:1;7426:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;:42;7379:201;;;7540:29;:8;7553:15;7540:29;:12;:29;:::i;:::-;7517:10;7499:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;:70;7379:201;7603:10;7624:29;;;;:17;:29;;;;;;;;7594:69;;;7624:38;;;;;;;;;;;7594:69;;;;;;;;;7603:10;7594:69;;;;;;;;;;;-1:-1:-1;7680:4:22;;7189:502;-1:-1:-1;;;7189:502:22:o;1319:32:28:-;;;;:::o;7423:252:24:-;7649:19;:17;:19::i;:::-;;7423:252;;;;;;:::o;898:117:26:-;944:71;;;;;;;;;;;;;;;;;;898:117;:::o;1196:37:28:-;1227:6;1196:37;:::o;430:70:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;8312:335:24:-;8385:12;8410;8424:23;8451:6;:19;;8471:4;8451:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;8451:25:24;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;8409:67:24;;;;8524:1;8515:7;8512:14;8509:2;;;8575:14;8568:4;8556:10;8552:21;8545:45;8509:2;8630:10;8312:335;-1:-1:-1;;;;8312:335:24:o;1103:329:22:-;1179:7;1415:10;;1409:2;1401:24;;;;;;1394:31;;1103:329;:::o;875:176:18:-;933:7;964:5;;;987:6;;;;979:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9925:495:24;9982:12;10007;10033:4;10025:24;;10109:8;;10050:68;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;10050:68:24;;;137:4:-1;117:14;;;133:9;113:30;;;157:16;;;26:21;;;22:32;;;6:49;;10050:68:24;;;49:4:-1;25:18;;61:17;;10050:68:24;182:15:-1;10050:68:24;179:29:-1;160:49;;10025:94:24;;;;10050:68;;-1:-1:-1;10025:94:24;-1:-1:-1;10025:94:24;;-1:-1:-1;25:18;;-1:-1;10025:94:24;;-1:-1:-1;10025:94:24;25:18:-1;36:153;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;10025:94:24;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;10006:113:24;;;10179:4;10173:11;10229:14;10226:1;10212:12;10197:47;10265:7;10285:47;;;;10387:14;10380:4;10366:12;10362:23;10355:47;2181:459:18;2239:7;2480:6;2476:45;;-1:-1:-1;2509:1:18;2502:8;;2476:45;2543:5;;;2547:1;2543;:5;:1;2566:5;;;;;:10;2558:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1322:134;1380:7;1406:43;1410:1;1413;1406:43;;;;;;;;;;;;;;;;;:3;:43::i;3102:130::-;3160:7;3186:39;3190:1;3193;3186:39;;;;;;;;;;;;;;;;;:3;:39::i;1747:187::-;1833:7;1868:12;1860:6;;;;1852:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1852:29:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1903:5:18;;;1747:187::o;3714:272::-;3800:7;3834:12;3827:5;3819:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3819:28:18;;3857:9;3873:1;3869;:5;;;;;;;3714:272;-1:-1:-1;;;;;3714:272:18:o;74:11179:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;74:11179:24;;;-1:-1:-1;74:11179:24;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;", - "source": "pragma solidity 0.5.17;\n\nimport \"./YAM.sol\";\nimport \"./YAMDelegate.sol\";\n\ncontract YAMDelegator is YAM, YAMDelegatorInterface {\n /**\n * @notice Construct a new YAM\n * @param name_ ERC-20 name of this token\n * @param symbol_ ERC-20 symbol of this token\n * @param decimals_ ERC-20 decimal precision of this token\n * @param initSupply_ Initial token amount\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 initSupply_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n {\n\n\n // Creator of the contract is gov during initialization\n gov = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(string,string,uint8,address,uint256)\",\n name_,\n symbol_,\n decimals_,\n msg.sender,\n initSupply_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n }\n\n /**\n * @notice Called by the gov to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public {\n require(msg.sender == gov, \"YAMDelegator::_setImplementation: Caller must be gov\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives cTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(address to, uint256 mintAmount)\n external\n returns (bool)\n {\n to; mintAmount; // Shh\n delegateAndReturn();\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount)\n external\n returns (bool)\n {\n dst; amount; // Shh\n delegateAndReturn();\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n )\n external\n returns (bool)\n {\n src; dst; amount; // Shh\n delegateAndReturn();\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(\n address spender,\n uint256 amount\n )\n external\n returns (bool)\n {\n spender; amount; // Shh\n delegateAndReturn();\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(\n address owner,\n address spender\n )\n external\n view\n returns (uint256)\n {\n owner; spender; // Shh\n delegateToViewAndReturn();\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param delegator The address of the account which has designated a delegate\n * @return Address of delegatee\n */\n function delegates(\n address delegator\n )\n external\n view\n returns (address)\n {\n delegator; // Shh\n delegateToViewAndReturn();\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner)\n external\n view\n returns (uint256)\n {\n owner; // Shh\n delegateToViewAndReturn();\n }\n\n /**\n * @notice Currently unused. For future compatability\n * @param owner The address of the account to query\n * @return The number of underlying tokens owned by `owner`\n */\n function balanceOfUnderlying(address owner)\n external\n view\n returns (uint256)\n {\n owner; // Shh\n delegateToViewAndReturn();\n }\n\n /*** Gov Functions ***/\n\n /**\n * @notice Begins transfer of gov rights. The newPendingGov must call `_acceptGov` to finalize the transfer.\n * @dev Gov function to begin change of gov. The newPendingGov must call `_acceptGov` to finalize the transfer.\n * @param newPendingGov New pending gov.\n */\n function _setPendingGov(address newPendingGov)\n external\n {\n newPendingGov; // Shh\n delegateAndReturn();\n }\n\n function _setRebaser(address rebaser_)\n external\n {\n rebaser_; // Shh\n delegateAndReturn();\n }\n\n function _setIncentivizer(address incentivizer_)\n external\n {\n incentivizer_; // Shh\n delegateAndReturn();\n }\n\n /**\n * @notice Accepts transfer of gov rights. msg.sender must be pendingGov\n * @dev Gov function for pending gov to accept role and update gov\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptGov()\n external\n {\n delegateAndReturn();\n }\n\n\n function getPriorVotes(address account, uint blockNumber)\n external\n view\n returns (uint256)\n {\n account; blockNumber;\n delegateToViewAndReturn();\n }\n\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n external\n {\n delegatee; nonce; expiry; v; r; s;\n delegateAndReturn();\n }\n\n function delegate(address delegatee)\n external\n {\n delegatee;\n delegateAndReturn();\n }\n\n function getCurrentVotes(address account)\n external\n view\n returns (uint256)\n {\n account;\n delegateToViewAndReturn();\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data));\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n function delegateToViewAndReturn() private view returns (bytes memory) {\n (bool success, ) = address(this).staticcall(abi.encodeWithSignature(\"delegateToImplementation(bytes)\", msg.data));\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 { revert(free_mem_ptr, returndatasize) }\n default { return(add(free_mem_ptr, 0x40), returndatasize) }\n }\n }\n\n function delegateAndReturn() private returns (bytes memory) {\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 { revert(free_mem_ptr, returndatasize) }\n default { return(free_mem_ptr, returndatasize) }\n }\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function () external payable {\n require(msg.value == 0,\"YAMDelegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n delegateAndReturn();\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegator.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegator.sol", - "exportedSymbols": { - "YAMDelegator": [ - 18374 - ] - }, - "id": 18375, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17920, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:24" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17921, - "nodeType": "ImportDirective", - "scope": 18375, - "sourceUnit": 17829, - "src": "25:19:24", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "file": "./YAMDelegate.sol", - "id": 17922, - "nodeType": "ImportDirective", - "scope": 18375, - "sourceUnit": 17919, - "src": "45:27:24", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17923, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "99:3:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17924, - "nodeType": "InheritanceSpecifier", - "src": "99:3:24" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17925, - "name": "YAMDelegatorInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17852, - "src": "104:21:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegatorInterface_$17852", - "typeString": "contract YAMDelegatorInterface" - } - }, - "id": 17926, - "nodeType": "InheritanceSpecifier", - "src": "104:21:24" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17852, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 18374, - "linearizedBaseContracts": [ - 18374, - 17852, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegator", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17966, - "nodeType": "Block", - "src": "791:651:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17941, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "867:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17942, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "873:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "873:10:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "867:16:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17945, - "nodeType": "ExpressionStatement", - "src": "867:16:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17947, - "name": "implementation_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17936, - "src": "1001:15:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "696e697469616c697a6528737472696e672c737472696e672c75696e74382c616464726573732c75696e7432353629", - "id": 17950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1071:49:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6c945221a4589c6bed13f50971ab7b3349fd0049875f0584bd6068660396d30a", - "typeString": "literal_string \"initialize(string,string,uint8,address,uint256)\"" - }, - "value": "initialize(string,string,uint8,address,uint256)" - }, - { - "argumentTypes": null, - "id": 17951, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17928, - "src": "1138:5:24", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17952, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17930, - "src": "1161:7:24", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17953, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17932, - "src": "1186:9:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17954, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1213:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1213:10:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17956, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17934, - "src": "1241:11:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6c945221a4589c6bed13f50971ab7b3349fd0049875f0584bd6068660396d30a", - "typeString": "literal_string \"initialize(string,string,uint8,address,uint256)\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17948, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1030:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 17949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1030:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 17957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1030:236:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 17946, - "name": "delegateTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18278, - "src": "977:10:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory) returns (bytes memory)" - } - }, - "id": 17958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "977:299:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17959, - "nodeType": "ExpressionStatement", - "src": "977:299:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17961, - "name": "implementation_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17936, - "src": "1385:15:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1402:5:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "id": 17963, - "name": "becomeImplementationData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17938, - "src": "1409:24:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 17960, - "name": "_setImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 18016 - ], - "referencedDeclaration": 18016, - "src": "1366:18:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bool,bytes memory)" - } - }, - "id": 17964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1366:68:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17965, - "nodeType": "ExpressionStatement", - "src": "1366:68:24" - } - ] - }, - "documentation": "@notice Construct a new YAM\n@param name_ ERC-20 name of this token\n@param symbol_ ERC-20 symbol of this token\n@param decimals_ ERC-20 decimal precision of this token\n@param initSupply_ Initial token amount\n@param implementation_ The address of the implementation the contract delegates to\n@param becomeImplementationData The encoded args for becomeImplementation", - "id": 17967, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17939, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17928, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "581:19:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17927, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "581:6:24", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17930, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "610:21:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17929, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "610:6:24", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17932, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "641:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17931, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "641:5:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17934, - "name": "initSupply_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "666:19:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "666:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17936, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "695:23:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17935, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "695:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17938, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "728:37:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17937, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "728:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "571:200:24" - }, - "returnParameters": { - "id": 17940, - "nodeType": "ParameterList", - "parameters": [], - "src": "791:0:24" - }, - "scope": 18374, - "src": "560:882:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 18015, - "nodeType": "Block", - "src": "1950:508:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17977, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1968:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1968:10:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17979, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1982:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1968:17:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f76", - "id": 17981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1987:54:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1877b136b34d46099ed3ab6d725748b3f2435d20ae75575ffd8fc98f74b88f78", - "typeString": "literal_string \"YAMDelegator::_setImplementation: Caller must be gov\"" - }, - "value": "YAMDelegator::_setImplementation: Caller must be gov" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1877b136b34d46099ed3ab6d725748b3f2435d20ae75575ffd8fc98f74b88f78", - "typeString": "literal_string \"YAMDelegator::_setImplementation: Caller must be gov\"" - } - ], - "id": 17976, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1960:7:24", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1960:82:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17983, - "nodeType": "ExpressionStatement", - "src": "1960:82:24" - }, - { - "condition": { - "argumentTypes": null, - "id": 17984, - "name": "allowResign", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17971, - "src": "2057:11:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17993, - "nodeType": "IfStatement", - "src": "2053:118:24", - "trueBody": { - "id": 17992, - "nodeType": "Block", - "src": "2070:101:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5f72657369676e496d706c656d656e746174696f6e2829", - "id": 17988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2133:25:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_153ab505308d51e1f8b9381691e5d77f8d2be0d3c72821cfc28246932d55aed9", - "typeString": "literal_string \"_resignImplementation()\"" - }, - "value": "_resignImplementation()" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_153ab505308d51e1f8b9381691e5d77f8d2be0d3c72821cfc28246932d55aed9", - "typeString": "literal_string \"_resignImplementation()\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 17986, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2109:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 17987, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2109:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 17989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2109:50:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 17985, - "name": "delegateToImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18291, - "src": "2084:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bytes memory)" - } - }, - "id": 17990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2084:76:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17991, - "nodeType": "ExpressionStatement", - "src": "2084:76:24" - } - ] - } - }, - { - "assignments": [ - 17995 - ], - "declarations": [ - { - "constant": false, - "id": 17995, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 18015, - "src": "2181:25:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17994, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2181:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17997, - "initialValue": { - "argumentTypes": null, - "id": 17996, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2209:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2181:42:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17998, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2233:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17999, - "name": "implementation_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17969, - "src": "2250:15:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2233:32:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18001, - "nodeType": "ExpressionStatement", - "src": "2233:32:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5f6265636f6d65496d706c656d656e746174696f6e28627974657329", - "id": 18005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2325:30:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_56e677285a1553abe1ddb56f43a4f037fd5ff42f7db26a312647701fa38bb76a", - "typeString": "literal_string \"_becomeImplementation(bytes)\"" - }, - "value": "_becomeImplementation(bytes)" - }, - { - "argumentTypes": null, - "id": 18006, - "name": "becomeImplementationData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17973, - "src": "2357:24:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_56e677285a1553abe1ddb56f43a4f037fd5ff42f7db26a312647701fa38bb76a", - "typeString": "literal_string \"_becomeImplementation(bytes)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 18003, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2301:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2301:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 18007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2301:81:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18002, - "name": "delegateToImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18291, - "src": "2276:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bytes memory)" - } - }, - "id": 18008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2276:107:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18009, - "nodeType": "ExpressionStatement", - "src": "2276:107:24" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18011, - "name": "oldImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17995, - "src": "2417:17:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18012, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2436:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18010, - "name": "NewImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17842, - "src": "2399:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 18013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2399:52:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18014, - "nodeType": "EmitStatement", - "src": "2394:57:24" - } - ] - }, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 18016, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17969, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 18016, - "src": "1861:23:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17968, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1861:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17971, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 18016, - "src": "1886:16:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17970, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1886:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17973, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 18016, - "src": "1904:37:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17972, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1904:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:82:24" - }, - "returnParameters": { - "id": 17975, - "nodeType": "ParameterList", - "parameters": [], - "src": "1950:0:24" - }, - "scope": 18374, - "src": "1833:625:24", - "stateMutability": "nonpayable", - "superFunction": 17851, - "visibility": "public" - }, - { - "body": { - "id": 18032, - "nodeType": "Block", - "src": "2898:67:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18025, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18018, - "src": "2908:2:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18026, - "nodeType": "ExpressionStatement", - "src": "2908:2:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18027, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18020, - "src": "2912:10:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18028, - "nodeType": "ExpressionStatement", - "src": "2912:10:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18029, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "2939:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2939:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18031, - "nodeType": "ExpressionStatement", - "src": "2939:19:24" - } - ] - }, - "documentation": "@notice Sender supplies assets into the market and receives cTokens in exchange\n@dev Accrues interest whether or not the operation succeeds, unless reverted\n@param mintAmount The amount of the underlying asset to supply\n@return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)", - "id": 18033, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18021, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18018, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 18033, - "src": "2822:10:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18017, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2822:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18020, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 18033, - "src": "2834:18:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18019, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2834:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2821:32:24" - }, - "returnParameters": { - "id": 18024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18023, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18033, - "src": "2888:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18022, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2888:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2887:6:24" - }, - "scope": 18374, - "src": "2808:157:24", - "stateMutability": "nonpayable", - "superFunction": 17194, - "visibility": "external" - }, - { - "body": { - "id": 18049, - "nodeType": "Block", - "src": "3309:64:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18042, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18035, - "src": "3319:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18043, - "nodeType": "ExpressionStatement", - "src": "3319:3:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18044, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18037, - "src": "3324:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18045, - "nodeType": "ExpressionStatement", - "src": "3324:6:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18046, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "3347:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3347:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18048, - "nodeType": "ExpressionStatement", - "src": "3347:19:24" - } - ] - }, - "documentation": "@notice Transfer `amount` tokens from `msg.sender` to `dst`\n@param dst The address of the destination account\n@param amount The number of tokens to transfer\n@return Whether or not the transfer succeeded", - "id": 18050, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18038, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18035, - "name": "dst", - "nodeType": "VariableDeclaration", - "scope": 18050, - "src": "3236:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18034, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3236:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18037, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18050, - "src": "3249:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18036, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3249:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3235:29:24" - }, - "returnParameters": { - "id": 18041, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18040, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18050, - "src": "3299:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18039, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3299:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3298:6:24" - }, - "scope": 18374, - "src": "3218:155:24", - "stateMutability": "nonpayable", - "superFunction": 17317, - "visibility": "external" - }, - { - "body": { - "id": 18070, - "nodeType": "Block", - "src": "3809:69:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18061, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18052, - "src": "3819:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18062, - "nodeType": "ExpressionStatement", - "src": "3819:3:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18063, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18054, - "src": "3824:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18064, - "nodeType": "ExpressionStatement", - "src": "3824:3:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18065, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18056, - "src": "3829:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18066, - "nodeType": "ExpressionStatement", - "src": "3829:6:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18067, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "3852:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3852:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18069, - "nodeType": "ExpressionStatement", - "src": "3852:19:24" - } - ] - }, - "documentation": "@notice Transfer `amount` tokens from `src` to `dst`\n@param src The address of the source account\n@param dst The address of the destination account\n@param amount The number of tokens to transfer\n@return Whether or not the transfer succeeded", - "id": 18071, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18052, - "name": "src", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3702:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18051, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3702:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18054, - "name": "dst", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3723:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18053, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3723:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18056, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3744:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18055, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3744:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3692:72:24" - }, - "returnParameters": { - "id": 18060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18059, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3799:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18058, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3799:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3798:6:24" - }, - "scope": 18374, - "src": "3671:207:24", - "stateMutability": "nonpayable", - "superFunction": 17399, - "visibility": "external" - }, - { - "body": { - "id": 18087, - "nodeType": "Block", - "src": "4454:68:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18080, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18073, - "src": "4464:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18081, - "nodeType": "ExpressionStatement", - "src": "4464:7:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18082, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18075, - "src": "4473:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18083, - "nodeType": "ExpressionStatement", - "src": "4473:6:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18084, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "4496:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4496:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18086, - "nodeType": "ExpressionStatement", - "src": "4496:19:24" - } - ] - }, - "documentation": "@notice Approve `spender` to transfer up to `amount` from `src`\n@dev This will overwrite the approval amount for `spender`\n and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n@param spender The address of the account which may transfer tokens\n@param amount The number of tokens that are approved (-1 means infinite)\n@return Whether or not the approval succeeded", - "id": 18088, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18073, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 18088, - "src": "4364:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18072, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4364:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18075, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18088, - "src": "4389:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18074, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4389:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4354:55:24" - }, - "returnParameters": { - "id": 18079, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18078, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18088, - "src": "4444:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18077, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4444:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4443:6:24" - }, - "scope": 18374, - "src": "4338:184:24", - "stateMutability": "nonpayable", - "superFunction": 17473, - "visibility": "external" - }, - { - "body": { - "id": 18104, - "nodeType": "Block", - "src": "4977:73:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18097, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18090, - "src": "4987:5:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18098, - "nodeType": "ExpressionStatement", - "src": "4987:5:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18099, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18092, - "src": "4994:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18100, - "nodeType": "ExpressionStatement", - "src": "4994:7:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18101, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "5018:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5018:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18103, - "nodeType": "ExpressionStatement", - "src": "5018:25:24" - } - ] - }, - "documentation": "@notice Get the current allowance from `owner` for `spender`\n@param owner The address of the account which owns the tokens to be spent\n@param spender The address of the account which may transfer tokens\n@return The number of tokens allowed to be spent (-1 means infinite)", - "id": 18105, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18090, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 18105, - "src": "4872:13:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4872:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18092, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 18105, - "src": "4895:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18091, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4895:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4862:54:24" - }, - "returnParameters": { - "id": 18096, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18095, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18105, - "src": "4964:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18094, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4964:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4963:9:24" - }, - "scope": 18374, - "src": "4844:206:24", - "stateMutability": "view", - "superFunction": 17445, - "visibility": "external" - }, - { - "body": { - "id": 18117, - "nodeType": "Block", - "src": "5371:68:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18112, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18107, - "src": "5381:9:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18113, - "nodeType": "ExpressionStatement", - "src": "5381:9:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18114, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "5407:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5407:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18116, - "nodeType": "ExpressionStatement", - "src": "5407:25:24" - } - ] - }, - "documentation": "@notice Get the current allowance from `owner` for `spender`\n@param delegator The address of the account which has designated a delegate\n@return Address of delegatee", - "id": 18118, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18108, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18107, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18118, - "src": "5287:17:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18106, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5287:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5277:33:24" - }, - "returnParameters": { - "id": 18111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18110, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18118, - "src": "5358:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5358:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5357:9:24" - }, - "scope": 18374, - "src": "5259:180:24", - "stateMutability": "view", - "superFunction": 18409, - "visibility": "external" - }, - { - "body": { - "id": 18130, - "nodeType": "Block", - "src": "5716:64:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18125, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18120, - "src": "5726:5:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18126, - "nodeType": "ExpressionStatement", - "src": "5726:5:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18127, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "5748:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5748:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18129, - "nodeType": "ExpressionStatement", - "src": "5748:25:24" - } - ] - }, - "documentation": "@notice Get the token balance of the `owner`\n@param owner The address of the account to query\n@return The number of tokens owned by `owner`", - "id": 18131, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18121, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18120, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 18131, - "src": "5641:13:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18119, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5641:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5640:15:24" - }, - "returnParameters": { - "id": 18124, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18123, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18131, - "src": "5703:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18122, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5703:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5702:9:24" - }, - "scope": 18374, - "src": "5622:158:24", - "stateMutability": "view", - "superFunction": 17417, - "visibility": "external" - }, - { - "body": { - "id": 18143, - "nodeType": "Block", - "src": "6084:64:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18138, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18133, - "src": "6094:5:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18139, - "nodeType": "ExpressionStatement", - "src": "6094:5:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18140, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "6116:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6116:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18142, - "nodeType": "ExpressionStatement", - "src": "6116:25:24" - } - ] - }, - "documentation": "@notice Currently unused. For future compatability\n@param owner The address of the account to query\n@return The number of underlying tokens owned by `owner`", - "id": 18144, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18133, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 18144, - "src": "6009:13:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6009:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6008:15:24" - }, - "returnParameters": { - "id": 18137, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18136, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18144, - "src": "6071:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18135, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6071:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6070:9:24" - }, - "scope": 18374, - "src": "5980:168:24", - "stateMutability": "view", - "superFunction": 17429, - "visibility": "external" - }, - { - "body": { - "id": 18154, - "nodeType": "Block", - "src": "6545:66:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18149, - "name": "newPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18146, - "src": "6555:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18150, - "nodeType": "ExpressionStatement", - "src": "6555:13:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18151, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "6585:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6585:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18153, - "nodeType": "ExpressionStatement", - "src": "6585:19:24" - } - ] - }, - "documentation": "@notice Begins transfer of gov rights. The newPendingGov must call `_acceptGov` to finalize the transfer.\n@dev Gov function to begin change of gov. The newPendingGov must call `_acceptGov` to finalize the transfer.\n@param newPendingGov New pending gov.", - "id": 18155, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18146, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 18155, - "src": "6501:21:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6501:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6500:23:24" - }, - "returnParameters": { - "id": 18148, - "nodeType": "ParameterList", - "parameters": [], - "src": "6545:0:24" - }, - "scope": 18374, - "src": "6477:134:24", - "stateMutability": "nonpayable", - "superFunction": 17637, - "visibility": "external" - }, - { - "body": { - "id": 18165, - "nodeType": "Block", - "src": "6677:61:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18160, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18157, - "src": "6687:8:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18161, - "nodeType": "ExpressionStatement", - "src": "6687:8:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18162, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "6712:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6712:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18164, - "nodeType": "ExpressionStatement", - "src": "6712:19:24" - } - ] - }, - "documentation": null, - "id": 18166, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18158, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18157, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 18166, - "src": "6638:16:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18156, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6638:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6637:18:24" - }, - "returnParameters": { - "id": 18159, - "nodeType": "ParameterList", - "parameters": [], - "src": "6677:0:24" - }, - "scope": 18374, - "src": "6617:121:24", - "stateMutability": "nonpayable", - "superFunction": 17595, - "visibility": "external" - }, - { - "body": { - "id": 18176, - "nodeType": "Block", - "src": "6814:66:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18171, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18168, - "src": "6824:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18172, - "nodeType": "ExpressionStatement", - "src": "6824:13:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18173, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "6854:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6854:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18175, - "nodeType": "ExpressionStatement", - "src": "6854:19:24" - } - ] - }, - "documentation": null, - "id": 18177, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18169, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18168, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 18177, - "src": "6770:21:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18167, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6770:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6769:23:24" - }, - "returnParameters": { - "id": 18170, - "nodeType": "ParameterList", - "parameters": [], - "src": "6814:0:24" - }, - "scope": 18374, - "src": "6744:136:24", - "stateMutability": "nonpayable", - "superFunction": 17616, - "visibility": "external" - }, - { - "body": { - "id": 18183, - "nodeType": "Block", - "src": "7184:36:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18180, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "7194:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7194:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18182, - "nodeType": "ExpressionStatement", - "src": "7194:19:24" - } - ] - }, - "documentation": "@notice Accepts transfer of gov rights. msg.sender must be pendingGov\n@dev Gov function for pending gov to accept role and update gov\n@return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)", - "id": 18184, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18178, - "nodeType": "ParameterList", - "parameters": [], - "src": "7160:2:24" - }, - "returnParameters": { - "id": 18179, - "nodeType": "ParameterList", - "parameters": [], - "src": "7184:0:24" - }, - "scope": 18374, - "src": "7141:79:24", - "stateMutability": "nonpayable", - "superFunction": 17668, - "visibility": "external" - }, - { - "body": { - "id": 18200, - "nodeType": "Block", - "src": "7345:72:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18193, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18186, - "src": "7355:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18194, - "nodeType": "ExpressionStatement", - "src": "7355:7:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18195, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18188, - "src": "7364:11:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18196, - "nodeType": "ExpressionStatement", - "src": "7364:11:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18197, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "7385:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7385:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18199, - "nodeType": "ExpressionStatement", - "src": "7385:25:24" - } - ] - }, - "documentation": null, - "id": 18201, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18189, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18186, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18201, - "src": "7250:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18185, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7250:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18188, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 18201, - "src": "7267:16:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18187, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7267:4:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7249:35:24" - }, - "returnParameters": { - "id": 18192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18191, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18201, - "src": "7332:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7332:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7331:9:24" - }, - "scope": 18374, - "src": "7227:190:24", - "stateMutability": "view", - "superFunction": 18678, - "visibility": "external" - }, - { - "body": { - "id": 18231, - "nodeType": "Block", - "src": "7596:79:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18216, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18203, - "src": "7606:9:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18217, - "nodeType": "ExpressionStatement", - "src": "7606:9:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18218, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18205, - "src": "7617:5:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18219, - "nodeType": "ExpressionStatement", - "src": "7617:5:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18220, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18207, - "src": "7624:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18221, - "nodeType": "ExpressionStatement", - "src": "7624:6:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18222, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18209, - "src": "7632:1:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 18223, - "nodeType": "ExpressionStatement", - "src": "7632:1:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18224, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18211, - "src": "7635:1:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 18225, - "nodeType": "ExpressionStatement", - "src": "7635:1:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18226, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18213, - "src": "7638:1:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 18227, - "nodeType": "ExpressionStatement", - "src": "7638:1:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18228, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "7649:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7649:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18230, - "nodeType": "ExpressionStatement", - "src": "7649:19:24" - } - ] - }, - "documentation": null, - "id": 18232, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18214, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18203, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7455:17:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18202, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7455:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18205, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7482:10:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18204, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7482:4:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18207, - "name": "expiry", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7502:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18206, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7502:4:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18209, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7523:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 18208, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7523:5:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18211, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7540:9:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18210, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7540:7:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18213, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7559:9:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18212, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7559:7:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7445:129:24" - }, - "returnParameters": { - "id": 18215, - "nodeType": "ParameterList", - "parameters": [], - "src": "7596:0:24" - }, - "scope": 18374, - "src": "7423:252:24", - "stateMutability": "nonpayable", - "superFunction": 18519, - "visibility": "external" - }, - { - "body": { - "id": 18242, - "nodeType": "Block", - "src": "7739:55:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18237, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18234, - "src": "7749:9:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18238, - "nodeType": "ExpressionStatement", - "src": "7749:9:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18239, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "7768:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7768:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18241, - "nodeType": "ExpressionStatement", - "src": "7768:19:24" - } - ] - }, - "documentation": null, - "id": 18243, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18235, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18234, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18243, - "src": "7699:17:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18233, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7699:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7698:19:24" - }, - "returnParameters": { - "id": 18236, - "nodeType": "ParameterList", - "parameters": [], - "src": "7739:0:24" - }, - "scope": 18374, - "src": "7681:113:24", - "stateMutability": "nonpayable", - "superFunction": 18421, - "visibility": "external" - }, - { - "body": { - "id": 18255, - "nodeType": "Block", - "src": "7902:59:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18250, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18245, - "src": "7912:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18251, - "nodeType": "ExpressionStatement", - "src": "7912:7:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18252, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "7929:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7929:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18254, - "nodeType": "ExpressionStatement", - "src": "7929:25:24" - } - ] - }, - "documentation": null, - "id": 18256, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getCurrentVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18246, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18245, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18256, - "src": "7825:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18244, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7825:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7824:17:24" - }, - "returnParameters": { - "id": 18249, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18248, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18256, - "src": "7889:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18247, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7889:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7888:9:24" - }, - "scope": 18374, - "src": "7800:161:24", - "stateMutability": "view", - "superFunction": 18547, - "visibility": "external" - }, - { - "body": { - "id": 18277, - "nodeType": "Block", - "src": "8399:248:24", - "statements": [ - { - "assignments": [ - 18266, - 18268 - ], - "declarations": [ - { - "constant": false, - "id": 18266, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18277, - "src": "8410:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18265, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8410:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18268, - "name": "returnData", - "nodeType": "VariableDeclaration", - "scope": 18277, - "src": "8424:23:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18267, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8424:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18273, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18271, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18260, - "src": "8471:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 18269, - "name": "callee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18258, - "src": "8451:6:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8451:19:24", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 18272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8451:25:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8409:67:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18266, - "isOffset": false, - "isSlot": false, - "src": "8515:7:24", - "valueSize": 1 - } - }, - { - "returnData": { - "declaration": 18268, - "isOffset": false, - "isSlot": false, - "src": "8556:10:24", - "valueSize": 1 - } - } - ], - "id": 18274, - "nodeType": "InlineAssembly", - "operations": "{\n if eq(success, 0)\n {\n revert(add(returnData, 0x20), returndatasize())\n }\n}", - "src": "8486:128:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18275, - "name": "returnData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18268, - "src": "8630:10:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 18264, - "id": 18276, - "nodeType": "Return", - "src": "8623:17:24" - } - ] - }, - "documentation": "@notice Internal method to delegate execution to another contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts\n@param callee The contract to delegatecall\n@param data The raw data to delegatecall\n@return The returned bytes from the delegatecall", - "id": 18278, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateTo", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18258, - "name": "callee", - "nodeType": "VariableDeclaration", - "scope": 18278, - "src": "8332:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18257, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8332:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18260, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 18278, - "src": "8348:17:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18259, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8348:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8331:35:24" - }, - "returnParameters": { - "id": 18264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18263, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18278, - "src": "8385:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18262, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8385:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8384:14:24" - }, - "scope": 18374, - "src": "8312:335:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18290, - "nodeType": "Block", - "src": "9024:56:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18286, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "9052:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18287, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18280, - "src": "9068:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18285, - "name": "delegateTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18278, - "src": "9041:10:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory) returns (bytes memory)" - } - }, - "id": 18288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9041:32:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 18284, - "id": 18289, - "nodeType": "Return", - "src": "9034:39:24" - } - ] - }, - "documentation": "@notice Delegates execution to the implementation contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts\n@param data The raw data to delegatecall\n@return The returned bytes from the delegatecall", - "id": 18291, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateToImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18280, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 18291, - "src": "8975:17:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18279, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8975:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8974:19:24" - }, - "returnParameters": { - "id": 18284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18291, - "src": "9010:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18282, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9010:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9009:14:24" - }, - "scope": 18374, - "src": "8941:139:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 18321, - "nodeType": "Block", - "src": "9585:334:24", - "statements": [ - { - "assignments": [ - 18299, - 18301 - ], - "declarations": [ - { - "constant": false, - "id": 18299, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18321, - "src": "9596:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18298, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9596:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18301, - "name": "returnData", - "nodeType": "VariableDeclaration", - "scope": 18321, - "src": "9610:23:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18300, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9610:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18312, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "64656c6567617465546f496d706c656d656e746174696f6e28627974657329", - "id": 18308, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9686:33:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - "value": "delegateToImplementation(bytes)" - }, - { - "argumentTypes": null, - "id": 18309, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18293, - "src": "9721:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 18306, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9662:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18307, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9662:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 18310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9662:64:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18303, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19350, - "src": "9645:4:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - ], - "id": 18302, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9637:7:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9637:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 18305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9637:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 18311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9637:90:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9595:132:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18299, - "isOffset": false, - "isSlot": false, - "src": "9766:7:24", - "valueSize": 1 - } - }, - { - "returnData": { - "declaration": 18301, - "isOffset": false, - "isSlot": false, - "src": "9807:10:24", - "valueSize": 1 - } - } - ], - "id": 18313, - "nodeType": "InlineAssembly", - "operations": "{\n if eq(success, 0)\n {\n revert(add(returnData, 0x20), returndatasize())\n }\n}", - "src": "9737:128:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18316, - "name": "returnData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18301, - "src": "9892:10:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 18317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9905:5:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - } - ], - "id": 18318, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "9904:7:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - } - ], - "expression": { - "argumentTypes": null, - "id": 18314, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9881:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9881:10:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 18319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9881:31:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 18297, - "id": 18320, - "nodeType": "Return", - "src": "9874:38:24" - } - ] - }, - "documentation": "@notice Delegates execution to an implementation contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts\n There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n@param data The raw data to delegatecall\n@return The returned bytes from the delegatecall", - "id": 18322, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateToViewImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18294, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 18322, - "src": "9531:17:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9531:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9530:19:24" - }, - "returnParameters": { - "id": 18297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18296, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18322, - "src": "9571:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18295, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9571:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9570:14:24" - }, - "scope": 18374, - "src": "9493:426:24", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 18342, - "nodeType": "Block", - "src": "9996:424:24", - "statements": [ - { - "assignments": [ - 18328, - null - ], - "declarations": [ - { - "constant": false, - "id": 18328, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18342, - "src": "10007:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18327, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10007:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 18340, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "64656c6567617465546f496d706c656d656e746174696f6e28627974657329", - "id": 18335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10074:33:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - "value": "delegateToImplementation(bytes)" - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18336, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10109:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10109:8:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "expression": { - "argumentTypes": null, - "id": 18333, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "10050:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10050:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 18338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10050:68:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18330, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19350, - "src": "10033:4:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - ], - "id": 18329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10025:7:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10025:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 18332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10025:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 18339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10025:94:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10006:113:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18328, - "isOffset": false, - "isSlot": false, - "src": "10265:7:24", - "valueSize": 1 - } - } - ], - "id": 18341, - "nodeType": "InlineAssembly", - "operations": "{\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize())\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize())\n }\n default {\n return(add(free_mem_ptr, 0x40), returndatasize())\n }\n}", - "src": "10130:284:24" - } - ] - }, - "documentation": null, - "id": 18343, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateToViewAndReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18323, - "nodeType": "ParameterList", - "parameters": [], - "src": "9957:2:24" - }, - "returnParameters": { - "id": 18326, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18325, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18343, - "src": "9982:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18324, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9982:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9981:14:24" - }, - "scope": 18374, - "src": "9925:495:24", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 18357, - "nodeType": "Block", - "src": "10486:356:24", - "statements": [ - { - "assignments": [ - 18349, - null - ], - "declarations": [ - { - "constant": false, - "id": 18349, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18357, - "src": "10497:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18348, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10497:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 18355, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18352, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10543:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10543:8:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "expression": { - "argumentTypes": null, - "id": 18350, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "10515:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10515:27:24", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 18354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10515:37:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10496:56:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18349, - "isOffset": false, - "isSlot": false, - "src": "10698:7:24", - "valueSize": 1 - } - } - ], - "id": 18356, - "nodeType": "InlineAssembly", - "operations": "{\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize())\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize())\n }\n default {\n return(free_mem_ptr, returndatasize())\n }\n}", - "src": "10563:273:24" - } - ] - }, - "documentation": null, - "id": 18358, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateAndReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18344, - "nodeType": "ParameterList", - "parameters": [], - "src": "10452:2:24" - }, - "returnParameters": { - "id": 18347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18346, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18358, - "src": "10472:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18345, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10472:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10471:14:24" - }, - "scope": 18374, - "src": "10426:416:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 18372, - "nodeType": "Block", - "src": "11060:191:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18362, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "11078:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11078:9:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11091:1:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11078:14:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d44656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b", - "id": 18366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11093:54:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_37c8b7a9b3e36575f62992c999d9d412cf4a76dbc121965a375934b0b1cc5ae6", - "typeString": "literal_string \"YAMDelegator:fallback: cannot send value to fallback\"" - }, - "value": "YAMDelegator:fallback: cannot send value to fallback" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_37c8b7a9b3e36575f62992c999d9d412cf4a76dbc121965a375934b0b1cc5ae6", - "typeString": "literal_string \"YAMDelegator:fallback: cannot send value to fallback\"" - } - ], - "id": 18361, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11070:7:24", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11070:78:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18368, - "nodeType": "ExpressionStatement", - "src": "11070:78:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18369, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "11225:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11225:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18371, - "nodeType": "ExpressionStatement", - "src": "11225:19:24" - } - ] - }, - "documentation": "@notice Delegates execution to an implementation contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts", - "id": 18373, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18359, - "nodeType": "ParameterList", - "parameters": [], - "src": "11040:2:24" - }, - "returnParameters": { - "id": 18360, - "nodeType": "ParameterList", - "parameters": [], - "src": "11060:0:24" - }, - "scope": 18374, - "src": "11031:220:24", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 18375, - "src": "74:11179:24" - } - ], - "src": "0:11254:24" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegator.sol", - "exportedSymbols": { - "YAMDelegator": [ - 18374 - ] - }, - "id": 18375, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17920, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:24" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17921, - "nodeType": "ImportDirective", - "scope": 18375, - "sourceUnit": 17829, - "src": "25:19:24", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "file": "./YAMDelegate.sol", - "id": 17922, - "nodeType": "ImportDirective", - "scope": 18375, - "sourceUnit": 17919, - "src": "45:27:24", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17923, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "99:3:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17924, - "nodeType": "InheritanceSpecifier", - "src": "99:3:24" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17925, - "name": "YAMDelegatorInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17852, - "src": "104:21:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegatorInterface_$17852", - "typeString": "contract YAMDelegatorInterface" - } - }, - "id": 17926, - "nodeType": "InheritanceSpecifier", - "src": "104:21:24" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17852, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 18374, - "linearizedBaseContracts": [ - 18374, - 17852, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegator", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17966, - "nodeType": "Block", - "src": "791:651:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17941, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "867:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17942, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "873:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "873:10:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "867:16:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17945, - "nodeType": "ExpressionStatement", - "src": "867:16:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17947, - "name": "implementation_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17936, - "src": "1001:15:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "696e697469616c697a6528737472696e672c737472696e672c75696e74382c616464726573732c75696e7432353629", - "id": 17950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1071:49:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6c945221a4589c6bed13f50971ab7b3349fd0049875f0584bd6068660396d30a", - "typeString": "literal_string \"initialize(string,string,uint8,address,uint256)\"" - }, - "value": "initialize(string,string,uint8,address,uint256)" - }, - { - "argumentTypes": null, - "id": 17951, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17928, - "src": "1138:5:24", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17952, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17930, - "src": "1161:7:24", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17953, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17932, - "src": "1186:9:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17954, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1213:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1213:10:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17956, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17934, - "src": "1241:11:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_6c945221a4589c6bed13f50971ab7b3349fd0049875f0584bd6068660396d30a", - "typeString": "literal_string \"initialize(string,string,uint8,address,uint256)\"" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17948, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1030:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 17949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1030:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 17957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1030:236:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 17946, - "name": "delegateTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18278, - "src": "977:10:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory) returns (bytes memory)" - } - }, - "id": 17958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "977:299:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17959, - "nodeType": "ExpressionStatement", - "src": "977:299:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17961, - "name": "implementation_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17936, - "src": "1385:15:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1402:5:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "id": 17963, - "name": "becomeImplementationData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17938, - "src": "1409:24:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 17960, - "name": "_setImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 18016 - ], - "referencedDeclaration": 18016, - "src": "1366:18:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bool,bytes memory)" - } - }, - "id": 17964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1366:68:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17965, - "nodeType": "ExpressionStatement", - "src": "1366:68:24" - } - ] - }, - "documentation": "@notice Construct a new YAM\n@param name_ ERC-20 name of this token\n@param symbol_ ERC-20 symbol of this token\n@param decimals_ ERC-20 decimal precision of this token\n@param initSupply_ Initial token amount\n@param implementation_ The address of the implementation the contract delegates to\n@param becomeImplementationData The encoded args for becomeImplementation", - "id": 17967, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17939, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17928, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "581:19:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17927, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "581:6:24", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17930, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "610:21:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17929, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "610:6:24", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17932, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "641:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17931, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "641:5:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17934, - "name": "initSupply_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "666:19:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "666:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17936, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "695:23:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17935, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "695:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17938, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17967, - "src": "728:37:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17937, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "728:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "571:200:24" - }, - "returnParameters": { - "id": 17940, - "nodeType": "ParameterList", - "parameters": [], - "src": "791:0:24" - }, - "scope": 18374, - "src": "560:882:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 18015, - "nodeType": "Block", - "src": "1950:508:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17977, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1968:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1968:10:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17979, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1982:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1968:17:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d44656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d75737420626520676f76", - "id": 17981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1987:54:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1877b136b34d46099ed3ab6d725748b3f2435d20ae75575ffd8fc98f74b88f78", - "typeString": "literal_string \"YAMDelegator::_setImplementation: Caller must be gov\"" - }, - "value": "YAMDelegator::_setImplementation: Caller must be gov" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1877b136b34d46099ed3ab6d725748b3f2435d20ae75575ffd8fc98f74b88f78", - "typeString": "literal_string \"YAMDelegator::_setImplementation: Caller must be gov\"" - } - ], - "id": 17976, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1960:7:24", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1960:82:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17983, - "nodeType": "ExpressionStatement", - "src": "1960:82:24" - }, - { - "condition": { - "argumentTypes": null, - "id": 17984, - "name": "allowResign", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17971, - "src": "2057:11:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17993, - "nodeType": "IfStatement", - "src": "2053:118:24", - "trueBody": { - "id": 17992, - "nodeType": "Block", - "src": "2070:101:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5f72657369676e496d706c656d656e746174696f6e2829", - "id": 17988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2133:25:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_153ab505308d51e1f8b9381691e5d77f8d2be0d3c72821cfc28246932d55aed9", - "typeString": "literal_string \"_resignImplementation()\"" - }, - "value": "_resignImplementation()" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_153ab505308d51e1f8b9381691e5d77f8d2be0d3c72821cfc28246932d55aed9", - "typeString": "literal_string \"_resignImplementation()\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 17986, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2109:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 17987, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2109:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 17989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2109:50:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 17985, - "name": "delegateToImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18291, - "src": "2084:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bytes memory)" - } - }, - "id": 17990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2084:76:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17991, - "nodeType": "ExpressionStatement", - "src": "2084:76:24" - } - ] - } - }, - { - "assignments": [ - 17995 - ], - "declarations": [ - { - "constant": false, - "id": 17995, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 18015, - "src": "2181:25:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17994, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2181:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17997, - "initialValue": { - "argumentTypes": null, - "id": 17996, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2209:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2181:42:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17998, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2233:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17999, - "name": "implementation_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17969, - "src": "2250:15:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2233:32:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18001, - "nodeType": "ExpressionStatement", - "src": "2233:32:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5f6265636f6d65496d706c656d656e746174696f6e28627974657329", - "id": 18005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2325:30:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_56e677285a1553abe1ddb56f43a4f037fd5ff42f7db26a312647701fa38bb76a", - "typeString": "literal_string \"_becomeImplementation(bytes)\"" - }, - "value": "_becomeImplementation(bytes)" - }, - { - "argumentTypes": null, - "id": 18006, - "name": "becomeImplementationData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17973, - "src": "2357:24:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_56e677285a1553abe1ddb56f43a4f037fd5ff42f7db26a312647701fa38bb76a", - "typeString": "literal_string \"_becomeImplementation(bytes)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 18003, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2301:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2301:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 18007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2301:81:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18002, - "name": "delegateToImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18291, - "src": "2276:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bytes memory)" - } - }, - "id": 18008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2276:107:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18009, - "nodeType": "ExpressionStatement", - "src": "2276:107:24" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18011, - "name": "oldImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17995, - "src": "2417:17:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18012, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2436:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18010, - "name": "NewImplementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17842, - "src": "2399:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 18013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2399:52:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18014, - "nodeType": "EmitStatement", - "src": "2394:57:24" - } - ] - }, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 18016, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17969, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 18016, - "src": "1861:23:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17968, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1861:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17971, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 18016, - "src": "1886:16:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17970, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1886:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17973, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 18016, - "src": "1904:37:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17972, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1904:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:82:24" - }, - "returnParameters": { - "id": 17975, - "nodeType": "ParameterList", - "parameters": [], - "src": "1950:0:24" - }, - "scope": 18374, - "src": "1833:625:24", - "stateMutability": "nonpayable", - "superFunction": 17851, - "visibility": "public" - }, - { - "body": { - "id": 18032, - "nodeType": "Block", - "src": "2898:67:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18025, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18018, - "src": "2908:2:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18026, - "nodeType": "ExpressionStatement", - "src": "2908:2:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18027, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18020, - "src": "2912:10:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18028, - "nodeType": "ExpressionStatement", - "src": "2912:10:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18029, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "2939:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2939:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18031, - "nodeType": "ExpressionStatement", - "src": "2939:19:24" - } - ] - }, - "documentation": "@notice Sender supplies assets into the market and receives cTokens in exchange\n@dev Accrues interest whether or not the operation succeeds, unless reverted\n@param mintAmount The amount of the underlying asset to supply\n@return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)", - "id": 18033, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18021, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18018, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 18033, - "src": "2822:10:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18017, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2822:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18020, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 18033, - "src": "2834:18:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18019, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2834:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2821:32:24" - }, - "returnParameters": { - "id": 18024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18023, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18033, - "src": "2888:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18022, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2888:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2887:6:24" - }, - "scope": 18374, - "src": "2808:157:24", - "stateMutability": "nonpayable", - "superFunction": 17194, - "visibility": "external" - }, - { - "body": { - "id": 18049, - "nodeType": "Block", - "src": "3309:64:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18042, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18035, - "src": "3319:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18043, - "nodeType": "ExpressionStatement", - "src": "3319:3:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18044, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18037, - "src": "3324:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18045, - "nodeType": "ExpressionStatement", - "src": "3324:6:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18046, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "3347:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3347:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18048, - "nodeType": "ExpressionStatement", - "src": "3347:19:24" - } - ] - }, - "documentation": "@notice Transfer `amount` tokens from `msg.sender` to `dst`\n@param dst The address of the destination account\n@param amount The number of tokens to transfer\n@return Whether or not the transfer succeeded", - "id": 18050, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18038, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18035, - "name": "dst", - "nodeType": "VariableDeclaration", - "scope": 18050, - "src": "3236:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18034, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3236:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18037, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18050, - "src": "3249:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18036, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3249:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3235:29:24" - }, - "returnParameters": { - "id": 18041, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18040, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18050, - "src": "3299:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18039, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3299:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3298:6:24" - }, - "scope": 18374, - "src": "3218:155:24", - "stateMutability": "nonpayable", - "superFunction": 17317, - "visibility": "external" - }, - { - "body": { - "id": 18070, - "nodeType": "Block", - "src": "3809:69:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18061, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18052, - "src": "3819:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18062, - "nodeType": "ExpressionStatement", - "src": "3819:3:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18063, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18054, - "src": "3824:3:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18064, - "nodeType": "ExpressionStatement", - "src": "3824:3:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18065, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18056, - "src": "3829:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18066, - "nodeType": "ExpressionStatement", - "src": "3829:6:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18067, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "3852:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3852:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18069, - "nodeType": "ExpressionStatement", - "src": "3852:19:24" - } - ] - }, - "documentation": "@notice Transfer `amount` tokens from `src` to `dst`\n@param src The address of the source account\n@param dst The address of the destination account\n@param amount The number of tokens to transfer\n@return Whether or not the transfer succeeded", - "id": 18071, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18052, - "name": "src", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3702:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18051, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3702:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18054, - "name": "dst", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3723:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18053, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3723:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18056, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3744:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18055, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3744:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3692:72:24" - }, - "returnParameters": { - "id": 18060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18059, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18071, - "src": "3799:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18058, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3799:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3798:6:24" - }, - "scope": 18374, - "src": "3671:207:24", - "stateMutability": "nonpayable", - "superFunction": 17399, - "visibility": "external" - }, - { - "body": { - "id": 18087, - "nodeType": "Block", - "src": "4454:68:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18080, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18073, - "src": "4464:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18081, - "nodeType": "ExpressionStatement", - "src": "4464:7:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18082, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18075, - "src": "4473:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18083, - "nodeType": "ExpressionStatement", - "src": "4473:6:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18084, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "4496:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4496:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18086, - "nodeType": "ExpressionStatement", - "src": "4496:19:24" - } - ] - }, - "documentation": "@notice Approve `spender` to transfer up to `amount` from `src`\n@dev This will overwrite the approval amount for `spender`\n and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n@param spender The address of the account which may transfer tokens\n@param amount The number of tokens that are approved (-1 means infinite)\n@return Whether or not the approval succeeded", - "id": 18088, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18073, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 18088, - "src": "4364:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18072, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4364:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18075, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18088, - "src": "4389:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18074, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4389:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4354:55:24" - }, - "returnParameters": { - "id": 18079, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18078, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18088, - "src": "4444:4:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18077, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4444:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4443:6:24" - }, - "scope": 18374, - "src": "4338:184:24", - "stateMutability": "nonpayable", - "superFunction": 17473, - "visibility": "external" - }, - { - "body": { - "id": 18104, - "nodeType": "Block", - "src": "4977:73:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18097, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18090, - "src": "4987:5:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18098, - "nodeType": "ExpressionStatement", - "src": "4987:5:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18099, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18092, - "src": "4994:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18100, - "nodeType": "ExpressionStatement", - "src": "4994:7:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18101, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "5018:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5018:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18103, - "nodeType": "ExpressionStatement", - "src": "5018:25:24" - } - ] - }, - "documentation": "@notice Get the current allowance from `owner` for `spender`\n@param owner The address of the account which owns the tokens to be spent\n@param spender The address of the account which may transfer tokens\n@return The number of tokens allowed to be spent (-1 means infinite)", - "id": 18105, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18090, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 18105, - "src": "4872:13:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4872:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18092, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 18105, - "src": "4895:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18091, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4895:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4862:54:24" - }, - "returnParameters": { - "id": 18096, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18095, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18105, - "src": "4964:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18094, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4964:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4963:9:24" - }, - "scope": 18374, - "src": "4844:206:24", - "stateMutability": "view", - "superFunction": 17445, - "visibility": "external" - }, - { - "body": { - "id": 18117, - "nodeType": "Block", - "src": "5371:68:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18112, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18107, - "src": "5381:9:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18113, - "nodeType": "ExpressionStatement", - "src": "5381:9:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18114, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "5407:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5407:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18116, - "nodeType": "ExpressionStatement", - "src": "5407:25:24" - } - ] - }, - "documentation": "@notice Get the current allowance from `owner` for `spender`\n@param delegator The address of the account which has designated a delegate\n@return Address of delegatee", - "id": 18118, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18108, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18107, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18118, - "src": "5287:17:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18106, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5287:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5277:33:24" - }, - "returnParameters": { - "id": 18111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18110, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18118, - "src": "5358:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5358:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5357:9:24" - }, - "scope": 18374, - "src": "5259:180:24", - "stateMutability": "view", - "superFunction": 18409, - "visibility": "external" - }, - { - "body": { - "id": 18130, - "nodeType": "Block", - "src": "5716:64:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18125, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18120, - "src": "5726:5:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18126, - "nodeType": "ExpressionStatement", - "src": "5726:5:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18127, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "5748:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5748:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18129, - "nodeType": "ExpressionStatement", - "src": "5748:25:24" - } - ] - }, - "documentation": "@notice Get the token balance of the `owner`\n@param owner The address of the account to query\n@return The number of tokens owned by `owner`", - "id": 18131, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18121, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18120, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 18131, - "src": "5641:13:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18119, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5641:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5640:15:24" - }, - "returnParameters": { - "id": 18124, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18123, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18131, - "src": "5703:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18122, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5703:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5702:9:24" - }, - "scope": 18374, - "src": "5622:158:24", - "stateMutability": "view", - "superFunction": 17417, - "visibility": "external" - }, - { - "body": { - "id": 18143, - "nodeType": "Block", - "src": "6084:64:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18138, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18133, - "src": "6094:5:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18139, - "nodeType": "ExpressionStatement", - "src": "6094:5:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18140, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "6116:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6116:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18142, - "nodeType": "ExpressionStatement", - "src": "6116:25:24" - } - ] - }, - "documentation": "@notice Currently unused. For future compatability\n@param owner The address of the account to query\n@return The number of underlying tokens owned by `owner`", - "id": 18144, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18133, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 18144, - "src": "6009:13:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6009:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6008:15:24" - }, - "returnParameters": { - "id": 18137, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18136, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18144, - "src": "6071:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18135, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6071:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6070:9:24" - }, - "scope": 18374, - "src": "5980:168:24", - "stateMutability": "view", - "superFunction": 17429, - "visibility": "external" - }, - { - "body": { - "id": 18154, - "nodeType": "Block", - "src": "6545:66:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18149, - "name": "newPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18146, - "src": "6555:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18150, - "nodeType": "ExpressionStatement", - "src": "6555:13:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18151, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "6585:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6585:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18153, - "nodeType": "ExpressionStatement", - "src": "6585:19:24" - } - ] - }, - "documentation": "@notice Begins transfer of gov rights. The newPendingGov must call `_acceptGov` to finalize the transfer.\n@dev Gov function to begin change of gov. The newPendingGov must call `_acceptGov` to finalize the transfer.\n@param newPendingGov New pending gov.", - "id": 18155, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18146, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 18155, - "src": "6501:21:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6501:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6500:23:24" - }, - "returnParameters": { - "id": 18148, - "nodeType": "ParameterList", - "parameters": [], - "src": "6545:0:24" - }, - "scope": 18374, - "src": "6477:134:24", - "stateMutability": "nonpayable", - "superFunction": 17637, - "visibility": "external" - }, - { - "body": { - "id": 18165, - "nodeType": "Block", - "src": "6677:61:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18160, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18157, - "src": "6687:8:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18161, - "nodeType": "ExpressionStatement", - "src": "6687:8:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18162, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "6712:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6712:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18164, - "nodeType": "ExpressionStatement", - "src": "6712:19:24" - } - ] - }, - "documentation": null, - "id": 18166, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18158, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18157, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 18166, - "src": "6638:16:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18156, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6638:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6637:18:24" - }, - "returnParameters": { - "id": 18159, - "nodeType": "ParameterList", - "parameters": [], - "src": "6677:0:24" - }, - "scope": 18374, - "src": "6617:121:24", - "stateMutability": "nonpayable", - "superFunction": 17595, - "visibility": "external" - }, - { - "body": { - "id": 18176, - "nodeType": "Block", - "src": "6814:66:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18171, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18168, - "src": "6824:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18172, - "nodeType": "ExpressionStatement", - "src": "6824:13:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18173, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "6854:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6854:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18175, - "nodeType": "ExpressionStatement", - "src": "6854:19:24" - } - ] - }, - "documentation": null, - "id": 18177, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18169, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18168, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 18177, - "src": "6770:21:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18167, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6770:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6769:23:24" - }, - "returnParameters": { - "id": 18170, - "nodeType": "ParameterList", - "parameters": [], - "src": "6814:0:24" - }, - "scope": 18374, - "src": "6744:136:24", - "stateMutability": "nonpayable", - "superFunction": 17616, - "visibility": "external" - }, - { - "body": { - "id": 18183, - "nodeType": "Block", - "src": "7184:36:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18180, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "7194:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7194:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18182, - "nodeType": "ExpressionStatement", - "src": "7194:19:24" - } - ] - }, - "documentation": "@notice Accepts transfer of gov rights. msg.sender must be pendingGov\n@dev Gov function for pending gov to accept role and update gov\n@return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)", - "id": 18184, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18178, - "nodeType": "ParameterList", - "parameters": [], - "src": "7160:2:24" - }, - "returnParameters": { - "id": 18179, - "nodeType": "ParameterList", - "parameters": [], - "src": "7184:0:24" - }, - "scope": 18374, - "src": "7141:79:24", - "stateMutability": "nonpayable", - "superFunction": 17668, - "visibility": "external" - }, - { - "body": { - "id": 18200, - "nodeType": "Block", - "src": "7345:72:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18193, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18186, - "src": "7355:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18194, - "nodeType": "ExpressionStatement", - "src": "7355:7:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18195, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18188, - "src": "7364:11:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18196, - "nodeType": "ExpressionStatement", - "src": "7364:11:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18197, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "7385:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7385:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18199, - "nodeType": "ExpressionStatement", - "src": "7385:25:24" - } - ] - }, - "documentation": null, - "id": 18201, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18189, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18186, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18201, - "src": "7250:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18185, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7250:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18188, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 18201, - "src": "7267:16:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18187, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7267:4:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7249:35:24" - }, - "returnParameters": { - "id": 18192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18191, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18201, - "src": "7332:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7332:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7331:9:24" - }, - "scope": 18374, - "src": "7227:190:24", - "stateMutability": "view", - "superFunction": 18678, - "visibility": "external" - }, - { - "body": { - "id": 18231, - "nodeType": "Block", - "src": "7596:79:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18216, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18203, - "src": "7606:9:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18217, - "nodeType": "ExpressionStatement", - "src": "7606:9:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18218, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18205, - "src": "7617:5:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18219, - "nodeType": "ExpressionStatement", - "src": "7617:5:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18220, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18207, - "src": "7624:6:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18221, - "nodeType": "ExpressionStatement", - "src": "7624:6:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18222, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18209, - "src": "7632:1:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 18223, - "nodeType": "ExpressionStatement", - "src": "7632:1:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18224, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18211, - "src": "7635:1:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 18225, - "nodeType": "ExpressionStatement", - "src": "7635:1:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18226, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18213, - "src": "7638:1:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 18227, - "nodeType": "ExpressionStatement", - "src": "7638:1:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18228, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "7649:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7649:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18230, - "nodeType": "ExpressionStatement", - "src": "7649:19:24" - } - ] - }, - "documentation": null, - "id": 18232, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18214, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18203, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7455:17:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18202, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7455:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18205, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7482:10:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18204, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7482:4:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18207, - "name": "expiry", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7502:11:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18206, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7502:4:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18209, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7523:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 18208, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "7523:5:24", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18211, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7540:9:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18210, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7540:7:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18213, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 18232, - "src": "7559:9:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18212, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7559:7:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7445:129:24" - }, - "returnParameters": { - "id": 18215, - "nodeType": "ParameterList", - "parameters": [], - "src": "7596:0:24" - }, - "scope": 18374, - "src": "7423:252:24", - "stateMutability": "nonpayable", - "superFunction": 18519, - "visibility": "external" - }, - { - "body": { - "id": 18242, - "nodeType": "Block", - "src": "7739:55:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18237, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18234, - "src": "7749:9:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18238, - "nodeType": "ExpressionStatement", - "src": "7749:9:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18239, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "7768:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7768:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18241, - "nodeType": "ExpressionStatement", - "src": "7768:19:24" - } - ] - }, - "documentation": null, - "id": 18243, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18235, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18234, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18243, - "src": "7699:17:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18233, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7699:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7698:19:24" - }, - "returnParameters": { - "id": 18236, - "nodeType": "ParameterList", - "parameters": [], - "src": "7739:0:24" - }, - "scope": 18374, - "src": "7681:113:24", - "stateMutability": "nonpayable", - "superFunction": 18421, - "visibility": "external" - }, - { - "body": { - "id": 18255, - "nodeType": "Block", - "src": "7902:59:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18250, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18245, - "src": "7912:7:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18251, - "nodeType": "ExpressionStatement", - "src": "7912:7:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18252, - "name": "delegateToViewAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18343, - "src": "7929:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view returns (bytes memory)" - } - }, - "id": 18253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7929:25:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18254, - "nodeType": "ExpressionStatement", - "src": "7929:25:24" - } - ] - }, - "documentation": null, - "id": 18256, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getCurrentVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18246, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18245, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18256, - "src": "7825:15:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18244, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7825:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7824:17:24" - }, - "returnParameters": { - "id": 18249, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18248, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18256, - "src": "7889:7:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18247, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7889:7:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7888:9:24" - }, - "scope": 18374, - "src": "7800:161:24", - "stateMutability": "view", - "superFunction": 18547, - "visibility": "external" - }, - { - "body": { - "id": 18277, - "nodeType": "Block", - "src": "8399:248:24", - "statements": [ - { - "assignments": [ - 18266, - 18268 - ], - "declarations": [ - { - "constant": false, - "id": 18266, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18277, - "src": "8410:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18265, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8410:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18268, - "name": "returnData", - "nodeType": "VariableDeclaration", - "scope": 18277, - "src": "8424:23:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18267, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8424:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18273, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18271, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18260, - "src": "8471:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 18269, - "name": "callee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18258, - "src": "8451:6:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8451:19:24", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 18272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8451:25:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8409:67:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18266, - "isOffset": false, - "isSlot": false, - "src": "8515:7:24", - "valueSize": 1 - } - }, - { - "returnData": { - "declaration": 18268, - "isOffset": false, - "isSlot": false, - "src": "8556:10:24", - "valueSize": 1 - } - } - ], - "id": 18274, - "nodeType": "InlineAssembly", - "operations": "{\n if eq(success, 0)\n {\n revert(add(returnData, 0x20), returndatasize())\n }\n}", - "src": "8486:128:24" - }, - { - "expression": { - "argumentTypes": null, - "id": 18275, - "name": "returnData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18268, - "src": "8630:10:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 18264, - "id": 18276, - "nodeType": "Return", - "src": "8623:17:24" - } - ] - }, - "documentation": "@notice Internal method to delegate execution to another contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts\n@param callee The contract to delegatecall\n@param data The raw data to delegatecall\n@return The returned bytes from the delegatecall", - "id": 18278, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateTo", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18258, - "name": "callee", - "nodeType": "VariableDeclaration", - "scope": 18278, - "src": "8332:14:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18257, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8332:7:24", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18260, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 18278, - "src": "8348:17:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18259, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8348:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8331:35:24" - }, - "returnParameters": { - "id": 18264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18263, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18278, - "src": "8385:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18262, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8385:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8384:14:24" - }, - "scope": 18374, - "src": "8312:335:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18290, - "nodeType": "Block", - "src": "9024:56:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18286, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "9052:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18287, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18280, - "src": "9068:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18285, - "name": "delegateTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18278, - "src": "9041:10:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory) returns (bytes memory)" - } - }, - "id": 18288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9041:32:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 18284, - "id": 18289, - "nodeType": "Return", - "src": "9034:39:24" - } - ] - }, - "documentation": "@notice Delegates execution to the implementation contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts\n@param data The raw data to delegatecall\n@return The returned bytes from the delegatecall", - "id": 18291, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateToImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18280, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 18291, - "src": "8975:17:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18279, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8975:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8974:19:24" - }, - "returnParameters": { - "id": 18284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18291, - "src": "9010:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18282, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9010:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9009:14:24" - }, - "scope": 18374, - "src": "8941:139:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 18321, - "nodeType": "Block", - "src": "9585:334:24", - "statements": [ - { - "assignments": [ - 18299, - 18301 - ], - "declarations": [ - { - "constant": false, - "id": 18299, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18321, - "src": "9596:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18298, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9596:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18301, - "name": "returnData", - "nodeType": "VariableDeclaration", - "scope": 18321, - "src": "9610:23:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18300, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9610:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18312, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "64656c6567617465546f496d706c656d656e746174696f6e28627974657329", - "id": 18308, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9686:33:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - "value": "delegateToImplementation(bytes)" - }, - { - "argumentTypes": null, - "id": 18309, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18293, - "src": "9721:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 18306, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9662:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18307, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9662:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 18310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9662:64:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18303, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19350, - "src": "9645:4:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - ], - "id": 18302, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9637:7:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9637:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 18305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9637:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 18311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9637:90:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9595:132:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18299, - "isOffset": false, - "isSlot": false, - "src": "9766:7:24", - "valueSize": 1 - } - }, - { - "returnData": { - "declaration": 18301, - "isOffset": false, - "isSlot": false, - "src": "9807:10:24", - "valueSize": 1 - } - } - ], - "id": 18313, - "nodeType": "InlineAssembly", - "operations": "{\n if eq(success, 0)\n {\n revert(add(returnData, 0x20), returndatasize())\n }\n}", - "src": "9737:128:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18316, - "name": "returnData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18301, - "src": "9892:10:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 18317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9905:5:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - } - ], - "id": 18318, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "9904:7:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - } - ], - "expression": { - "argumentTypes": null, - "id": 18314, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9881:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9881:10:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 18319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9881:31:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 18297, - "id": 18320, - "nodeType": "Return", - "src": "9874:38:24" - } - ] - }, - "documentation": "@notice Delegates execution to an implementation contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts\n There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n@param data The raw data to delegatecall\n@return The returned bytes from the delegatecall", - "id": 18322, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateToViewImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18294, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 18322, - "src": "9531:17:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9531:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9530:19:24" - }, - "returnParameters": { - "id": 18297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18296, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18322, - "src": "9571:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18295, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9571:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9570:14:24" - }, - "scope": 18374, - "src": "9493:426:24", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 18342, - "nodeType": "Block", - "src": "9996:424:24", - "statements": [ - { - "assignments": [ - 18328, - null - ], - "declarations": [ - { - "constant": false, - "id": 18328, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18342, - "src": "10007:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18327, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10007:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 18340, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "64656c6567617465546f496d706c656d656e746174696f6e28627974657329", - "id": 18335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10074:33:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - "value": "delegateToImplementation(bytes)" - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18336, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10109:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10109:8:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_0933c1ed98cdcde0cdd46a5db912a3041e9ac4aae2a78050ae668b916ea76606", - "typeString": "literal_string \"delegateToImplementation(bytes)\"" - }, - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "expression": { - "argumentTypes": null, - "id": 18333, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "10050:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10050:23:24", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 18338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10050:68:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18330, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19350, - "src": "10033:4:24", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMDelegator_$18374", - "typeString": "contract YAMDelegator" - } - ], - "id": 18329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10025:7:24", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10025:13:24", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 18332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10025:24:24", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 18339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10025:94:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10006:113:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18328, - "isOffset": false, - "isSlot": false, - "src": "10265:7:24", - "valueSize": 1 - } - } - ], - "id": 18341, - "nodeType": "InlineAssembly", - "operations": "{\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize())\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize())\n }\n default {\n return(add(free_mem_ptr, 0x40), returndatasize())\n }\n}", - "src": "10130:284:24" - } - ] - }, - "documentation": null, - "id": 18343, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateToViewAndReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18323, - "nodeType": "ParameterList", - "parameters": [], - "src": "9957:2:24" - }, - "returnParameters": { - "id": 18326, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18325, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18343, - "src": "9982:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18324, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9982:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9981:14:24" - }, - "scope": 18374, - "src": "9925:495:24", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 18357, - "nodeType": "Block", - "src": "10486:356:24", - "statements": [ - { - "assignments": [ - 18349, - null - ], - "declarations": [ - { - "constant": false, - "id": 18349, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 18357, - "src": "10497:12:24", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 18348, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10497:4:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 18355, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18352, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10543:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10543:8:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "expression": { - "argumentTypes": null, - "id": 18350, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "10515:14:24", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10515:27:24", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 18354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10515:37:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10496:56:24" - }, - { - "externalReferences": [ - { - "success": { - "declaration": 18349, - "isOffset": false, - "isSlot": false, - "src": "10698:7:24", - "valueSize": 1 - } - } - ], - "id": 18356, - "nodeType": "InlineAssembly", - "operations": "{\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize())\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize())\n }\n default {\n return(free_mem_ptr, returndatasize())\n }\n}", - "src": "10563:273:24" - } - ] - }, - "documentation": null, - "id": 18358, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateAndReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18344, - "nodeType": "ParameterList", - "parameters": [], - "src": "10452:2:24" - }, - "returnParameters": { - "id": 18347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18346, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18358, - "src": "10472:12:24", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 18345, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10472:5:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10471:14:24" - }, - "scope": 18374, - "src": "10426:416:24", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 18372, - "nodeType": "Block", - "src": "11060:191:24", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18362, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "11078:3:24", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11078:9:24", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11091:1:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11078:14:24", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d44656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b", - "id": 18366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11093:54:24", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_37c8b7a9b3e36575f62992c999d9d412cf4a76dbc121965a375934b0b1cc5ae6", - "typeString": "literal_string \"YAMDelegator:fallback: cannot send value to fallback\"" - }, - "value": "YAMDelegator:fallback: cannot send value to fallback" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_37c8b7a9b3e36575f62992c999d9d412cf4a76dbc121965a375934b0b1cc5ae6", - "typeString": "literal_string \"YAMDelegator:fallback: cannot send value to fallback\"" - } - ], - "id": 18361, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11070:7:24", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11070:78:24", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18368, - "nodeType": "ExpressionStatement", - "src": "11070:78:24" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18369, - "name": "delegateAndReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18358, - "src": "11225:17:24", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () returns (bytes memory)" - } - }, - "id": 18370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11225:19:24", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 18371, - "nodeType": "ExpressionStatement", - "src": "11225:19:24" - } - ] - }, - "documentation": "@notice Delegates execution to an implementation contract\n@dev It returns to the external caller whatever the implementation returns or forwards reverts", - "id": 18373, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18359, - "nodeType": "ParameterList", - "parameters": [], - "src": "11040:2:24" - }, - "returnParameters": { - "id": 18360, - "nodeType": "ParameterList", - "parameters": [], - "src": "11060:0:24" - }, - "scope": 18374, - "src": "11031:220:24", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 18375, - "src": "74:11179:24" - } - ], - "src": "0:11254:24" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event", - "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" - }, - "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event", - "signature": "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f" - }, - "0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event", - "signature": "0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724" - }, - "0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event", - "signature": "0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885" - }, - "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event", - "signature": "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523" - }, - "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event", - "signature": "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a" - }, - "0x2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event", - "signature": "0x2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896" - }, - "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event", - "signature": "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e" - }, - "0x51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event", - "signature": "0x51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545" - }, - "0xc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c0": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event", - "signature": "0xc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c0" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event", - "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" - }, - "0x1f6441da26c13719b8cd4757028002a9e1720f3ad33eb0c56cf40f2371ff0493": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "Test", - "type": "event", - "signature": "0x1f6441da26c13719b8cd4757028002a9e1720f3ad33eb0c56cf40f2371ff0493" - }, - "0x01340388dff19495691e9b974bae2930522d66af97d354461f4f419285d76c5a": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "Test", - "type": "event", - "signature": "0x01340388dff19495691e9b974bae2930522d66af97d354461f4f419285d76c5a" - } - }, - "links": {}, - "address": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A", - "transactionHash": "0x40ba76f79dac311f255b30354b7c2d621b7e6a569aab8a3b4dee6a171d6ac5a7" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.400Z", - "devdoc": { - "methods": { - "_acceptGov()": { - "details": "Gov function for pending gov to accept role and update gov", - "return": "uint 0=success, otherwise a failure (see ErrorReporter.sol for details)" - }, - "_setImplementation(address,bool,bytes)": { - "params": { - "allowResign": "Flag to indicate whether to call _resignImplementation on the old implementation", - "becomeImplementationData": "The encoded bytes data to be passed to _becomeImplementation", - "implementation_": "The address of the new implementation for delegation" - } - }, - "_setPendingGov(address)": { - "details": "Gov function to begin change of gov. The newPendingGov must call `_acceptGov` to finalize the transfer.", - "params": { - "newPendingGov": "New pending gov." - } - }, - "allowance(address,address)": { - "params": { - "owner": "The address of the account which owns the tokens to be spent", - "spender": "The address of the account which may transfer tokens" - }, - "return": "The number of tokens allowed to be spent (-1 means infinite)" - }, - "approve(address,uint256)": { - "details": "This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)", - "params": { - "amount": "The number of tokens that are approved (-1 means infinite)", - "spender": "The address of the account which may transfer tokens" - }, - "return": "Whether or not the approval succeeded" - }, - "balanceOf(address)": { - "params": { - "owner": "The address of the account to query" - }, - "return": "The number of tokens owned by `owner`" - }, - "balanceOfUnderlying(address)": { - "params": { - "owner": "The address of the account to query" - }, - "return": "The number of underlying tokens owned by `owner`" - }, - "constructor": { - "params": { - "becomeImplementationData": "The encoded args for becomeImplementation", - "decimals_": "ERC-20 decimal precision of this token", - "implementation_": "The address of the implementation the contract delegates to", - "initSupply_": "Initial token amount", - "name_": "ERC-20 name of this token", - "symbol_": "ERC-20 symbol of this token" - } - }, - "decreaseAllowance(address,uint256)": { - "details": "Decrease the amount of tokens that an owner has allowed to a spender.", - "params": { - "spender": "The address which will spend the funds.", - "subtractedValue": "The amount of tokens to decrease the allowance by." - } - }, - "delegateToImplementation(bytes)": { - "details": "It returns to the external caller whatever the implementation returns or forwards reverts", - "params": { - "data": "The raw data to delegatecall" - }, - "return": "The returned bytes from the delegatecall" - }, - "delegateToViewImplementation(bytes)": { - "details": "It returns to the external caller whatever the implementation returns or forwards reverts There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.", - "params": { - "data": "The raw data to delegatecall" - }, - "return": "The returned bytes from the delegatecall" - }, - "delegates(address)": { - "params": { - "delegator": "The address of the account which has designated a delegate" - }, - "return": "Address of delegatee" - }, - "increaseAllowance(address,uint256)": { - "details": "Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.", - "params": { - "addedValue": "The amount of tokens to increase the allowance by.", - "spender": "The address which will spend the funds." - } - }, - "initialize(string,string,uint8,address,uint256)": { - "params": { - "decimals_": "ERC-20 decimal precision of this token", - "name_": "ERC-20 name of this token", - "symbol_": "ERC-20 symbol of this token" - } - }, - "mint(address,uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "mintAmount": "The amount of the underlying asset to supply" - }, - "return": "uint 0=success, otherwise a failure (see ErrorReporter.sol for details)" - }, - "rebase(uint256,uint256,bool)": { - "details": "The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi" - }, - "transfer(address,uint256)": { - "params": { - "amount": "The number of tokens to transfer", - "dst": "The address of the destination account" - }, - "return": "Whether or not the transfer succeeded" - }, - "transferFrom(address,address,uint256)": { - "params": { - "amount": "The number of tokens to transfer", - "dst": "The address of the destination account", - "src": "The address of the source account" - }, - "return": "Whether or not the transfer succeeded" - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "Accepts transfer of gov rights. msg.sender must be pendingGov" - }, - "_setImplementation(address,bool,bytes)": { - "notice": "Called by the gov to update the implementation of the delegator" - }, - "_setPendingGov(address)": { - "notice": "Begins transfer of gov rights. The newPendingGov must call `_acceptGov` to finalize the transfer." - }, - "allowance(address,address)": { - "notice": "Get the current allowance from `owner` for `spender`" - }, - "approve(address,uint256)": { - "notice": "Approve `spender` to transfer up to `amount` from `src`" - }, - "balanceOf(address)": { - "notice": "Get the token balance of the `owner`" - }, - "balanceOfUnderlying(address)": { - "notice": "Currently unused. For future compatability" - }, - "constructor": "Construct a new YAM", - "delegateToImplementation(bytes)": { - "notice": "Delegates execution to the implementation contract" - }, - "delegateToViewImplementation(bytes)": { - "notice": "Delegates execution to an implementation contract" - }, - "delegates(address)": { - "notice": "Get the current allowance from `owner` for `spender`" - }, - "initialize(string,string,uint8,address,uint256)": { - "notice": "Initialize the new money market" - }, - "maxScalingFactor()": { - "notice": "Computes the current max scaling factor" - }, - "mint(address,uint256)": { - "notice": "Sender supplies assets into the market and receives cTokens in exchange" - }, - "rebase(uint256,uint256,bool)": { - "notice": "Initiates a new rebase operation, provided the minimum time period has elapsed." - }, - "transfer(address,uint256)": { - "notice": "Transfer `amount` tokens from `msg.sender` to `dst`" - }, - "transferFrom(address,address,uint256)": { - "notice": "Transfer `amount` tokens from `src` to `dst`" - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMDelegatorInterface.json b/build/contracts/YAMDelegatorInterface.json deleted file mode 100644 index 421119e..0000000 --- a/build/contracts/YAMDelegatorInterface.json +++ /dev/null @@ -1,2360 +0,0 @@ -{ - "contractName": "YAMDelegatorInterface", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"NewImplementation\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowResign\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"becomeImplementationData\",\"type\":\"bytes\"}],\"name\":\"_setImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_setImplementation(address,bool,bytes)\":{\"params\":{\"allowResign\":\"Flag to indicate whether to call _resignImplementation on the old implementation\",\"becomeImplementationData\":\"The encoded bytes data to be passed to _becomeImplementation\",\"implementation_\":\"The address of the new implementation for delegation\"}}}},\"userdoc\":{\"methods\":{\"_setImplementation(address,bool,bytes)\":{\"notice\":\"Called by the gov to update the implementation of the delegator\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":\"YAMDelegatorInterface\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":{\"keccak256\":\"0x37805294539ffc72da1145dce61bffee4437b329f5aee47e4ff3c24b805fb734\",\"urls\":[\"bzz-raw://13ffb729ad13edf89c0c21f4e01d66a58de29fc0741ac1a98b5f24be66f31fbd\",\"dweb:/ipfs/QmUvabJwLsrEYstkwbCB5gF1MPH2HuJvYrf2TDDb44MazA\"]},\"/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol\":{\"keccak256\":\"0x9d14e5bfa7dcce0163bcc40052326853f35743539b6c3e68ee2dc1a23af928d9\",\"urls\":[\"bzz-raw://84df0a04bf8024506121bb66ac8a67684e78f459629d99f5c9da24cdad2f6cb6\",\"dweb:/ipfs/QmcKKLn9SMBJQ7Emq3AwzZho8rpD8XLWazXYSD5Y2NnK2E\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity 0.5.17;\n\nimport \"./YAM.sol\";\n\ncontract YAMDelegationStorage {\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n}\n\ncontract YAMDelegatorInterface is YAMDelegationStorage {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the gov to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public;\n}\n\ncontract YAMDelegateInterface is YAMDelegationStorage {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n\n\ncontract YAMDelegate is YAM, YAMDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == gov, \"only the gov may call _resignImplementation\");\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMDelegate.sol", - "exportedSymbols": { - "YAMDelegate": [ - 17918 - ], - "YAMDelegateInterface": [ - 17863 - ], - "YAMDelegationStorage": [ - 17834 - ], - "YAMDelegatorInterface": [ - 17852 - ] - }, - "id": 17919, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:23" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "file": "./YAM.sol", - "id": 17831, - "nodeType": "ImportDirective", - "scope": 17919, - "sourceUnit": 17829, - "src": "25:19:23", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17834, - "linearizedBaseContracts": [ - 17834 - ], - "name": "YAMDelegationStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 17833, - "name": "implementation", - "nodeType": "VariableDeclaration", - "scope": 17834, - "src": "154:29:23", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17832, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "154:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "46:140:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17835, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "222:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17836, - "nodeType": "InheritanceSpecifier", - "src": "222:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17852, - "linearizedBaseContracts": [ - 17852, - 17834 - ], - "name": "YAMDelegatorInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice Emitted when implementation is changed", - "id": 17842, - "name": "NewImplementation", - "nodeType": "EventDefinition", - "parameters": { - "id": 17841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17838, - "indexed": false, - "name": "oldImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "343:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17837, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "343:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17840, - "indexed": false, - "name": "newImplementation", - "nodeType": "VariableDeclaration", - "scope": 17842, - "src": "370:25:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "370:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "342:54:23" - }, - "src": "319:78:23" - }, - { - "body": null, - "documentation": "@notice Called by the gov to update the implementation of the delegator\n@param implementation_ The address of the new implementation for delegation\n@param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n@param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation", - "id": 17851, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17844, - "name": "implementation_", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "816:23:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "816:7:23", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17846, - "name": "allowResign", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "841:16:23", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "841:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17848, - "name": "becomeImplementationData", - "nodeType": "VariableDeclaration", - "scope": 17851, - "src": "859:37:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17847, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "859:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:82:23" - }, - "returnParameters": { - "id": 17850, - "nodeType": "ParameterList", - "parameters": [], - "src": "904:0:23" - }, - "scope": 17852, - "src": "788:117:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "188:719:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17853, - "name": "YAMDelegationStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17834, - "src": "942:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegationStorage_$17834", - "typeString": "contract YAMDelegationStorage" - } - }, - "id": 17854, - "nodeType": "InheritanceSpecifier", - "src": "942:20:23" - } - ], - "contractDependencies": [ - 17834 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 17863, - "linearizedBaseContracts": [ - 17863, - 17834 - ], - "name": "YAMDelegateInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@dev Should revert if any issues arise which make it unfit for delegation\n@param data The encoded bytes data for any initialization", - "id": 17859, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17857, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17856, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17859, - "src": "1241:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17855, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1241:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1240:19:23" - }, - "returnParameters": { - "id": 17858, - "nodeType": "ParameterList", - "parameters": [], - "src": "1266:0:23" - }, - "scope": 17863, - "src": "1210:57:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17862, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17860, - "nodeType": "ParameterList", - "parameters": [], - "src": "1402:2:23" - }, - "returnParameters": { - "id": 17861, - "nodeType": "ParameterList", - "parameters": [], - "src": "1411:0:23" - }, - "scope": 17863, - "src": "1372:40:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17919, - "src": "909:505:23" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17864, - "name": "YAM", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17828, - "src": "1441:3:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$17828", - "typeString": "contract YAM" - } - }, - "id": 17865, - "nodeType": "InheritanceSpecifier", - "src": "1441:3:23" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17866, - "name": "YAMDelegateInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17863, - "src": "1446:20:23", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMDelegateInterface_$17863", - "typeString": "contract YAMDelegateInterface" - } - }, - "id": 17867, - "nodeType": "InheritanceSpecifier", - "src": "1446:20:23" - } - ], - "contractDependencies": [ - 17762, - 17828, - 17834, - 17863, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17918, - "linearizedBaseContracts": [ - 17918, - 17863, - 17834, - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMDelegate", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17870, - "nodeType": "Block", - "src": "1553:2:23", - "statements": [] - }, - "documentation": "@notice Construct an empty delegate", - "id": 17871, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17868, - "nodeType": "ParameterList", - "parameters": [], - "src": "1543:2:23" - }, - "returnParameters": { - "id": 17869, - "nodeType": "ParameterList", - "parameters": [], - "src": "1553:0:23" - }, - "scope": 17918, - "src": "1532:23:23", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17895, - "nodeType": "Block", - "src": "1778:278:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17876, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17873, - "src": "1823:4:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 17877, - "nodeType": "ExpressionStatement", - "src": "1823:4:23" - }, - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1907:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17886, - "nodeType": "IfStatement", - "src": "1903:63:23", - "trueBody": { - "id": 17885, - "nodeType": "Block", - "src": "1914:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17879, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "1928:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1953:1:23", - "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": 17880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1945:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1945:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1928:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17884, - "nodeType": "ExpressionStatement", - "src": "1928:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1984:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1984:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17890, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "1998:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1984:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6e", - "id": 17892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2003:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - }, - "value": "only the gov may call _becomeImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87685d43a4a716fc45a02db33f3087a46399d1c639f49af006d2840dd7715172", - "typeString": "literal_string \"only the gov may call _becomeImplementation\"" - } - ], - "id": 17887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1976:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1976:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17894, - "nodeType": "ExpressionStatement", - "src": "1976:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to initialize it for duty\n@param data The encoded bytes data for any initialization", - "id": 17896, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_becomeImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17874, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17873, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 17896, - "src": "1752:17:23", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 17872, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1752:5:23", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:19:23" - }, - "returnParameters": { - "id": 17875, - "nodeType": "ParameterList", - "parameters": [], - "src": "1778:0:23" - }, - "scope": 17918, - "src": "1721:335:23", - "stateMutability": "nonpayable", - "superFunction": 17859, - "visibility": "public" - }, - { - "body": { - "id": 17916, - "nodeType": "Block", - "src": "2201:228:23", - "statements": [ - { - "condition": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 17899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:5:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "falseBody": null, - "id": 17907, - "nodeType": "IfStatement", - "src": "2276:63:23", - "trueBody": { - "id": 17906, - "nodeType": "Block", - "src": "2287:52:23", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17900, - "name": "implementation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17833, - "src": "2301:14:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17902, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2326:1:23", - "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": 17901, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2318:7:23", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2301:27:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17905, - "nodeType": "ExpressionStatement", - "src": "2301:27:23" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "2357:3:23", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2357:10:23", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17911, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "2371:3:23", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2357:17:23", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792074686520676f76206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e", - "id": 17913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2376:45:23", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - }, - "value": "only the gov may call _resignImplementation" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_34becc511830092491b9ed5bc1b7ad636216495b19fac8d69f13bac5fa3b5329", - "typeString": "literal_string \"only the gov may call _resignImplementation\"" - } - ], - "id": 17908, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2349:7:23", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:73:23", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17915, - "nodeType": "ExpressionStatement", - "src": "2349:73:23" - } - ] - }, - "documentation": "@notice Called by the delegator on a delegate to forfeit its responsibility", - "id": 17917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_resignImplementation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17897, - "nodeType": "ParameterList", - "parameters": [], - "src": "2191:2:23" - }, - "returnParameters": { - "id": 17898, - "nodeType": "ParameterList", - "parameters": [], - "src": "2201:0:23" - }, - "scope": 17918, - "src": "2161:268:23", - "stateMutability": "nonpayable", - "superFunction": 17862, - "visibility": "public" - } - ], - "scope": 17919, - "src": "1417:1014:23" - } - ], - "src": "0:2432:23" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.454Z", - "devdoc": { - "methods": { - "_setImplementation(address,bool,bytes)": { - "params": { - "allowResign": "Flag to indicate whether to call _resignImplementation on the old implementation", - "becomeImplementationData": "The encoded bytes data to be passed to _becomeImplementation", - "implementation_": "The address of the new implementation for delegation" - } - } - } - }, - "userdoc": { - "methods": { - "_setImplementation(address,bool,bytes)": { - "notice": "Called by the gov to update the implementation of the delegator" - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMETHPool.json b/build/contracts/YAMETHPool.json deleted file mode 100644 index ea577f7..0000000 --- a/build/contracts/YAMETHPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMETHPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "weth", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMETHPool.sol\":\"YAMETHPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMETHPool.sol\":{\"keccak256\":\"0xa9a6ffb989fef0ac9ad13397fa93636d5c71430a930e0c8f70ed522b6bb401ac\",\"urls\":[\"bzz-raw://a420da896bb901695c1e2e29d59e414f2bec8ea638fe961312a18187c73c5b67\",\"dweb:/ipfs/QmbLAbV4nwFnDsgt2Xi6jVxd2KndtuP2vUz7uq7ZTxT8pQ\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b031990811673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc217825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e25780633fc8cef3146102ea57806370a08231146102f2578063715018a614610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b610232610bb8565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105b9565b610f7c610990565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158205180edd59fbddc469f357ae210c8e22f67cedd9c42106cfb71ae027fb5e382cb64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e25780633fc8cef3146102ea57806370a08231146102f2578063715018a614610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b610232610bb8565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105b9565b610f7c610990565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158205180edd59fbddc469f357ae210c8e22f67cedd9c42106cfb71ae027fb5e382cb64736f6c63430005110032", - "sourceMap": "22374:3901:3:-;;;21553:71;;;-1:-1:-1;;;;;;21553:71:3;;;21581:42;21553:71;;;22448:70;;;;;;22475:42;22448:70;;;22614:10;22587:37;;22668:31;;;;22705:29;;9510:12;-1:-1:-1;;;;;9510:10:3;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:3;-1:-1:-1;;;;;9501:21:3;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:3;;-1:-1:-1;;9537:40:3;22374:3901;;8448:96;8527:10;8448:96;:::o;22374:3901::-;;;;;;;", - "deployedSourceMap": "22374:3901:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22374:3901:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24125:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24125:259:3;;;;:::i;:::-;;;;;;;;;;;;;;;;22879:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22879:42:3;;;;:::i;22448:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:3;;;;:::i;:::-;;20906:33;;;:::i;21717:89::-;;;:::i;22524:41::-;;;:::i;24676:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24676:210:3;;:::i;25441:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25441:832:3;;:::i;24992:443::-;;;:::i;21553:71::-;;;:::i;21812:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21812:108:3;;;;:::i;10445:137::-;;;:::i;22705:29::-;;;:::i;23576:129::-;;;:::i;22816:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22816:57:3;;;;:::i;22587:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;24472:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24472:198:3;;:::i;22740:29::-;;;:::i;23711:408::-;;;:::i;22775:35::-;;;:::i;24892:94::-;;;:::i;22668:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:3;;;;:::i;24125:259::-;24360:16;;;24179:7;24360:16;;;:7;:16;;;;;;;;;24278:22;:31;;;;;;24217:160;;24360:16;24217:121;;24333:4;;24217:94;;24257:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24217:18;24227:7;24217:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24198:179;24125:259;-1:-1:-1;;24125:259:3:o;22879:42::-;;;;;;;;;;;;;:::o;22448:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21717:89::-;21787:12;;21717:89;;:::o;22524:41::-;22559:6;22524:41;:::o;24676:210::-;24730:10;23320:16;:14;:16::i;:::-;23297:20;:39;23363:26;:24;:26::i;:::-;23346:14;:43;23403:21;;;;23399:154;;23459:15;23466:7;23459:6;:15::i;:::-;23440:16;;;;;;;:7;:16;;;;;;;;:34;;;;23522:20;;23488:22;:31;;;;;;:54;23399:154;23202:9;;23183:15;:28;;23175:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24780:1;24771:6;:10;24763:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24813:22;24828:6;24813:14;:22::i;:::-;24850:29;;;;;;;;24860:10;;24850:29;;;;;;;;;;24676:210;;:::o;25441:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25562:1;23320:16;:14;:16::i;:::-;23297:20;:39;23363:26;:24;:26::i;:::-;23346:14;:43;23403:21;;;;23399:154;;23459:15;23466:7;23459:6;:15::i;:::-;23440:16;;;;;;;:7;:16;;;;;;;;:34;;;;23522:20;;23488:22;:31;;;;;;:54;23399:154;25602:9;;25584:15;:27;25580:687;;;25648:12;;25629:15;:31;25625:310;;25691:20;:6;22559;25691:20;:10;:20;:::i;:::-;25678:10;:33;25625:310;;;25766:12;;25746:17;;25766:33;;25783:15;25766:33;:16;:33;:::i;:::-;25746:53;;25815:16;25834:25;25848:10;;25834:9;:13;;:25;;;;:::i;:::-;25815:44;-1:-1:-1;25888:34:3;22559:6;25888:20;:6;25815:44;25888:20;:10;:20;:::i;:34::-;25875:10;:47;-1:-1:-1;;25625:310:3;25963:15;25946:14;:32;;;26005:29;;22559:6;26005:29;:19;:29;:::i;:::-;25990:12;:44;26051:19;;;;;;;;;;;;;;;;;25580:687;;;26112:20;:6;22559;26112:20;:10;:20;:::i;:::-;26099:10;:33;26161:9;;26144:14;:26;;;26197:23;;22559:6;26197:23;:13;:23;:::i;:::-;26182:12;:38;26237:19;;;;;;;;;;;;;;;;;25580:687;21139:1;25441:832;:::o;24992:443::-;25033:10;23320:16;:14;:16::i;:::-;23297:20;:39;23363:26;:24;:26::i;:::-;23346:14;:43;23403:21;;;;23399:154;;23459:15;23466:7;23459:6;:15::i;:::-;23440:16;;;;;;;:7;:16;;;;;;;;:34;;;;23522:20;;23488:22;:31;;;;;;:54;23399:154;23202:9;;23183:15;:28;;23175:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25066:14;25083:18;25090:10;25083:6;:18::i;:::-;25066:35;-1:-1:-1;25115:10:3;;25111:318;;25149:10;25163:1;25141:19;;;:7;:19;;;;;;;;:23;;;25214:3;;25202:37;;;;;;;25141:19;25214:3;;;;25202:35;;:37;;;;;;;;;;;25163:1;25214:3;25202:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25202:37:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25202:37:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25202:37:3;;-1:-1:-1;25253:18:3;25274:37;25304:6;25274:25;:6;25202:37;25274:25;:10;:25;:::i;:37::-;25325:3;;25253:58;;-1:-1:-1;25325:40:3;;:3;;25342:10;25253:58;25325:40;:16;:40;:::i;:::-;25384:34;;;;;;;;25395:10;;25384:34;;;;;;;;;;25111:318;;23234:1;24992:443;:::o;21553:71::-;;;;;;:::o;21812:108::-;21895:18;;21869:7;21895:18;;;:9;:18;;;;;;;21812:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22705:29::-;;;;:::o;23576:129::-;23633:7;23659:39;23668:15;23685:12;;23659:8;:39::i;:::-;23652:46;;23576:129;:::o;22816:57::-;;;;;;;;;;;;;:::o;22587:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;24472:198::-;24523:10;23320:16;:14;:16::i;:::-;23297:20;:39;23363:26;:24;:26::i;:::-;23346:14;:43;23403:21;;;;23399:154;;23459:15;23466:7;23459:6;:15::i;:::-;23440:16;;;;;;;:7;:16;;;;;;;;:34;;;;23522:20;;23488:22;:31;;;;;;:54;23399:154;23202:9;;23183:15;:28;;23175:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24573:1;24564:6;:10;24556:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24603:19;24615:6;24603:11;:19::i;:::-;24637:26;;;;;;;;24644:10;;24637:26;;;;;;;;;;24472:198;;:::o;22740:29::-;;;;:::o;23711:408::-;23758:7;23781:13;:11;:13::i;:::-;23777:76;;-1:-1:-1;23822:20:3;;23815:27;;23777:76;23881:231;23923:175;24084:13;:11;:13::i;:::-;23923:135;24053:4;23923:104;24016:10;;23923:67;23975:14;;23923:26;:24;:26::i;:175::-;23881:20;;;:231;:24;:231;:::i;22775:35::-;;;;:::o;24892:94::-;24927:31;24936:21;24946:10;24936:9;:21::i;:::-;24927:8;:31::i;:::-;24968:11;:9;:11::i;:::-;24892:94::o;22668:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:3:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:3;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22159:211;22225:12;;:24;;22242:6;22225:24;:16;:24;:::i;:::-;22210:12;:39;22293:10;22283:21;;;;:9;:21;;;;;;:33;;22309:6;22283:33;:25;:33;:::i;:::-;22269:10;22259:21;;;;:9;:21;;;;;:57;;;;22326:4;;:37;;22259:21;22326:4;;;;22356:6;22326:17;:37::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:3;;;;;;;;25:18:-1;;61:17;;17776:58:3;182:15:-1;17799:23:3;179:29:-1;160:49;;17750:85:3;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:3;;1848:104;-1:-1:-1;1848:104:3:o;21926:227::-;21989:12;;:24;;22006:6;21989:24;:16;:24;:::i;:::-;21974:12;:39;22057:10;22047:21;;;;:9;:21;;;;;;:33;;22073:6;22047:33;:25;:33;:::i;:::-;22033:10;22023:21;;;;:9;:21;;;;;:57;;;;22090:4;;:56;;22023:21;22090:4;;;;22132;22139:6;22090:21;:56::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:3;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:3;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:3:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:3;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:3;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:3;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:3;;;;;;;;25:18:-1;;61:17;;17974:68:3;182:15:-1;17997:27:3;179:29:-1;160:49;;17948:95:3;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:3:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public weth = IERC20(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n weth.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n weth.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMETHPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart() {\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMETHPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMETHPool.sol", - "exportedSymbols": { - "Address": [ - 3213 - ], - "Context": [ - 2959 - ], - "IERC20": [ - 3139 - ], - "IRewardDistributionRecipient": [ - 3464 - ], - "LPTokenWrapper": [ - 3580 - ], - "Math": [ - 2747 - ], - "Ownable": [ - 3071 - ], - "SafeERC20": [ - 3429 - ], - "SafeMath": [ - 2933 - ], - "YAM": [ - 3471 - ], - "YAMETHPool": [ - 3999 - ] - }, - "id": 4000, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2680, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 2747, - "linearizedBaseContracts": [ - 2747 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2696, - "nodeType": "Block", - "src": "1739:38:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2689, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "1756:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2690, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2684, - "src": "1761:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 2693, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2684, - "src": "1769:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:3", - "trueExpression": { - "argumentTypes": null, - "id": 2692, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "1765:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2688, - "id": 2695, - "nodeType": "Return", - "src": "1749:21:3" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 2697, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2682, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2697, - "src": "1685:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2681, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2684, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2697, - "src": "1696:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:3" - }, - "returnParameters": { - "id": 2688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2687, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2697, - "src": "1730:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:3" - }, - "scope": 2747, - "src": "1672:105:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2713, - "nodeType": "Block", - "src": "1915:37:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2706, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2699, - "src": "1932:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 2707, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2701, - "src": "1936:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 2710, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2701, - "src": "1944:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:3", - "trueExpression": { - "argumentTypes": null, - "id": 2709, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2699, - "src": "1940:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2705, - "id": 2712, - "nodeType": "Return", - "src": "1925:20:3" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 2714, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2702, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2699, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2714, - "src": "1861:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2698, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2701, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2714, - "src": "1872:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2700, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:3" - }, - "returnParameters": { - "id": 2705, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2704, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2714, - "src": "1906:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2703, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:3" - }, - "scope": 2747, - "src": "1848:104:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2745, - "nodeType": "Block", - "src": "2136:119:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2723, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "2208:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2726, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2727, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2718, - "src": "2218:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2728, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2730, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2732, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "2229:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2735, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2718, - "src": "2237:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2739, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2740, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2742, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2722, - "id": 2744, - "nodeType": "Return", - "src": "2200:48:3" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 2746, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2719, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2716, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "2082:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2715, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2718, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "2093:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2717, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:3" - }, - "returnParameters": { - "id": 2722, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2721, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "2127:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2720, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:3" - }, - "scope": 2747, - "src": "2065:190:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "1589:668:3" - }, - { - "id": 2748, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 2933, - "linearizedBaseContracts": [ - 2933 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2772, - "nodeType": "Block", - "src": "3212:109:3", - "statements": [ - { - "assignments": [ - 2758 - ], - "declarations": [ - { - "constant": false, - "id": 2758, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2772, - "src": "3222:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2757, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2762, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2759, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2750, - "src": "3234:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 2760, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2752, - "src": "3238:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2764, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2758, - "src": "3257:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2765, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2750, - "src": "3262:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 2767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 2763, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2769, - "nodeType": "ExpressionStatement", - "src": "3249:46:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2770, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2758, - "src": "3313:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2756, - "id": 2771, - "nodeType": "Return", - "src": "3306:8:3" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 2773, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2753, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2750, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2773, - "src": "3158:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2749, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2752, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2773, - "src": "3169:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2751, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:3" - }, - "returnParameters": { - "id": 2756, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2755, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2773, - "src": "3203:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2754, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:3" - }, - "scope": 2933, - "src": "3145:176:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2788, - "nodeType": "Block", - "src": "3652:67:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2783, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2775, - "src": "3673:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2784, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2777, - "src": "3676:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 2785, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 2782, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2789, - 2816 - ], - "referencedDeclaration": 2816, - "src": "3669:3:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2781, - "id": 2787, - "nodeType": "Return", - "src": "3662:50:3" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 2789, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2778, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2775, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2789, - "src": "3598:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2774, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2777, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2789, - "src": "3609:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2776, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:3" - }, - "returnParameters": { - "id": 2781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2780, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2789, - "src": "3643:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2779, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:3" - }, - "scope": 2933, - "src": "3585:134:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2815, - "nodeType": "Block", - "src": "4138:92:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2801, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2793, - "src": "4156:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2802, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2791, - "src": "4161:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2804, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2795, - "src": "4164:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2800, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2806, - "nodeType": "ExpressionStatement", - "src": "4148:29:3" - }, - { - "assignments": [ - 2808 - ], - "declarations": [ - { - "constant": false, - "id": 2808, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2815, - "src": "4187:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2807, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2812, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2809, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2791, - "src": "4199:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 2810, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2793, - "src": "4203:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2813, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2808, - "src": "4222:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2799, - "id": 2814, - "nodeType": "Return", - "src": "4215:8:3" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 2816, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2796, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2791, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4056:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2790, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2793, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4067:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2792, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2795, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4078:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2794, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:3" - }, - "returnParameters": { - "id": 2799, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2798, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4129:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2797, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:3" - }, - "scope": 2933, - "src": "4043:187:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2849, - "nodeType": "Block", - "src": "4537:392:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2825, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "4769:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2831, - "nodeType": "IfStatement", - "src": "4765:45:3", - "trueBody": { - "id": 2830, - "nodeType": "Block", - "src": "4777:33:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2828, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 2824, - "id": 2829, - "nodeType": "Return", - "src": "4791:8:3" - } - ] - } - }, - { - "assignments": [ - 2833 - ], - "declarations": [ - { - "constant": false, - "id": 2833, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2849, - "src": "4820:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2832, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2837, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2834, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "4832:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 2835, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2820, - "src": "4836:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2839, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2833, - "src": "4855:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2840, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "4859:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2842, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2820, - "src": "4864:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 2844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 2838, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2846, - "nodeType": "ExpressionStatement", - "src": "4847:56:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2847, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2833, - "src": "4921:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2824, - "id": 2848, - "nodeType": "Return", - "src": "4914:8:3" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 2850, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2821, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2818, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2850, - "src": "4483:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2817, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2820, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2850, - "src": "4494:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2819, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:3" - }, - "returnParameters": { - "id": 2824, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2823, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2850, - "src": "4528:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2822, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:3" - }, - "scope": 2933, - "src": "4470:459:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2865, - "nodeType": "Block", - "src": "5451:63:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2860, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "5472:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2861, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2854, - "src": "5475:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 2862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 2859, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2866, - 2893 - ], - "referencedDeclaration": 2893, - "src": "5468:3:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2858, - "id": 2864, - "nodeType": "Return", - "src": "5461:46:3" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 2866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2855, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2852, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2866, - "src": "5397:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2851, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2854, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2866, - "src": "5408:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2853, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:3" - }, - "returnParameters": { - "id": 2858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2857, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2866, - "src": "5442:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2856, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:3" - }, - "scope": 2933, - "src": "5384:130:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2892, - "nodeType": "Block", - "src": "6124:243:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2878, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "6208:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2881, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2872, - "src": "6215:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2877, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2883, - "nodeType": "ExpressionStatement", - "src": "6200:28:3" - }, - { - "assignments": [ - 2885 - ], - "declarations": [ - { - "constant": false, - "id": 2885, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2892, - "src": "6238:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2884, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2889, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2886, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2868, - "src": "6250:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2887, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "6254:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2890, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2885, - "src": "6359:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2876, - "id": 2891, - "nodeType": "Return", - "src": "6352:8:3" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 2893, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2873, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2868, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6042:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2870, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6053:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2869, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2872, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6064:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2871, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:3" - }, - "returnParameters": { - "id": 2876, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2875, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6115:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2874, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:3" - }, - "scope": 2933, - "src": "6029:338:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2908, - "nodeType": "Block", - "src": "6878:61:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2903, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "6899:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2904, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2897, - "src": "6902:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 2905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 2902, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2909, - 2932 - ], - "referencedDeclaration": 2932, - "src": "6895:3:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2901, - "id": 2907, - "nodeType": "Return", - "src": "6888:44:3" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 2909, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2898, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2895, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2909, - "src": "6824:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2894, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2897, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2909, - "src": "6835:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2896, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:3" - }, - "returnParameters": { - "id": 2901, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2900, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2909, - "src": "6869:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2899, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:3" - }, - "scope": 2933, - "src": "6811:128:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2931, - "nodeType": "Block", - "src": "7538:68:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2921, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2913, - "src": "7556:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2924, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2915, - "src": "7564:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2920, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2926, - "nodeType": "ExpressionStatement", - "src": "7548:29:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2927, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2911, - "src": "7594:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 2928, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2913, - "src": "7598:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2919, - "id": 2930, - "nodeType": "Return", - "src": "7587:12:3" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 2932, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2916, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2911, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7456:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2913, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7467:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2912, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2915, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7478:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2914, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:3" - }, - "returnParameters": { - "id": 2919, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2918, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7529:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:3" - }, - "scope": 2933, - "src": "7443:163:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "2900:4708:3" - }, - { - "id": 2934, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2959, - "linearizedBaseContracts": [ - 2959 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2937, - "nodeType": "Block", - "src": "8386:3:3", - "statements": [] - }, - "documentation": null, - "id": 2938, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2935, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:3" - }, - "returnParameters": { - "id": 2936, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:3" - }, - "scope": 2959, - "src": "8362:27:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2946, - "nodeType": "Block", - "src": "8510:34:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2943, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 2942, - "id": 2945, - "nodeType": "Return", - "src": "8520:17:3" - } - ] - }, - "documentation": null, - "id": 2947, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2939, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:3" - }, - "returnParameters": { - "id": 2942, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2941, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2947, - "src": "8493:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 2940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:3", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:3" - }, - "scope": 2959, - "src": "8448:96:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2957, - "nodeType": "Block", - "src": "8607:165:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2952, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19307, - "src": "8617:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$2959", - "typeString": "contract Context" - } - }, - "id": 2953, - "nodeType": "ExpressionStatement", - "src": "8617:4:3" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2954, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 2951, - "id": 2956, - "nodeType": "Return", - "src": "8750:15:3" - } - ] - }, - "documentation": null, - "id": 2958, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2948, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:3" - }, - "returnParameters": { - "id": 2951, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2950, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2958, - "src": "8593:12:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2949, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:3" - }, - "scope": 2959, - "src": "8550:222:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "8185:589:3" - }, - { - "id": 2960, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:3" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2961, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2959, - "src": "9238:7:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$2959", - "typeString": "contract Context" - } - }, - "id": 2962, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:3" - } - ], - "contractDependencies": [ - 2959 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 3071, - "linearizedBaseContracts": [ - 3071, - 2959 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2964, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 3071, - "src": "9252:22:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2963, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 2970, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 2969, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2966, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "9308:29:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2965, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2968, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "9339:24:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2967, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:3" - }, - "src": "9281:84:3" - }, - { - "body": { - "id": 2985, - "nodeType": "Block", - "src": "9491:93:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2973, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "9501:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2974, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "9510:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2977, - "nodeType": "ExpressionStatement", - "src": "9501:21:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2980, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:3", - "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": 2979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2982, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "9570:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2978, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "9537:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 2983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2984, - "nodeType": "EmitStatement", - "src": "9532:45:3" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 2986, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2971, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:3" - }, - "returnParameters": { - "id": 2972, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:3" - }, - "scope": 3071, - "src": "9467:117:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2993, - "nodeType": "Block", - "src": "9707:30:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2991, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "9724:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2990, - "id": 2992, - "nodeType": "Return", - "src": "9717:13:3" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 2994, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2987, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:3" - }, - "returnParameters": { - "id": 2990, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2989, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2994, - "src": "9698:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:3" - }, - "scope": 3071, - "src": "9660:77:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3003, - "nodeType": "Block", - "src": "9846:82:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2997, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3015, - "src": "9864:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 2998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 2999, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 2996, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3001, - "nodeType": "ExpressionStatement", - "src": "9856:54:3" - }, - { - "id": 3002, - "nodeType": "PlaceholderStatement", - "src": "9920:1:3" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 3004, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2995, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:3" - }, - "src": "9825:103:3", - "visibility": "internal" - }, - { - "body": { - "id": 3014, - "nodeType": "Block", - "src": "10057:46:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3009, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "10074:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 3010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 3011, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "10090:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3008, - "id": 3013, - "nodeType": "Return", - "src": "10067:29:3" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 3015, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3005, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:3" - }, - "returnParameters": { - "id": 3008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3007, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3015, - "src": "10051:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3006, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:3" - }, - "scope": 3071, - "src": "10011:92:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3033, - "nodeType": "Block", - "src": "10491:91:3", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3021, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "10527:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3023, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:3", - "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": 3022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3020, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "10506:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 3025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3026, - "nodeType": "EmitStatement", - "src": "10501:45:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3027, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "10556:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:3", - "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": 3028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3032, - "nodeType": "ExpressionStatement", - "src": "10556:19:3" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 3034, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3018, - "modifierName": { - "argumentTypes": null, - "id": 3017, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "10481:9:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:3" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3016, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:3" - }, - "returnParameters": { - "id": 3019, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:3" - }, - "scope": 3071, - "src": "10445:137:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3045, - "nodeType": "Block", - "src": "10793:45:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3042, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "10822:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3041, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "10803:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 3043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3044, - "nodeType": "ExpressionStatement", - "src": "10803:28:3" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 3046, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3039, - "modifierName": { - "argumentTypes": null, - "id": 3038, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "10783:9:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:3" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3037, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3036, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "10758:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3035, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:3" - }, - "returnParameters": { - "id": 3040, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:3" - }, - "scope": 3071, - "src": "10731:107:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3069, - "nodeType": "Block", - "src": "10994:170:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3056, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3052, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "11012:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3054, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:3", - "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": 3053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3055, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 3057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 3051, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3059, - "nodeType": "ExpressionStatement", - "src": "11004:73:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3061, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "11113:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3062, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "11121:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3060, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "11092:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 3063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3064, - "nodeType": "EmitStatement", - "src": "11087:43:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3065, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "11140:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3066, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "11149:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3068, - "nodeType": "ExpressionStatement", - "src": "11140:17:3" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 3070, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3049, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3048, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 3070, - "src": "10967:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3047, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:3" - }, - "returnParameters": { - "id": 3050, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:3" - }, - "scope": 3071, - "src": "10939:225:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "9218:1948:3" - }, - { - "id": 3072, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 3139, - "linearizedBaseContracts": [ - 3139 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 3077, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3073, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:3" - }, - "returnParameters": { - "id": 3076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3075, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3077, - "src": "11541:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3074, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:3" - }, - "scope": 3139, - "src": "11495:55:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 3084, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3080, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3079, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3084, - "src": "11652:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3078, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:3" - }, - "returnParameters": { - "id": 3083, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3082, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3084, - "src": "11692:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3081, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:3" - }, - "scope": 3139, - "src": "11633:68:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 3093, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3089, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3086, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 3093, - "src": "11939:17:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3088, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3093, - "src": "11958:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3087, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:3" - }, - "returnParameters": { - "id": 3092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3091, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3093, - "src": "11992:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3090, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:3" - }, - "scope": 3139, - "src": "11921:77:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 3102, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3095, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 3102, - "src": "12292:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3097, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3102, - "src": "12307:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3096, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:3" - }, - "returnParameters": { - "id": 3101, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3100, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3102, - "src": "12347:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3099, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:3" - }, - "scope": 3139, - "src": "12273:83:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 3111, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3104, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "13026:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3103, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3106, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "13043:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:3" - }, - "returnParameters": { - "id": 3110, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3109, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "13077:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3108, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:3" - }, - "scope": 3139, - "src": "13009:74:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 3122, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3118, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3113, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13412:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3112, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3115, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13428:17:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3114, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3117, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13447:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3116, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:3" - }, - "returnParameters": { - "id": 3121, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3120, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13481:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3119, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:3" - }, - "scope": 3139, - "src": "13390:97:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 3130, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 3129, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3124, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3130, - "src": "13671:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3126, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3130, - "src": "13693:18:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3125, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3128, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3130, - "src": "13713:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3127, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:3" - }, - "src": "13656:72:3" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 3138, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 3137, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3132, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 3138, - "src": "13902:21:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3131, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3134, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3138, - "src": "13925:23:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3133, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3136, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3138, - "src": "13950:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3135, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:3" - }, - "src": "13887:78:3" - } - ], - "scope": 4000, - "src": "11401:2566:3" - }, - { - "id": 3140, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 3213, - "linearizedBaseContracts": [ - 3213 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 3164, - "nodeType": "Block", - "src": "14644:731:3", - "statements": [ - { - "assignments": [ - 3148 - ], - "declarations": [ - { - "constant": false, - "id": 3148, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 3164, - "src": "15083:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3147, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3149, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:3" - }, - { - "assignments": [ - 3151 - ], - "declarations": [ - { - "constant": false, - "id": 3151, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 3164, - "src": "15109:19:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3150, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3153, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 3152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:3" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 3148, - "isOffset": false, - "isSlot": false, - "src": "15274:8:3", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 3142, - "isOffset": false, - "isSlot": false, - "src": "15298:7:3", - "valueSize": 1 - } - } - ], - "id": 3154, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:3" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 3157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3155, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "15325:8:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 3160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3158, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "15344:8:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 3159, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3151, - "src": "15356:11:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3162, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3146, - "id": 3163, - "nodeType": "Return", - "src": "15317:51:3" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 3165, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3143, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3142, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3165, - "src": "14598:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3141, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:3" - }, - "returnParameters": { - "id": 3146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3145, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3165, - "src": "14638:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3144, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:3" - }, - "scope": 3213, - "src": "14578:797:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3178, - "nodeType": "Block", - "src": "15660:49:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3174, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "15693:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3173, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 3175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 3172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 3171, - "id": 3177, - "nodeType": "Return", - "src": "15670:32:3" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 3179, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3168, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3167, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3179, - "src": "15603:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:3" - }, - "returnParameters": { - "id": 3171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3170, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3179, - "src": "15643:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 3169, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:3", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:3" - }, - "scope": 3213, - "src": "15584:125:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3211, - "nodeType": "Block", - "src": "16737:294:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3188, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19313, - "src": "16763:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3213", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$3213", - "typeString": "library Address" - } - ], - "id": 3187, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3191, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "16780:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 3193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 3186, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3195, - "nodeType": "ExpressionStatement", - "src": "16747:73:3" - }, - { - "assignments": [ - 3197, - null - ], - "declarations": [ - { - "constant": false, - "id": 3197, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3211, - "src": "16886:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3196, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 3205, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 3203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 3201, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "16925:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3198, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3181, - "src": "16904:9:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 3199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 3202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:3", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3207, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3197, - "src": "16954:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 3208, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 3206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3210, - "nodeType": "ExpressionStatement", - "src": "16946:78:3" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 3212, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3184, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3181, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 3212, - "src": "16685:25:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 3180, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:3", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3183, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3212, - "src": "16712:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:3" - }, - "returnParameters": { - "id": 3185, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:3" - }, - "scope": 3213, - "src": "16666:365:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "14114:2919:3" - }, - { - "id": 3214, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 3429, - "linearizedBaseContracts": [ - 3429 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 3217, - "libraryName": { - "contractScope": null, - "id": 3215, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "17610:8:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2933", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:3", - "typeName": { - "id": 3216, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 3220, - "libraryName": { - "contractScope": null, - "id": 3218, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3213, - "src": "17642:7:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3213", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:3", - "typeName": { - "id": 3219, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 3241, - "nodeType": "Block", - "src": "17740:102:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3230, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "17769:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3233, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "17799:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3093, - "src": "17799:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3236, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3224, - "src": "17824:2:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3237, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3226, - "src": "17828:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3231, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3229, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "17750:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3240, - "nodeType": "ExpressionStatement", - "src": "17750:85:3" - } - ] - }, - "documentation": null, - "id": 3242, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3222, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3242, - "src": "17690:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3221, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "17690:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3224, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3242, - "src": "17704:10:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3223, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3226, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3242, - "src": "17716:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:3" - }, - "returnParameters": { - "id": 3228, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:3" - }, - "scope": 3429, - "src": "17668:174:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3266, - "nodeType": "Block", - "src": "17938:112:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3254, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "17967:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3257, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "17997:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3122, - "src": "17997:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 3259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3260, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "18026:4:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3261, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3248, - "src": "18032:2:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3262, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3250, - "src": "18036:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3255, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3253, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "17948:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3265, - "nodeType": "ExpressionStatement", - "src": "17948:95:3" - } - ] - }, - "documentation": null, - "id": 3267, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3244, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17874:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3243, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "17874:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3246, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17888:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3245, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3248, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17902:10:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3250, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17914:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:3" - }, - "returnParameters": { - "id": 3252, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:3" - }, - "scope": 3429, - "src": "17848:202:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3307, - "nodeType": "Block", - "src": "18132:536:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3277, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3273, - "src": "18421:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3280, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3284, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19315, - "src": "18461:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - ], - "id": 3283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3286, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3271, - "src": "18468:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3281, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3269, - "src": "18437:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3102, - "src": "18437:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3288, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3290, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 3292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 3276, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3294, - "nodeType": "ExpressionStatement", - "src": "18412:150:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3296, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3269, - "src": "18591:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3299, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3269, - "src": "18621:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3111, - "src": "18621:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3302, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3271, - "src": "18645:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3303, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3273, - "src": "18654:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3297, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3298, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3295, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "18572:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3306, - "nodeType": "ExpressionStatement", - "src": "18572:89:3" - } - ] - }, - "documentation": null, - "id": 3308, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3269, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3308, - "src": "18077:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3268, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "18077:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3271, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3308, - "src": "18091:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3270, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3273, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3308, - "src": "18108:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:3" - }, - "returnParameters": { - "id": 3275, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:3" - }, - "scope": 3429, - "src": "18056:612:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3342, - "nodeType": "Block", - "src": "18760:196:3", - "statements": [ - { - "assignments": [ - 3318 - ], - "declarations": [ - { - "constant": false, - "id": 3318, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 3342, - "src": "18770:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3329, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3327, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3314, - "src": "18837:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3322, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19315, - "src": "18817:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - ], - "id": 3321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3324, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3312, - "src": "18824:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3319, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3310, - "src": "18793:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3102, - "src": "18793:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "18793:43:3", - "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": 3328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3331, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3310, - "src": "18872:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3334, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3310, - "src": "18902:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3111, - "src": "18902:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3337, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3312, - "src": "18926:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3338, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3318, - "src": "18935:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3332, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3330, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "18853:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3341, - "nodeType": "ExpressionStatement", - "src": "18853:96:3" - } - ] - }, - "documentation": null, - "id": 3343, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3310, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3343, - "src": "18705:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3309, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "18705:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3312, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3343, - "src": "18719:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3314, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3343, - "src": "18736:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:3" - }, - "returnParameters": { - "id": 3316, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:3" - }, - "scope": 3429, - "src": "18674:282:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3378, - "nodeType": "Block", - "src": "19048:241:3", - "statements": [ - { - "assignments": [ - 3353 - ], - "declarations": [ - { - "constant": false, - "id": 3353, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 3378, - "src": "19058:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3365, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3362, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3349, - "src": "19125:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 3363, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3357, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19315, - "src": "19105:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - ], - "id": 3356, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3359, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3347, - "src": "19112:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3354, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3345, - "src": "19081:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3102, - "src": "19081:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2816, - "src": "19081:43:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 3364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3367, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3345, - "src": "19205:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3370, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3345, - "src": "19235:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3111, - "src": "19235:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3373, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3347, - "src": "19259:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3374, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "19268:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3368, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3366, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "19186:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3377, - "nodeType": "ExpressionStatement", - "src": "19186:96:3" - } - ] - }, - "documentation": null, - "id": 3379, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3350, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3345, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3379, - "src": "18993:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3344, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "18993:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3347, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3379, - "src": "19007:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3349, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3379, - "src": "19024:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3348, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:3" - }, - "returnParameters": { - "id": 3351, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:3" - }, - "scope": 3429, - "src": "18962:327:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3427, - "nodeType": "Block", - "src": "19741:1026:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3388, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3381, - "src": "20275:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - ], - "id": 3387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 3165, - "src": "20267:25:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 3392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 3386, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3394, - "nodeType": "ExpressionStatement", - "src": "20259:71:3" - }, - { - "assignments": [ - 3396, - 3398 - ], - "declarations": [ - { - "constant": false, - "id": 3396, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3427, - "src": "20401:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3395, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3398, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 3427, - "src": "20415:23:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3397, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3405, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3403, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3383, - "src": "20462:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3400, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3381, - "src": "20450:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - ], - "id": 3399, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:3", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3407, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3396, - "src": "20485:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 3408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 3406, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3410, - "nodeType": "ExpressionStatement", - "src": "20477:52:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3411, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3398, - "src": "20544:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 3412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3413, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3426, - "nodeType": "IfStatement", - "src": "20540:221:3", - "trueBody": { - "id": 3425, - "nodeType": "Block", - "src": "20567:194:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3418, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3398, - "src": "20684:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 3419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 3420, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 3416, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 3421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 3422, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 3415, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3424, - "nodeType": "ExpressionStatement", - "src": "20665:85:3" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 3428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3384, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3381, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3428, - "src": "19700:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3380, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "19700:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3383, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3428, - "src": "19714:17:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3382, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:3" - }, - "returnParameters": { - "id": 3385, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:3" - }, - "scope": 3429, - "src": "19672:1095:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 4000, - "src": "17580:3189:3" - }, - { - "id": 3430, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:3" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3431, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3071, - "src": "20892:7:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$3071", - "typeString": "contract Ownable" - } - }, - "id": 3432, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:3" - } - ], - "contractDependencies": [ - 2959, - 3071 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 3464, - "linearizedBaseContracts": [ - 3464, - 3071, - 2959 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3434, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 3464, - "src": "20906:33:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3433, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 3439, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3436, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3439, - "src": "20974:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:3" - }, - "returnParameters": { - "id": 3438, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:3" - }, - "scope": 3464, - "src": "20946:53:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 3450, - "nodeType": "Block", - "src": "21039:108:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3442, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "21057:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 3443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 3444, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3434, - "src": "21073:18:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 3446, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 3441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3448, - "nodeType": "ExpressionStatement", - "src": "21049:80:3" - }, - { - "id": 3449, - "nodeType": "PlaceholderStatement", - "src": "21139:1:3" - } - ] - }, - "documentation": null, - "id": 3451, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 3440, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:3" - }, - "src": "21005:142:3", - "visibility": "internal" - }, - { - "body": { - "id": 3462, - "nodeType": "Block", - "src": "21252:57:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3458, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3434, - "src": "21262:18:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3459, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3453, - "src": "21283:19:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3461, - "nodeType": "ExpressionStatement", - "src": "21262:40:3" - } - ] - }, - "documentation": null, - "id": 3463, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3456, - "modifierName": { - "argumentTypes": null, - "id": 3455, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "21238:9:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:3" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3454, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3453, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 3463, - "src": "21184:27:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3452, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:3" - }, - "returnParameters": { - "id": 3457, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:3" - }, - "scope": 3464, - "src": "21153:156:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 4000, - "src": "20851:460:3" - }, - { - "id": 3465, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 3471, - "linearizedBaseContracts": [ - 3471 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 3470, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3466, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:3" - }, - "returnParameters": { - "id": 3469, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3468, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3470, - "src": "21443:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3467, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:3" - }, - "scope": 3471, - "src": "21396:56:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 4000, - "src": "21376:78:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3580, - "linearizedBaseContracts": [ - 3580 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 3474, - "libraryName": { - "contractScope": null, - "id": 3472, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "21494:8:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2933", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:3", - "typeName": { - "id": 3473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 3477, - "libraryName": { - "contractScope": null, - "id": 3475, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3429, - "src": "21526:9:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:3", - "typeName": { - "contractScope": null, - "id": 3476, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "21540:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 3482, - "name": "weth", - "nodeType": "VariableDeclaration", - "scope": 3580, - "src": "21553:71:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3478, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "21553:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332", - "id": 3480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3479, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3139, - "src": "21574:6:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3139_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 3481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3484, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 3580, - "src": "21631:28:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3483, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 3488, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 3580, - "src": "21665:45:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3487, - "keyType": { - "id": 3485, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 3495, - "nodeType": "Block", - "src": "21770:36:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3493, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "21787:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3492, - "id": 3494, - "nodeType": "Return", - "src": "21780:19:3" - } - ] - }, - "documentation": null, - "id": 3496, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3489, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:3" - }, - "returnParameters": { - "id": 3492, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3491, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3496, - "src": "21761:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3490, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:3" - }, - "scope": 3580, - "src": "21717:89:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3507, - "nodeType": "Block", - "src": "21878:42:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3503, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "21895:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3505, - "indexExpression": { - "argumentTypes": null, - "id": 3504, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3498, - "src": "21905:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3502, - "id": 3506, - "nodeType": "Return", - "src": "21888:25:3" - } - ] - }, - "documentation": null, - "id": 3508, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3499, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3498, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "21831:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3497, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:3" - }, - "returnParameters": { - "id": 3502, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3501, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "21869:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3500, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:3" - }, - "scope": 3580, - "src": "21812:108:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3544, - "nodeType": "Block", - "src": "21964:189:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3513, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "21974:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3516, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "22006:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3514, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "21989:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "21989:16:3", - "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": 3517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3519, - "nodeType": "ExpressionStatement", - "src": "21974:39:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3520, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22023:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3523, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3521, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3529, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "22073:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3524, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22047:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3527, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3525, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "22047:25:3", - "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": 3530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3532, - "nodeType": "ExpressionStatement", - "src": "22023:57:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3539, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19321, - "src": "22132:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$3580", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$3580", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 3538, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3541, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "22139:6:3", - "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, - "id": 3533, - "name": "weth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "22090:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3267, - "src": "22090:21:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3139_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 3542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3543, - "nodeType": "ExpressionStatement", - "src": "22090:56:3" - } - ] - }, - "documentation": null, - "id": 3545, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3510, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3545, - "src": "21941:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:3" - }, - "returnParameters": { - "id": 3512, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:3" - }, - "scope": 3580, - "src": "21926:227:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3578, - "nodeType": "Block", - "src": "22200:170:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3550, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "22210:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3553, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3547, - "src": "22242:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3551, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "22225:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "22225:16:3", - "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": 3554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3556, - "nodeType": "ExpressionStatement", - "src": "22210:39:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3557, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22259:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3560, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3558, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3566, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3547, - "src": "22309:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3561, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22283:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3564, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3562, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "22283:25:3", - "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": 3567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3569, - "nodeType": "ExpressionStatement", - "src": "22259:57:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3573, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3575, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3547, - "src": "22356:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3570, - "name": "weth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "22326:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3242, - "src": "22326:17:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3139_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 3576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3577, - "nodeType": "ExpressionStatement", - "src": "22326:37:3" - } - ] - }, - "documentation": null, - "id": 3579, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3547, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3579, - "src": "22177:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:3" - }, - "returnParameters": { - "id": 3549, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:3" - }, - "scope": 3580, - "src": "22159:211:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 4000, - "src": "21458:914:3" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3581, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3580, - "src": "22397:14:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$3580", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 3582, - "nodeType": "InheritanceSpecifier", - "src": "22397:14:3" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3583, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3464, - "src": "22413:28:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$3464", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 3584, - "nodeType": "InheritanceSpecifier", - "src": "22413:28:3" - } - ], - "contractDependencies": [ - 2959, - 3071, - 3464, - 3580 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3999, - "linearizedBaseContracts": [ - 3999, - 3464, - 3071, - 2959, - 3580 - ], - "name": "YAMETHPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3589, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22448:70:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3585, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "22448:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 3587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22475:42:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3586, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3139, - "src": "22468:6:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3139_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 3588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22468:50:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 3592, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22524:41:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3590, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22524:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 3591, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22559:6:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3595, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22587:37:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3593, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22587:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 3594, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22614:10:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3598, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22668:31:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3596, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22668:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 3597, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22698:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3601, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22705:29:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22705:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 3600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3603, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22740:29:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3602, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22740:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 3605, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22775:35:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3604, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22775:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 3609, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22816:57:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3608, - "keyType": { - "id": 3606, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22824:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22816:27:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22835:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 3613, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22879:42:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3612, - "keyType": { - "id": 3610, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22887:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22879:27:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3611, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22898:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 3617, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 3616, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3615, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3617, - "src": "22946:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3614, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22946:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22945:16:3" - }, - "src": "22928:34:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 3623, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 3622, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3619, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 3623, - "src": "22980:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3618, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22980:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3621, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3623, - "src": "23002:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3620, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23002:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22979:38:3" - }, - "src": "22967:51:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 3629, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 3628, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3625, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 3629, - "src": "23039:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23039:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3627, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3629, - "src": "23061:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3626, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23061:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23038:38:3" - }, - "src": "23023:54:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 3635, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 3634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3631, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "23099:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23099:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3633, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "23121:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23121:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23098:38:3" - }, - "src": "23082:55:3" - }, - { - "body": { - "id": 3646, - "nodeType": "Block", - "src": "23165:77:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3638, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23183:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23183:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3640, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "23202:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23183:28:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 3642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23212:11:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 3637, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23175:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23175:49:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3644, - "nodeType": "ExpressionStatement", - "src": "23175:49:3" - }, - { - "id": 3645, - "nodeType": "PlaceholderStatement", - "src": "23234:1:3" - } - ] - }, - "documentation": null, - "id": 3647, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 3636, - "nodeType": "ParameterList", - "parameters": [], - "src": "23162:2:3" - }, - "src": "23143:99:3", - "visibility": "internal" - }, - { - "body": { - "id": 3683, - "nodeType": "Block", - "src": "23287:283:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3651, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23297:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3652, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3730, - "src": "23320:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23320:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23297:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3655, - "nodeType": "ExpressionStatement", - "src": "23297:39:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3656, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "23346:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3657, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3697, - "src": "23363:24:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23363:26:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23346:43:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3660, - "nodeType": "ExpressionStatement", - "src": "23346:43:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3661, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23403:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23422:1:3", - "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": 3662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23414:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23414:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23403:21:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3681, - "nodeType": "IfStatement", - "src": "23399:154:3", - "trueBody": { - "id": 3680, - "nodeType": "Block", - "src": "23426:127:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3666, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3613, - "src": "23440:7:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3668, - "indexExpression": { - "argumentTypes": null, - "id": 3667, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23448:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23440:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3670, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23466:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3669, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3759, - "src": "23459:6:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23459:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23440:34:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3673, - "nodeType": "ExpressionStatement", - "src": "23440:34:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3674, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3609, - "src": "23488:22:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3676, - "indexExpression": { - "argumentTypes": null, - "id": 3675, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23511:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23488:31:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3677, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23522:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23488:54:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3679, - "nodeType": "ExpressionStatement", - "src": "23488:54:3" - } - ] - } - }, - { - "id": 3682, - "nodeType": "PlaceholderStatement", - "src": "23562:1:3" - } - ] - }, - "documentation": null, - "id": 3684, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 3650, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3649, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3684, - "src": "23270:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3648, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23270:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23269:17:3" - }, - "src": "23248:322:3", - "visibility": "internal" - }, - { - "body": { - "id": 3696, - "nodeType": "Block", - "src": "23642:63:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3691, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23668:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23668:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3693, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "23685:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3689, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2747, - "src": "23659:4:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$2747_$", - "typeString": "type(library Math)" - } - }, - "id": 3690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 2714, - "src": "23659:8:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23659:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3688, - "id": 3695, - "nodeType": "Return", - "src": "23652:46:3" - } - ] - }, - "documentation": null, - "id": 3697, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3685, - "nodeType": "ParameterList", - "parameters": [], - "src": "23609:2:3" - }, - "returnParameters": { - "id": 3688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3687, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3697, - "src": "23633:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23633:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23632:9:3" - }, - "scope": 3999, - "src": "23576:129:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3729, - "nodeType": "Block", - "src": "23767:352:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3702, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3496, - "src": "23781:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23781:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3704, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23798:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23781:18:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3709, - "nodeType": "IfStatement", - "src": "23777:76:3", - "trueBody": { - "id": 3708, - "nodeType": "Block", - "src": "23801:52:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3706, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23822:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3701, - "id": 3707, - "nodeType": "Return", - "src": "23815:27:3" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3724, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3496, - "src": "24084:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24084:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 3721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24053:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3718, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "24016:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3715, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "23975:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3712, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3697, - "src": "23923:24:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:26:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "23923:51:3", - "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": 3716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:67:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "23923:92:3", - "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": 3719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:104:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "23923:129:3", - "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": 3722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:135:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "23923:160:3", - "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": 3726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:175:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3710, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23881:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "23881:24:3", - "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": 3727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23881:231:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3701, - "id": 3728, - "nodeType": "Return", - "src": "23862:250:3" - } - ] - }, - "documentation": null, - "id": 3730, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3698, - "nodeType": "ParameterList", - "parameters": [], - "src": "23734:2:3" - }, - "returnParameters": { - "id": 3701, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3700, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "23758:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3699, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23758:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23757:9:3" - }, - "scope": 3999, - "src": "23711:408:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3758, - "nodeType": "Block", - "src": "24188:196:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3753, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3613, - "src": "24360:7:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3755, - "indexExpression": { - "argumentTypes": null, - "id": 3754, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "24368:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24360:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 3750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24333:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3744, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3609, - "src": "24278:22:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3746, - "indexExpression": { - "argumentTypes": null, - "id": 3745, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "24301:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24278:31:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3741, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3730, - "src": "24257:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24257:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "24257:20:3", - "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": 3747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24257:53:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3738, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "24227:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3737, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3508, - "src": "24217:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:18:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3740, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "24217:39:3", - "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": 3748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:94:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "24217:115:3", - "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": 3751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:121:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "24217:142:3", - "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": 3756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:160:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3736, - "id": 3757, - "nodeType": "Return", - "src": "24198:179:3" - } - ] - }, - "documentation": null, - "id": 3759, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3733, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3732, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3759, - "src": "24141:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3731, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24141:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24140:17:3" - }, - "returnParameters": { - "id": 3736, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3735, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3759, - "src": "24179:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3734, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24179:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24178:9:3" - }, - "scope": 3999, - "src": "24125:259:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3789, - "nodeType": "Block", - "src": "24546:124:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3771, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3761, - "src": "24564:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3772, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24573:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24564:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 3774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24576:16:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 3770, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24556:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24556:37:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3776, - "nodeType": "ExpressionStatement", - "src": "24556:37:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3780, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3761, - "src": "24615:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3777, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19324, - "src": "24603:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMETHPool_$3999", - "typeString": "contract super YAMETHPool" - } - }, - "id": 3779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 3545, - "src": "24603:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24603:19:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3782, - "nodeType": "ExpressionStatement", - "src": "24603:19:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24644:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24644:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3786, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3761, - "src": "24656:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3783, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "24637:6:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24637:26:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3788, - "nodeType": "EmitStatement", - "src": "24632:31:3" - } - ] - }, - "documentation": null, - "id": 3790, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3764, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24523:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24523:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3766, - "modifierName": { - "argumentTypes": null, - "id": 3763, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "24510:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24510:24:3" - }, - { - "arguments": null, - "id": 3768, - "modifierName": { - "argumentTypes": null, - "id": 3767, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3647, - "src": "24535:10:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24535:10:3" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3761, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3790, - "src": "24487:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24487:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24486:16:3" - }, - "returnParameters": { - "id": 3769, - "nodeType": "ParameterList", - "parameters": [], - "src": "24546:0:3" - }, - "scope": 3999, - "src": "24472:198:3", - "stateMutability": "nonpayable", - "superFunction": 3545, - "visibility": "public" - }, - { - "body": { - "id": 3820, - "nodeType": "Block", - "src": "24753:133:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3802, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3792, - "src": "24771:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24780:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24771:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 3805, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24783:19:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 3801, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24763:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24763:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3807, - "nodeType": "ExpressionStatement", - "src": "24763:40:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3811, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3792, - "src": "24828:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3808, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19324, - "src": "24813:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMETHPool_$3999", - "typeString": "contract super YAMETHPool" - } - }, - "id": 3810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 3579, - "src": "24813:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24813:22:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3813, - "nodeType": "ExpressionStatement", - "src": "24813:22:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3815, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24860:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24860:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3817, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3792, - "src": "24872:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3814, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "24850:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24850:29:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3819, - "nodeType": "EmitStatement", - "src": "24845:34:3" - } - ] - }, - "documentation": null, - "id": 3821, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3795, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24730:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24730:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3797, - "modifierName": { - "argumentTypes": null, - "id": 3794, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "24717:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24717:24:3" - }, - { - "arguments": null, - "id": 3799, - "modifierName": { - "argumentTypes": null, - "id": 3798, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3647, - "src": "24742:10:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24742:10:3" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3793, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3792, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3821, - "src": "24694:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3791, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24694:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24693:16:3" - }, - "returnParameters": { - "id": 3800, - "nodeType": "ParameterList", - "parameters": [], - "src": "24753:0:3" - }, - "scope": 3999, - "src": "24676:210:3", - "stateMutability": "nonpayable", - "superFunction": 3579, - "visibility": "public" - }, - { - "body": { - "id": 3834, - "nodeType": "Block", - "src": "24917:69:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3826, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24946:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24946:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3825, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3508, - "src": "24936:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24936:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3824, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3821 - ], - "referencedDeclaration": 3821, - "src": "24927:8:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24927:31:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3830, - "nodeType": "ExpressionStatement", - "src": "24927:31:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3831, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3900, - "src": "24968:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 3832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24968:11:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3833, - "nodeType": "ExpressionStatement", - "src": "24968:11:3" - } - ] - }, - "documentation": null, - "id": 3835, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3822, - "nodeType": "ParameterList", - "parameters": [], - "src": "24905:2:3" - }, - "returnParameters": { - "id": 3823, - "nodeType": "ParameterList", - "parameters": [], - "src": "24917:0:3" - }, - "scope": 3999, - "src": "24892:94:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 3899, - "nodeType": "Block", - "src": "25056:379:3", - "statements": [ - { - "assignments": [ - 3845 - ], - "declarations": [ - { - "constant": false, - "id": 3845, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3899, - "src": "25066:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3844, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25066:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3850, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3847, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25090:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25090:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3846, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3759, - "src": "25083:6:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25083:18:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25066:35:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3851, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3845, - "src": "25115:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25124:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25115:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3898, - "nodeType": "IfStatement", - "src": "25111:318:3", - "trueBody": { - "id": 3897, - "nodeType": "Block", - "src": "25127:302:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3854, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3613, - "src": "25141:7:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3857, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3855, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25149:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25149:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25141:19:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 3858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25163:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25141:23:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3860, - "nodeType": "ExpressionStatement", - "src": "25141:23:3" - }, - { - "assignments": [ - 3862 - ], - "declarations": [ - { - "constant": false, - "id": 3862, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 3897, - "src": "25178:21:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3861, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25178:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3870, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3865, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3589, - "src": "25214:3:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - ], - "id": 3864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25206:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25206:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3863, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3471, - "src": "25202:3:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$3471_$", - "typeString": "type(contract YAM)" - } - }, - "id": 3867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25202:17:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$3471", - "typeString": "contract YAM" - } - }, - "id": 3868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 3470, - "src": "25202:35:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 3869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25202:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25178:61:3" - }, - { - "assignments": [ - 3872 - ], - "declarations": [ - { - "constant": false, - "id": 3872, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 3897, - "src": "25253:18:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3871, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25253:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3882, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 3880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 3878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25304:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 3879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25308:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25304:6:3", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3875, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3862, - "src": "25285:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3873, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3845, - "src": "25274:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "25274:10:3", - "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": 3876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25274:25:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "25274:29:3", - "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": 3881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25274:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25253:58:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3886, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25342:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25342:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3888, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3872, - "src": "25354:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3883, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3589, - "src": "25325:3:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3242, - "src": "25325:16:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3139_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 3889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25325:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3890, - "nodeType": "ExpressionStatement", - "src": "25325:40:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3892, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25395:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25395:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3894, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3872, - "src": "25407:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3891, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3635, - "src": "25384:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25384:34:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3896, - "nodeType": "EmitStatement", - "src": "25379:39:3" - } - ] - } - } - ] - }, - "documentation": null, - "id": 3900, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3838, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25033:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25033:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3840, - "modifierName": { - "argumentTypes": null, - "id": 3837, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "25020:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25020:24:3" - }, - { - "arguments": null, - "id": 3842, - "modifierName": { - "argumentTypes": null, - "id": 3841, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3647, - "src": "25045:10:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25045:10:3" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3836, - "nodeType": "ParameterList", - "parameters": [], - "src": "25010:2:3" - }, - "returnParameters": { - "id": 3843, - "nodeType": "ParameterList", - "parameters": [], - "src": "25056:0:3" - }, - "scope": 3999, - "src": "24992:443:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3997, - "nodeType": "Block", - "src": "25570:703:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3912, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25584:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25584:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 3914, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "25602:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25584:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3995, - "nodeType": "Block", - "src": "26087:180:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3973, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "26099:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3976, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "26123:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3974, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "26112:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "26112:10:3", - "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": 3977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26112:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26099:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3979, - "nodeType": "ExpressionStatement", - "src": "26099:33:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3980, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "26144:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3981, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "26161:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26144:26:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3983, - "nodeType": "ExpressionStatement", - "src": "26144:26:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3984, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "26182:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3987, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "26211:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3985, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "26197:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "26197:13:3", - "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": 3988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26197:23:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26182:38:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3990, - "nodeType": "ExpressionStatement", - "src": "26182:38:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3992, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "26249:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3991, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3617, - "src": "26237:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26237:19:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3994, - "nodeType": "EmitStatement", - "src": "26232:24:3" - } - ] - }, - "id": 3996, - "nodeType": "IfStatement", - "src": "25580:687:3", - "trueBody": { - "id": 3972, - "nodeType": "Block", - "src": "25613:468:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3916, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25629:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25629:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3918, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "25648:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25629:31:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3953, - "nodeType": "Block", - "src": "25730:205:3", - "statements": [ - { - "assignments": [ - 3929 - ], - "declarations": [ - { - "constant": false, - "id": 3929, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 3953, - "src": "25746:17:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25746:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3935, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3932, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25783:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25783:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3930, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "25766:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "25766:16:3", - "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": 3934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25766:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25746:53:3" - }, - { - "assignments": [ - 3937 - ], - "declarations": [ - { - "constant": false, - "id": 3937, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 3953, - "src": "25815:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3936, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25815:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3942, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3940, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "25848:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3938, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3929, - "src": "25834:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "25834:13:3", - "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": 3941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25834:25:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25815:44:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3943, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "25875:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3949, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "25913:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3946, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3937, - "src": "25899:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3944, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "25888:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "25888:10:3", - "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": 3947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25888:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "25888:24:3", - "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": 3950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25888:34:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25875:47:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3952, - "nodeType": "ExpressionStatement", - "src": "25875:47:3" - } - ] - }, - "id": 3954, - "nodeType": "IfStatement", - "src": "25625:310:3", - "trueBody": { - "id": 3927, - "nodeType": "Block", - "src": "25662:62:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3920, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "25678:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3923, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "25702:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3921, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "25691:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "25691:10:3", - "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": 3924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25691:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25678:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3926, - "nodeType": "ExpressionStatement", - "src": "25678:33:3" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 3958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3955, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "25946:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3956, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25963:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25963:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25946:32:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3959, - "nodeType": "ExpressionStatement", - "src": "25946:32:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3960, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "25990:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3964, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "26025:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3961, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26005:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26005:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "26005:19:3", - "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": 3965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26005:29:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25990:44:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3967, - "nodeType": "ExpressionStatement", - "src": "25990:44:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3969, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "26063:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3968, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3617, - "src": "26051:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26051:19:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3971, - "nodeType": "EmitStatement", - "src": "26046:24:3" - } - ] - } - } - ] - }, - "documentation": null, - "id": 3998, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3905, - "modifierName": { - "argumentTypes": null, - "id": 3904, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3451, - "src": "25510:22:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25510:22:3" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3908, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25562:1:3", - "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": 3907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25554:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25554:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3910, - "modifierName": { - "argumentTypes": null, - "id": 3906, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "25541:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25541:24:3" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3903, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3902, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3998, - "src": "25469:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3901, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25469:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25468:16:3" - }, - "returnParameters": { - "id": 3911, - "nodeType": "ParameterList", - "parameters": [], - "src": "25570:0:3" - }, - "scope": 3999, - "src": "25441:832:3", - "stateMutability": "nonpayable", - "superFunction": 3439, - "visibility": "external" - } - ], - "scope": 4000, - "src": "22374:3901:3" - } - ], - "src": "1490:24786:3" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMETHPool.sol", - "exportedSymbols": { - "Address": [ - 3213 - ], - "Context": [ - 2959 - ], - "IERC20": [ - 3139 - ], - "IRewardDistributionRecipient": [ - 3464 - ], - "LPTokenWrapper": [ - 3580 - ], - "Math": [ - 2747 - ], - "Ownable": [ - 3071 - ], - "SafeERC20": [ - 3429 - ], - "SafeMath": [ - 2933 - ], - "YAM": [ - 3471 - ], - "YAMETHPool": [ - 3999 - ] - }, - "id": 4000, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2680, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 2747, - "linearizedBaseContracts": [ - 2747 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2696, - "nodeType": "Block", - "src": "1739:38:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2689, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "1756:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2690, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2684, - "src": "1761:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 2693, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2684, - "src": "1769:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:3", - "trueExpression": { - "argumentTypes": null, - "id": 2692, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2682, - "src": "1765:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2688, - "id": 2695, - "nodeType": "Return", - "src": "1749:21:3" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 2697, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2682, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2697, - "src": "1685:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2681, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2684, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2697, - "src": "1696:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:3" - }, - "returnParameters": { - "id": 2688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2687, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2697, - "src": "1730:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:3" - }, - "scope": 2747, - "src": "1672:105:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2713, - "nodeType": "Block", - "src": "1915:37:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2706, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2699, - "src": "1932:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 2707, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2701, - "src": "1936:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 2710, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2701, - "src": "1944:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:3", - "trueExpression": { - "argumentTypes": null, - "id": 2709, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2699, - "src": "1940:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2705, - "id": 2712, - "nodeType": "Return", - "src": "1925:20:3" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 2714, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2702, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2699, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2714, - "src": "1861:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2698, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2701, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2714, - "src": "1872:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2700, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:3" - }, - "returnParameters": { - "id": 2705, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2704, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2714, - "src": "1906:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2703, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:3" - }, - "scope": 2747, - "src": "1848:104:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2745, - "nodeType": "Block", - "src": "2136:119:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2723, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "2208:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2726, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2727, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2718, - "src": "2218:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2728, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2730, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2732, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2716, - "src": "2229:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2735, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2718, - "src": "2237:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2739, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 2740, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 2742, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2722, - "id": 2744, - "nodeType": "Return", - "src": "2200:48:3" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 2746, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2719, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2716, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "2082:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2715, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2718, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "2093:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2717, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:3" - }, - "returnParameters": { - "id": 2722, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2721, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2746, - "src": "2127:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2720, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:3" - }, - "scope": 2747, - "src": "2065:190:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "1589:668:3" - }, - { - "id": 2748, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 2933, - "linearizedBaseContracts": [ - 2933 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2772, - "nodeType": "Block", - "src": "3212:109:3", - "statements": [ - { - "assignments": [ - 2758 - ], - "declarations": [ - { - "constant": false, - "id": 2758, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2772, - "src": "3222:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2757, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2762, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2759, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2750, - "src": "3234:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 2760, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2752, - "src": "3238:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2764, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2758, - "src": "3257:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2765, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2750, - "src": "3262:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 2767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 2763, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2769, - "nodeType": "ExpressionStatement", - "src": "3249:46:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2770, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2758, - "src": "3313:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2756, - "id": 2771, - "nodeType": "Return", - "src": "3306:8:3" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 2773, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2753, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2750, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2773, - "src": "3158:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2749, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2752, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2773, - "src": "3169:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2751, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:3" - }, - "returnParameters": { - "id": 2756, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2755, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2773, - "src": "3203:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2754, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:3" - }, - "scope": 2933, - "src": "3145:176:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2788, - "nodeType": "Block", - "src": "3652:67:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2783, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2775, - "src": "3673:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2784, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2777, - "src": "3676:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 2785, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 2782, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2789, - 2816 - ], - "referencedDeclaration": 2816, - "src": "3669:3:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2781, - "id": 2787, - "nodeType": "Return", - "src": "3662:50:3" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 2789, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2778, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2775, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2789, - "src": "3598:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2774, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2777, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2789, - "src": "3609:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2776, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:3" - }, - "returnParameters": { - "id": 2781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2780, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2789, - "src": "3643:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2779, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:3" - }, - "scope": 2933, - "src": "3585:134:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2815, - "nodeType": "Block", - "src": "4138:92:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2801, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2793, - "src": "4156:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2802, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2791, - "src": "4161:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2804, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2795, - "src": "4164:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2800, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2806, - "nodeType": "ExpressionStatement", - "src": "4148:29:3" - }, - { - "assignments": [ - 2808 - ], - "declarations": [ - { - "constant": false, - "id": 2808, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2815, - "src": "4187:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2807, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2812, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2809, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2791, - "src": "4199:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 2810, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2793, - "src": "4203:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2813, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2808, - "src": "4222:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2799, - "id": 2814, - "nodeType": "Return", - "src": "4215:8:3" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 2816, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2796, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2791, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4056:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2790, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2793, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4067:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2792, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2795, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4078:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2794, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:3" - }, - "returnParameters": { - "id": 2799, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2798, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2816, - "src": "4129:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2797, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:3" - }, - "scope": 2933, - "src": "4043:187:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2849, - "nodeType": "Block", - "src": "4537:392:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2825, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "4769:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2831, - "nodeType": "IfStatement", - "src": "4765:45:3", - "trueBody": { - "id": 2830, - "nodeType": "Block", - "src": "4777:33:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2828, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 2824, - "id": 2829, - "nodeType": "Return", - "src": "4791:8:3" - } - ] - } - }, - { - "assignments": [ - 2833 - ], - "declarations": [ - { - "constant": false, - "id": 2833, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2849, - "src": "4820:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2832, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2837, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2834, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "4832:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 2835, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2820, - "src": "4836:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2839, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2833, - "src": "4855:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2840, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2818, - "src": "4859:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2842, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2820, - "src": "4864:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 2844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 2838, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2846, - "nodeType": "ExpressionStatement", - "src": "4847:56:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2847, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2833, - "src": "4921:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2824, - "id": 2848, - "nodeType": "Return", - "src": "4914:8:3" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 2850, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2821, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2818, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2850, - "src": "4483:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2817, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2820, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2850, - "src": "4494:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2819, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:3" - }, - "returnParameters": { - "id": 2824, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2823, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2850, - "src": "4528:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2822, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:3" - }, - "scope": 2933, - "src": "4470:459:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2865, - "nodeType": "Block", - "src": "5451:63:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2860, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "5472:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2861, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2854, - "src": "5475:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 2862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 2859, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2866, - 2893 - ], - "referencedDeclaration": 2893, - "src": "5468:3:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2858, - "id": 2864, - "nodeType": "Return", - "src": "5461:46:3" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 2866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2855, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2852, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2866, - "src": "5397:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2851, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2854, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2866, - "src": "5408:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2853, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:3" - }, - "returnParameters": { - "id": 2858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2857, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2866, - "src": "5442:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2856, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:3" - }, - "scope": 2933, - "src": "5384:130:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2892, - "nodeType": "Block", - "src": "6124:243:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2878, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "6208:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2881, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2872, - "src": "6215:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2877, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2883, - "nodeType": "ExpressionStatement", - "src": "6200:28:3" - }, - { - "assignments": [ - 2885 - ], - "declarations": [ - { - "constant": false, - "id": 2885, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2892, - "src": "6238:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2884, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2889, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2886, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2868, - "src": "6250:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2887, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "6254:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2890, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2885, - "src": "6359:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2876, - "id": 2891, - "nodeType": "Return", - "src": "6352:8:3" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 2893, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2873, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2868, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6042:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2870, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6053:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2869, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2872, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6064:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2871, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:3" - }, - "returnParameters": { - "id": 2876, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2875, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2893, - "src": "6115:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2874, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:3" - }, - "scope": 2933, - "src": "6029:338:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2908, - "nodeType": "Block", - "src": "6878:61:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2903, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "6899:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2904, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2897, - "src": "6902:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 2905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 2902, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2909, - 2932 - ], - "referencedDeclaration": 2932, - "src": "6895:3:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 2906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2901, - "id": 2907, - "nodeType": "Return", - "src": "6888:44:3" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 2909, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2898, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2895, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2909, - "src": "6824:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2894, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2897, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2909, - "src": "6835:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2896, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:3" - }, - "returnParameters": { - "id": 2901, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2900, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2909, - "src": "6869:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2899, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:3" - }, - "scope": 2933, - "src": "6811:128:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2931, - "nodeType": "Block", - "src": "7538:68:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2921, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2913, - "src": "7556:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2924, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2915, - "src": "7564:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2920, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2926, - "nodeType": "ExpressionStatement", - "src": "7548:29:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2927, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2911, - "src": "7594:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 2928, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2913, - "src": "7598:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2919, - "id": 2930, - "nodeType": "Return", - "src": "7587:12:3" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 2932, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2916, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2911, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7456:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2913, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7467:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2912, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2915, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7478:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2914, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:3" - }, - "returnParameters": { - "id": 2919, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2918, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2932, - "src": "7529:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:3" - }, - "scope": 2933, - "src": "7443:163:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "2900:4708:3" - }, - { - "id": 2934, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2959, - "linearizedBaseContracts": [ - 2959 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2937, - "nodeType": "Block", - "src": "8386:3:3", - "statements": [] - }, - "documentation": null, - "id": 2938, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2935, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:3" - }, - "returnParameters": { - "id": 2936, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:3" - }, - "scope": 2959, - "src": "8362:27:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2946, - "nodeType": "Block", - "src": "8510:34:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2943, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 2942, - "id": 2945, - "nodeType": "Return", - "src": "8520:17:3" - } - ] - }, - "documentation": null, - "id": 2947, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2939, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:3" - }, - "returnParameters": { - "id": 2942, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2941, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2947, - "src": "8493:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 2940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:3", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:3" - }, - "scope": 2959, - "src": "8448:96:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2957, - "nodeType": "Block", - "src": "8607:165:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2952, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19307, - "src": "8617:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$2959", - "typeString": "contract Context" - } - }, - "id": 2953, - "nodeType": "ExpressionStatement", - "src": "8617:4:3" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2954, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 2951, - "id": 2956, - "nodeType": "Return", - "src": "8750:15:3" - } - ] - }, - "documentation": null, - "id": 2958, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2948, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:3" - }, - "returnParameters": { - "id": 2951, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2950, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2958, - "src": "8593:12:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2949, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:3" - }, - "scope": 2959, - "src": "8550:222:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "8185:589:3" - }, - { - "id": 2960, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:3" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2961, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2959, - "src": "9238:7:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$2959", - "typeString": "contract Context" - } - }, - "id": 2962, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:3" - } - ], - "contractDependencies": [ - 2959 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 3071, - "linearizedBaseContracts": [ - 3071, - 2959 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2964, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 3071, - "src": "9252:22:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2963, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 2970, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 2969, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2966, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "9308:29:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2965, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2968, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "9339:24:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2967, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:3" - }, - "src": "9281:84:3" - }, - { - "body": { - "id": 2985, - "nodeType": "Block", - "src": "9491:93:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2973, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "9501:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2974, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "9510:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2977, - "nodeType": "ExpressionStatement", - "src": "9501:21:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2980, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:3", - "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": 2979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2982, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "9570:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2978, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "9537:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 2983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2984, - "nodeType": "EmitStatement", - "src": "9532:45:3" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 2986, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2971, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:3" - }, - "returnParameters": { - "id": 2972, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:3" - }, - "scope": 3071, - "src": "9467:117:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2993, - "nodeType": "Block", - "src": "9707:30:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2991, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "9724:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2990, - "id": 2992, - "nodeType": "Return", - "src": "9717:13:3" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 2994, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2987, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:3" - }, - "returnParameters": { - "id": 2990, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2989, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2994, - "src": "9698:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:3" - }, - "scope": 3071, - "src": "9660:77:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3003, - "nodeType": "Block", - "src": "9846:82:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2997, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3015, - "src": "9864:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 2998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 2999, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 2996, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3001, - "nodeType": "ExpressionStatement", - "src": "9856:54:3" - }, - { - "id": 3002, - "nodeType": "PlaceholderStatement", - "src": "9920:1:3" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 3004, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2995, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:3" - }, - "src": "9825:103:3", - "visibility": "internal" - }, - { - "body": { - "id": 3014, - "nodeType": "Block", - "src": "10057:46:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3009, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "10074:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 3010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 3011, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "10090:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3008, - "id": 3013, - "nodeType": "Return", - "src": "10067:29:3" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 3015, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3005, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:3" - }, - "returnParameters": { - "id": 3008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3007, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3015, - "src": "10051:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3006, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:3" - }, - "scope": 3071, - "src": "10011:92:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3033, - "nodeType": "Block", - "src": "10491:91:3", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3021, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "10527:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3023, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:3", - "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": 3022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3020, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "10506:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 3025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3026, - "nodeType": "EmitStatement", - "src": "10501:45:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3027, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "10556:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:3", - "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": 3028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3032, - "nodeType": "ExpressionStatement", - "src": "10556:19:3" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 3034, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3018, - "modifierName": { - "argumentTypes": null, - "id": 3017, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "10481:9:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:3" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3016, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:3" - }, - "returnParameters": { - "id": 3019, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:3" - }, - "scope": 3071, - "src": "10445:137:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3045, - "nodeType": "Block", - "src": "10793:45:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3042, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "10822:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3041, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3070, - "src": "10803:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 3043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3044, - "nodeType": "ExpressionStatement", - "src": "10803:28:3" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 3046, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3039, - "modifierName": { - "argumentTypes": null, - "id": 3038, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "10783:9:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:3" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3037, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3036, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 3046, - "src": "10758:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3035, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:3" - }, - "returnParameters": { - "id": 3040, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:3" - }, - "scope": 3071, - "src": "10731:107:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3069, - "nodeType": "Block", - "src": "10994:170:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3056, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3052, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "11012:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3054, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:3", - "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": 3053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3055, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 3057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 3051, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3059, - "nodeType": "ExpressionStatement", - "src": "11004:73:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3061, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "11113:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3062, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "11121:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3060, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "11092:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 3063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3064, - "nodeType": "EmitStatement", - "src": "11087:43:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3065, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2964, - "src": "11140:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3066, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3048, - "src": "11149:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3068, - "nodeType": "ExpressionStatement", - "src": "11140:17:3" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 3070, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3049, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3048, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 3070, - "src": "10967:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3047, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:3" - }, - "returnParameters": { - "id": 3050, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:3" - }, - "scope": 3071, - "src": "10939:225:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "9218:1948:3" - }, - { - "id": 3072, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 3139, - "linearizedBaseContracts": [ - 3139 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 3077, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3073, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:3" - }, - "returnParameters": { - "id": 3076, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3075, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3077, - "src": "11541:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3074, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:3" - }, - "scope": 3139, - "src": "11495:55:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 3084, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3080, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3079, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3084, - "src": "11652:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3078, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:3" - }, - "returnParameters": { - "id": 3083, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3082, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3084, - "src": "11692:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3081, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:3" - }, - "scope": 3139, - "src": "11633:68:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 3093, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3089, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3086, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 3093, - "src": "11939:17:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3088, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3093, - "src": "11958:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3087, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:3" - }, - "returnParameters": { - "id": 3092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3091, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3093, - "src": "11992:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3090, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:3" - }, - "scope": 3139, - "src": "11921:77:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 3102, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3095, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 3102, - "src": "12292:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3097, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3102, - "src": "12307:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3096, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:3" - }, - "returnParameters": { - "id": 3101, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3100, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3102, - "src": "12347:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3099, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:3" - }, - "scope": 3139, - "src": "12273:83:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 3111, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3104, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "13026:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3103, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3106, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "13043:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:3" - }, - "returnParameters": { - "id": 3110, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3109, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "13077:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3108, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:3" - }, - "scope": 3139, - "src": "13009:74:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 3122, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3118, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3113, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13412:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3112, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3115, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13428:17:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3114, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3117, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13447:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3116, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:3" - }, - "returnParameters": { - "id": 3121, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3120, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3122, - "src": "13481:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3119, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:3" - }, - "scope": 3139, - "src": "13390:97:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 3130, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 3129, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3124, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3130, - "src": "13671:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3126, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3130, - "src": "13693:18:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3125, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3128, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3130, - "src": "13713:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3127, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:3" - }, - "src": "13656:72:3" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 3138, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 3137, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3132, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 3138, - "src": "13902:21:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3131, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3134, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3138, - "src": "13925:23:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3133, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3136, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3138, - "src": "13950:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3135, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:3" - }, - "src": "13887:78:3" - } - ], - "scope": 4000, - "src": "11401:2566:3" - }, - { - "id": 3140, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 3213, - "linearizedBaseContracts": [ - 3213 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 3164, - "nodeType": "Block", - "src": "14644:731:3", - "statements": [ - { - "assignments": [ - 3148 - ], - "declarations": [ - { - "constant": false, - "id": 3148, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 3164, - "src": "15083:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3147, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3149, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:3" - }, - { - "assignments": [ - 3151 - ], - "declarations": [ - { - "constant": false, - "id": 3151, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 3164, - "src": "15109:19:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 3150, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3153, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 3152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:3" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 3148, - "isOffset": false, - "isSlot": false, - "src": "15274:8:3", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 3142, - "isOffset": false, - "isSlot": false, - "src": "15298:7:3", - "valueSize": 1 - } - } - ], - "id": 3154, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:3" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 3157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3155, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "15325:8:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 3156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 3160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3158, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3148, - "src": "15344:8:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 3159, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3151, - "src": "15356:11:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3162, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3146, - "id": 3163, - "nodeType": "Return", - "src": "15317:51:3" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 3165, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3143, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3142, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3165, - "src": "14598:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3141, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:3" - }, - "returnParameters": { - "id": 3146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3145, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3165, - "src": "14638:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3144, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:3" - }, - "scope": 3213, - "src": "14578:797:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3178, - "nodeType": "Block", - "src": "15660:49:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3174, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3167, - "src": "15693:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3173, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 3175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 3172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 3171, - "id": 3177, - "nodeType": "Return", - "src": "15670:32:3" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 3179, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3168, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3167, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3179, - "src": "15603:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:3" - }, - "returnParameters": { - "id": 3171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3170, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3179, - "src": "15643:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 3169, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:3", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:3" - }, - "scope": 3213, - "src": "15584:125:3", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3211, - "nodeType": "Block", - "src": "16737:294:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3188, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19313, - "src": "16763:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3213", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$3213", - "typeString": "library Address" - } - ], - "id": 3187, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3191, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "16780:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 3193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 3186, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3195, - "nodeType": "ExpressionStatement", - "src": "16747:73:3" - }, - { - "assignments": [ - 3197, - null - ], - "declarations": [ - { - "constant": false, - "id": 3197, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3211, - "src": "16886:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3196, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 3205, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 3203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 3201, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3183, - "src": "16925:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3198, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3181, - "src": "16904:9:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 3199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:3", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 3202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:3", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3207, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3197, - "src": "16954:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 3208, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 3206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3210, - "nodeType": "ExpressionStatement", - "src": "16946:78:3" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 3212, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3184, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3181, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 3212, - "src": "16685:25:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 3180, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:3", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3183, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3212, - "src": "16712:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:3" - }, - "returnParameters": { - "id": 3185, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:3" - }, - "scope": 3213, - "src": "16666:365:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 4000, - "src": "14114:2919:3" - }, - { - "id": 3214, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 3429, - "linearizedBaseContracts": [ - 3429 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 3217, - "libraryName": { - "contractScope": null, - "id": 3215, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "17610:8:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2933", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:3", - "typeName": { - "id": 3216, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 3220, - "libraryName": { - "contractScope": null, - "id": 3218, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3213, - "src": "17642:7:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$3213", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:3", - "typeName": { - "id": 3219, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 3241, - "nodeType": "Block", - "src": "17740:102:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3230, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "17769:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3233, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "17799:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3093, - "src": "17799:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3236, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3224, - "src": "17824:2:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3237, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3226, - "src": "17828:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3231, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3229, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "17750:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3240, - "nodeType": "ExpressionStatement", - "src": "17750:85:3" - } - ] - }, - "documentation": null, - "id": 3242, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3222, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3242, - "src": "17690:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3221, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "17690:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3224, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3242, - "src": "17704:10:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3223, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3226, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3242, - "src": "17716:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:3" - }, - "returnParameters": { - "id": 3228, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:3" - }, - "scope": 3429, - "src": "17668:174:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3266, - "nodeType": "Block", - "src": "17938:112:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3254, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "17967:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3257, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3244, - "src": "17997:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3122, - "src": "17997:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 3259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3260, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3246, - "src": "18026:4:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3261, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3248, - "src": "18032:2:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3262, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3250, - "src": "18036:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3255, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3253, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "17948:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3265, - "nodeType": "ExpressionStatement", - "src": "17948:95:3" - } - ] - }, - "documentation": null, - "id": 3267, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3244, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17874:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3243, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "17874:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3246, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17888:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3245, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3248, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17902:10:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3250, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3267, - "src": "17914:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:3" - }, - "returnParameters": { - "id": 3252, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:3" - }, - "scope": 3429, - "src": "17848:202:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3307, - "nodeType": "Block", - "src": "18132:536:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3277, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3273, - "src": "18421:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3280, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3284, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19315, - "src": "18461:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - ], - "id": 3283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3286, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3271, - "src": "18468:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3281, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3269, - "src": "18437:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3102, - "src": "18437:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3288, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3290, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 3292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 3276, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3294, - "nodeType": "ExpressionStatement", - "src": "18412:150:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3296, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3269, - "src": "18591:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3299, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3269, - "src": "18621:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3111, - "src": "18621:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3302, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3271, - "src": "18645:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3303, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3273, - "src": "18654:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3297, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3298, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3295, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "18572:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3306, - "nodeType": "ExpressionStatement", - "src": "18572:89:3" - } - ] - }, - "documentation": null, - "id": 3308, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3269, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3308, - "src": "18077:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3268, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "18077:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3271, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3308, - "src": "18091:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3270, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3273, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3308, - "src": "18108:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:3" - }, - "returnParameters": { - "id": 3275, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:3" - }, - "scope": 3429, - "src": "18056:612:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3342, - "nodeType": "Block", - "src": "18760:196:3", - "statements": [ - { - "assignments": [ - 3318 - ], - "declarations": [ - { - "constant": false, - "id": 3318, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 3342, - "src": "18770:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3329, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3327, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3314, - "src": "18837:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3322, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19315, - "src": "18817:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - ], - "id": 3321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3324, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3312, - "src": "18824:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3319, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3310, - "src": "18793:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3102, - "src": "18793:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "18793:43:3", - "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": 3328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3331, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3310, - "src": "18872:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3334, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3310, - "src": "18902:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3111, - "src": "18902:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3337, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3312, - "src": "18926:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3338, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3318, - "src": "18935:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3332, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3330, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "18853:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3341, - "nodeType": "ExpressionStatement", - "src": "18853:96:3" - } - ] - }, - "documentation": null, - "id": 3343, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3310, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3343, - "src": "18705:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3309, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "18705:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3312, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3343, - "src": "18719:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3314, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3343, - "src": "18736:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:3" - }, - "returnParameters": { - "id": 3316, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:3" - }, - "scope": 3429, - "src": "18674:282:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3378, - "nodeType": "Block", - "src": "19048:241:3", - "statements": [ - { - "assignments": [ - 3353 - ], - "declarations": [ - { - "constant": false, - "id": 3353, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 3378, - "src": "19058:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3365, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3362, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3349, - "src": "19125:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 3363, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3357, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19315, - "src": "19105:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - ], - "id": 3356, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3359, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3347, - "src": "19112:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3354, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3345, - "src": "19081:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3102, - "src": "19081:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 3360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2816, - "src": "19081:43:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 3364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3367, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3345, - "src": "19205:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3370, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3345, - "src": "19235:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3111, - "src": "19235:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 3373, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3347, - "src": "19259:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3374, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3353, - "src": "19268:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3368, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 3375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 3366, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3428, - "src": "19186:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 3376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3377, - "nodeType": "ExpressionStatement", - "src": "19186:96:3" - } - ] - }, - "documentation": null, - "id": 3379, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3350, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3345, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3379, - "src": "18993:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3344, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "18993:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3347, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 3379, - "src": "19007:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3349, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3379, - "src": "19024:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3348, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:3" - }, - "returnParameters": { - "id": 3351, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:3" - }, - "scope": 3429, - "src": "18962:327:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3427, - "nodeType": "Block", - "src": "19741:1026:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3388, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3381, - "src": "20275:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - ], - "id": 3387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 3165, - "src": "20267:25:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 3392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 3386, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3394, - "nodeType": "ExpressionStatement", - "src": "20259:71:3" - }, - { - "assignments": [ - 3396, - 3398 - ], - "declarations": [ - { - "constant": false, - "id": 3396, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 3427, - "src": "20401:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3395, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3398, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 3427, - "src": "20415:23:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3397, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3405, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3403, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3383, - "src": "20462:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3400, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3381, - "src": "20450:5:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - ], - "id": 3399, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:3", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 3404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3407, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3396, - "src": "20485:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 3408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 3406, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3410, - "nodeType": "ExpressionStatement", - "src": "20477:52:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3411, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3398, - "src": "20544:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 3412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3413, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3426, - "nodeType": "IfStatement", - "src": "20540:221:3", - "trueBody": { - "id": 3425, - "nodeType": "Block", - "src": "20567:194:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3418, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3398, - "src": "20684:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 3419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 3420, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 3416, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 3417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 3421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 3422, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 3415, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3424, - "nodeType": "ExpressionStatement", - "src": "20665:85:3" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 3428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3384, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3381, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 3428, - "src": "19700:12:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3380, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "19700:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3383, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 3428, - "src": "19714:17:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3382, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:3" - }, - "returnParameters": { - "id": 3385, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:3" - }, - "scope": 3429, - "src": "19672:1095:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 4000, - "src": "17580:3189:3" - }, - { - "id": 3430, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:3" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3431, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3071, - "src": "20892:7:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$3071", - "typeString": "contract Ownable" - } - }, - "id": 3432, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:3" - } - ], - "contractDependencies": [ - 2959, - 3071 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 3464, - "linearizedBaseContracts": [ - 3464, - 3071, - 2959 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3434, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 3464, - "src": "20906:33:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3433, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 3439, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3436, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3439, - "src": "20974:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:3" - }, - "returnParameters": { - "id": 3438, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:3" - }, - "scope": 3464, - "src": "20946:53:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 3450, - "nodeType": "Block", - "src": "21039:108:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3442, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "21057:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 3443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 3444, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3434, - "src": "21073:18:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 3446, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 3441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3448, - "nodeType": "ExpressionStatement", - "src": "21049:80:3" - }, - { - "id": 3449, - "nodeType": "PlaceholderStatement", - "src": "21139:1:3" - } - ] - }, - "documentation": null, - "id": 3451, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 3440, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:3" - }, - "src": "21005:142:3", - "visibility": "internal" - }, - { - "body": { - "id": 3462, - "nodeType": "Block", - "src": "21252:57:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3458, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3434, - "src": "21262:18:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3459, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3453, - "src": "21283:19:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3461, - "nodeType": "ExpressionStatement", - "src": "21262:40:3" - } - ] - }, - "documentation": null, - "id": 3463, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3456, - "modifierName": { - "argumentTypes": null, - "id": 3455, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3004, - "src": "21238:9:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:3" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3454, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3453, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 3463, - "src": "21184:27:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3452, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:3" - }, - "returnParameters": { - "id": 3457, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:3" - }, - "scope": 3464, - "src": "21153:156:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 4000, - "src": "20851:460:3" - }, - { - "id": 3465, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 3471, - "linearizedBaseContracts": [ - 3471 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 3470, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3466, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:3" - }, - "returnParameters": { - "id": 3469, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3468, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3470, - "src": "21443:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3467, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:3" - }, - "scope": 3471, - "src": "21396:56:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 4000, - "src": "21376:78:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3580, - "linearizedBaseContracts": [ - 3580 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 3474, - "libraryName": { - "contractScope": null, - "id": 3472, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "21494:8:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$2933", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:3", - "typeName": { - "id": 3473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 3477, - "libraryName": { - "contractScope": null, - "id": 3475, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3429, - "src": "21526:9:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$3429", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:3", - "typeName": { - "contractScope": null, - "id": 3476, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "21540:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 3482, - "name": "weth", - "nodeType": "VariableDeclaration", - "scope": 3580, - "src": "21553:71:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3478, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "21553:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307843303261614133396232323346453844304130653543344632376541443930383343373536436332", - "id": 3480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3479, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3139, - "src": "21574:6:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3139_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 3481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3484, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 3580, - "src": "21631:28:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3483, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 3488, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 3580, - "src": "21665:45:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3487, - "keyType": { - "id": 3485, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 3495, - "nodeType": "Block", - "src": "21770:36:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3493, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "21787:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3492, - "id": 3494, - "nodeType": "Return", - "src": "21780:19:3" - } - ] - }, - "documentation": null, - "id": 3496, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3489, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:3" - }, - "returnParameters": { - "id": 3492, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3491, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3496, - "src": "21761:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3490, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:3" - }, - "scope": 3580, - "src": "21717:89:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3507, - "nodeType": "Block", - "src": "21878:42:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3503, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "21895:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3505, - "indexExpression": { - "argumentTypes": null, - "id": 3504, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3498, - "src": "21905:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3502, - "id": 3506, - "nodeType": "Return", - "src": "21888:25:3" - } - ] - }, - "documentation": null, - "id": 3508, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3499, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3498, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "21831:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3497, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:3" - }, - "returnParameters": { - "id": 3502, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3501, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3508, - "src": "21869:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3500, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:3" - }, - "scope": 3580, - "src": "21812:108:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3544, - "nodeType": "Block", - "src": "21964:189:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3513, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "21974:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3516, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "22006:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3514, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "21989:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "21989:16:3", - "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": 3517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3519, - "nodeType": "ExpressionStatement", - "src": "21974:39:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3520, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22023:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3523, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3521, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3529, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "22073:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3524, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22047:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3527, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3525, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "22047:25:3", - "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": 3530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3532, - "nodeType": "ExpressionStatement", - "src": "22023:57:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3539, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19321, - "src": "22132:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$3580", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$3580", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 3538, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3541, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3510, - "src": "22139:6:3", - "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, - "id": 3533, - "name": "weth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "22090:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3267, - "src": "22090:21:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3139_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 3542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3543, - "nodeType": "ExpressionStatement", - "src": "22090:56:3" - } - ] - }, - "documentation": null, - "id": 3545, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3510, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3545, - "src": "21941:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:3" - }, - "returnParameters": { - "id": 3512, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:3" - }, - "scope": 3580, - "src": "21926:227:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3578, - "nodeType": "Block", - "src": "22200:170:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3550, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "22210:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3553, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3547, - "src": "22242:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3551, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3484, - "src": "22225:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "22225:16:3", - "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": 3554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3556, - "nodeType": "ExpressionStatement", - "src": "22210:39:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3557, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22259:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3560, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3558, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3566, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3547, - "src": "22309:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3561, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3488, - "src": "22283:9:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3564, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3562, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "22283:25:3", - "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": 3567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3569, - "nodeType": "ExpressionStatement", - "src": "22259:57:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3573, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3575, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3547, - "src": "22356:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3570, - "name": "weth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "22326:4:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3242, - "src": "22326:17:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3139_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 3576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3577, - "nodeType": "ExpressionStatement", - "src": "22326:37:3" - } - ] - }, - "documentation": null, - "id": 3579, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3547, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3579, - "src": "22177:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:3" - }, - "returnParameters": { - "id": 3549, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:3" - }, - "scope": 3580, - "src": "22159:211:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 4000, - "src": "21458:914:3" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3581, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3580, - "src": "22397:14:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$3580", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 3582, - "nodeType": "InheritanceSpecifier", - "src": "22397:14:3" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3583, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3464, - "src": "22413:28:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$3464", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 3584, - "nodeType": "InheritanceSpecifier", - "src": "22413:28:3" - } - ], - "contractDependencies": [ - 2959, - 3071, - 3464, - 3580 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3999, - "linearizedBaseContracts": [ - 3999, - 3464, - 3071, - 2959, - 3580 - ], - "name": "YAMETHPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3589, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22448:70:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 3585, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3139, - "src": "22448:6:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 3587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22475:42:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3586, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3139, - "src": "22468:6:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$3139_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 3588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22468:50:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 3592, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22524:41:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3590, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22524:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 3591, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22559:6:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3595, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22587:37:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3593, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22587:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 3594, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22614:10:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3598, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22668:31:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3596, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22668:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 3597, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22698:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3601, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22705:29:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22705:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 3600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 3603, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22740:29:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3602, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22740:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 3605, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22775:35:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3604, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22775:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 3609, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22816:57:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3608, - "keyType": { - "id": 3606, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22824:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22816:27:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3607, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22835:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 3613, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 3999, - "src": "22879:42:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3612, - "keyType": { - "id": 3610, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22887:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22879:27:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3611, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22898:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 3617, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 3616, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3615, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3617, - "src": "22946:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3614, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22946:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22945:16:3" - }, - "src": "22928:34:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 3623, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 3622, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3619, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 3623, - "src": "22980:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3618, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22980:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3621, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3623, - "src": "23002:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3620, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23002:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22979:38:3" - }, - "src": "22967:51:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 3629, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 3628, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3625, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 3629, - "src": "23039:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23039:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3627, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3629, - "src": "23061:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3626, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23061:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23038:38:3" - }, - "src": "23023:54:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 3635, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 3634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3631, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "23099:20:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23099:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3633, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3635, - "src": "23121:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23121:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23098:38:3" - }, - "src": "23082:55:3" - }, - { - "body": { - "id": 3646, - "nodeType": "Block", - "src": "23165:77:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3638, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23183:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23183:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3640, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "23202:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23183:28:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 3642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23212:11:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 3637, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23175:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23175:49:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3644, - "nodeType": "ExpressionStatement", - "src": "23175:49:3" - }, - { - "id": 3645, - "nodeType": "PlaceholderStatement", - "src": "23234:1:3" - } - ] - }, - "documentation": null, - "id": 3647, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 3636, - "nodeType": "ParameterList", - "parameters": [], - "src": "23162:2:3" - }, - "src": "23143:99:3", - "visibility": "internal" - }, - { - "body": { - "id": 3683, - "nodeType": "Block", - "src": "23287:283:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3651, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23297:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3652, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3730, - "src": "23320:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23320:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23297:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3655, - "nodeType": "ExpressionStatement", - "src": "23297:39:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3656, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "23346:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3657, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3697, - "src": "23363:24:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23363:26:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23346:43:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3660, - "nodeType": "ExpressionStatement", - "src": "23346:43:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3661, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23403:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23422:1:3", - "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": 3662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23414:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23414:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23403:21:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3681, - "nodeType": "IfStatement", - "src": "23399:154:3", - "trueBody": { - "id": 3680, - "nodeType": "Block", - "src": "23426:127:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3666, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3613, - "src": "23440:7:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3668, - "indexExpression": { - "argumentTypes": null, - "id": 3667, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23448:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23440:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3670, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23466:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3669, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3759, - "src": "23459:6:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23459:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23440:34:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3673, - "nodeType": "ExpressionStatement", - "src": "23440:34:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3674, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3609, - "src": "23488:22:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3676, - "indexExpression": { - "argumentTypes": null, - "id": 3675, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3649, - "src": "23511:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23488:31:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3677, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23522:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23488:54:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3679, - "nodeType": "ExpressionStatement", - "src": "23488:54:3" - } - ] - } - }, - { - "id": 3682, - "nodeType": "PlaceholderStatement", - "src": "23562:1:3" - } - ] - }, - "documentation": null, - "id": 3684, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 3650, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3649, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3684, - "src": "23270:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3648, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23270:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23269:17:3" - }, - "src": "23248:322:3", - "visibility": "internal" - }, - { - "body": { - "id": 3696, - "nodeType": "Block", - "src": "23642:63:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3691, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23668:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23668:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3693, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "23685:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3689, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2747, - "src": "23659:4:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$2747_$", - "typeString": "type(library Math)" - } - }, - "id": 3690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 2714, - "src": "23659:8:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23659:39:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3688, - "id": 3695, - "nodeType": "Return", - "src": "23652:46:3" - } - ] - }, - "documentation": null, - "id": 3697, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3685, - "nodeType": "ParameterList", - "parameters": [], - "src": "23609:2:3" - }, - "returnParameters": { - "id": 3688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3687, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3697, - "src": "23633:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23633:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23632:9:3" - }, - "scope": 3999, - "src": "23576:129:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3729, - "nodeType": "Block", - "src": "23767:352:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3702, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3496, - "src": "23781:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23781:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3704, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23798:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23781:18:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3709, - "nodeType": "IfStatement", - "src": "23777:76:3", - "trueBody": { - "id": 3708, - "nodeType": "Block", - "src": "23801:52:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3706, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23822:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3701, - "id": 3707, - "nodeType": "Return", - "src": "23815:27:3" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3724, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3496, - "src": "24084:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24084:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 3721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24053:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3718, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "24016:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3715, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "23975:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3712, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3697, - "src": "23923:24:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:26:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "23923:51:3", - "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": 3716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:67:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "23923:92:3", - "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": 3719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:104:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "23923:129:3", - "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": 3722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:135:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "23923:160:3", - "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": 3726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23923:175:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3710, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3605, - "src": "23881:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "23881:24:3", - "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": 3727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23881:231:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3701, - "id": 3728, - "nodeType": "Return", - "src": "23862:250:3" - } - ] - }, - "documentation": null, - "id": 3730, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3698, - "nodeType": "ParameterList", - "parameters": [], - "src": "23734:2:3" - }, - "returnParameters": { - "id": 3701, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3700, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3730, - "src": "23758:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3699, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23758:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23757:9:3" - }, - "scope": 3999, - "src": "23711:408:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3758, - "nodeType": "Block", - "src": "24188:196:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3753, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3613, - "src": "24360:7:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3755, - "indexExpression": { - "argumentTypes": null, - "id": 3754, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "24368:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24360:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 3750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24333:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3744, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3609, - "src": "24278:22:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3746, - "indexExpression": { - "argumentTypes": null, - "id": 3745, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "24301:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24278:31:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3741, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3730, - "src": "24257:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 3742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24257:16:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "24257:20:3", - "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": 3747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24257:53:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3738, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3732, - "src": "24227:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3737, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3508, - "src": "24217:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:18:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3740, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "24217:39:3", - "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": 3748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:94:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "24217:115:3", - "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": 3751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:121:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3752, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "24217:142:3", - "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": 3756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24217:160:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3736, - "id": 3757, - "nodeType": "Return", - "src": "24198:179:3" - } - ] - }, - "documentation": null, - "id": 3759, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3733, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3732, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 3759, - "src": "24141:15:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3731, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24141:7:3", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24140:17:3" - }, - "returnParameters": { - "id": 3736, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3735, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3759, - "src": "24179:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3734, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24179:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24178:9:3" - }, - "scope": 3999, - "src": "24125:259:3", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3789, - "nodeType": "Block", - "src": "24546:124:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3771, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3761, - "src": "24564:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3772, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24573:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24564:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 3774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24576:16:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 3770, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24556:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24556:37:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3776, - "nodeType": "ExpressionStatement", - "src": "24556:37:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3780, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3761, - "src": "24615:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3777, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19324, - "src": "24603:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMETHPool_$3999", - "typeString": "contract super YAMETHPool" - } - }, - "id": 3779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 3545, - "src": "24603:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24603:19:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3782, - "nodeType": "ExpressionStatement", - "src": "24603:19:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24644:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24644:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3786, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3761, - "src": "24656:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3783, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3623, - "src": "24637:6:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24637:26:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3788, - "nodeType": "EmitStatement", - "src": "24632:31:3" - } - ] - }, - "documentation": null, - "id": 3790, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3764, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24523:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24523:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3766, - "modifierName": { - "argumentTypes": null, - "id": 3763, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "24510:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24510:24:3" - }, - { - "arguments": null, - "id": 3768, - "modifierName": { - "argumentTypes": null, - "id": 3767, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3647, - "src": "24535:10:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24535:10:3" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3761, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3790, - "src": "24487:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24487:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24486:16:3" - }, - "returnParameters": { - "id": 3769, - "nodeType": "ParameterList", - "parameters": [], - "src": "24546:0:3" - }, - "scope": 3999, - "src": "24472:198:3", - "stateMutability": "nonpayable", - "superFunction": 3545, - "visibility": "public" - }, - { - "body": { - "id": 3820, - "nodeType": "Block", - "src": "24753:133:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3802, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3792, - "src": "24771:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24780:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24771:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 3805, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24783:19:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 3801, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24763:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24763:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3807, - "nodeType": "ExpressionStatement", - "src": "24763:40:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3811, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3792, - "src": "24828:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3808, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19324, - "src": "24813:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMETHPool_$3999", - "typeString": "contract super YAMETHPool" - } - }, - "id": 3810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 3579, - "src": "24813:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24813:22:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3813, - "nodeType": "ExpressionStatement", - "src": "24813:22:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3815, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24860:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24860:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3817, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3792, - "src": "24872:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3814, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3629, - "src": "24850:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24850:29:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3819, - "nodeType": "EmitStatement", - "src": "24845:34:3" - } - ] - }, - "documentation": null, - "id": 3821, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3795, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24730:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24730:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3797, - "modifierName": { - "argumentTypes": null, - "id": 3794, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "24717:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24717:24:3" - }, - { - "arguments": null, - "id": 3799, - "modifierName": { - "argumentTypes": null, - "id": 3798, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3647, - "src": "24742:10:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24742:10:3" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3793, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3792, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 3821, - "src": "24694:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3791, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24694:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24693:16:3" - }, - "returnParameters": { - "id": 3800, - "nodeType": "ParameterList", - "parameters": [], - "src": "24753:0:3" - }, - "scope": 3999, - "src": "24676:210:3", - "stateMutability": "nonpayable", - "superFunction": 3579, - "visibility": "public" - }, - { - "body": { - "id": 3834, - "nodeType": "Block", - "src": "24917:69:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3826, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24946:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24946:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3825, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3508, - "src": "24936:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24936:21:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3824, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3821 - ], - "referencedDeclaration": 3821, - "src": "24927:8:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24927:31:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3830, - "nodeType": "ExpressionStatement", - "src": "24927:31:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 3831, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3900, - "src": "24968:9:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 3832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24968:11:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3833, - "nodeType": "ExpressionStatement", - "src": "24968:11:3" - } - ] - }, - "documentation": null, - "id": 3835, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3822, - "nodeType": "ParameterList", - "parameters": [], - "src": "24905:2:3" - }, - "returnParameters": { - "id": 3823, - "nodeType": "ParameterList", - "parameters": [], - "src": "24917:0:3" - }, - "scope": 3999, - "src": "24892:94:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 3899, - "nodeType": "Block", - "src": "25056:379:3", - "statements": [ - { - "assignments": [ - 3845 - ], - "declarations": [ - { - "constant": false, - "id": 3845, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3899, - "src": "25066:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3844, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25066:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3850, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3847, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25090:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25090:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3846, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3759, - "src": "25083:6:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 3849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25083:18:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25066:35:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3851, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3845, - "src": "25115:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3852, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25124:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25115:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3898, - "nodeType": "IfStatement", - "src": "25111:318:3", - "trueBody": { - "id": 3897, - "nodeType": "Block", - "src": "25127:302:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3854, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3613, - "src": "25141:7:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3857, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3855, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25149:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25149:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25141:19:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 3858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25163:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25141:23:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3860, - "nodeType": "ExpressionStatement", - "src": "25141:23:3" - }, - { - "assignments": [ - 3862 - ], - "declarations": [ - { - "constant": false, - "id": 3862, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 3897, - "src": "25178:21:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3861, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25178:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3870, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3865, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3589, - "src": "25214:3:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - ], - "id": 3864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25206:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25206:12:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3863, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3471, - "src": "25202:3:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$3471_$", - "typeString": "type(contract YAM)" - } - }, - "id": 3867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25202:17:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$3471", - "typeString": "contract YAM" - } - }, - "id": 3868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 3470, - "src": "25202:35:3", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 3869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25202:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25178:61:3" - }, - { - "assignments": [ - 3872 - ], - "declarations": [ - { - "constant": false, - "id": 3872, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 3897, - "src": "25253:18:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3871, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25253:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3882, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 3880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 3878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25304:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 3879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25308:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25304:6:3", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3875, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3862, - "src": "25285:13:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3873, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3845, - "src": "25274:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "25274:10:3", - "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": 3876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25274:25:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "25274:29:3", - "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": 3881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25274:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25253:58:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3886, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25342:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25342:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3888, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3872, - "src": "25354:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3883, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3589, - "src": "25325:3:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$3139", - "typeString": "contract IERC20" - } - }, - "id": 3885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3242, - "src": "25325:16:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3139_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3139_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 3889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25325:40:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3890, - "nodeType": "ExpressionStatement", - "src": "25325:40:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3892, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25395:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25395:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3894, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3872, - "src": "25407:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3891, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3635, - "src": "25384:10:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25384:34:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3896, - "nodeType": "EmitStatement", - "src": "25379:39:3" - } - ] - } - } - ] - }, - "documentation": null, - "id": 3900, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3838, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25033:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25033:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3840, - "modifierName": { - "argumentTypes": null, - "id": 3837, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "25020:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25020:24:3" - }, - { - "arguments": null, - "id": 3842, - "modifierName": { - "argumentTypes": null, - "id": 3841, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3647, - "src": "25045:10:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25045:10:3" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3836, - "nodeType": "ParameterList", - "parameters": [], - "src": "25010:2:3" - }, - "returnParameters": { - "id": 3843, - "nodeType": "ParameterList", - "parameters": [], - "src": "25056:0:3" - }, - "scope": 3999, - "src": "24992:443:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3997, - "nodeType": "Block", - "src": "25570:703:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3912, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25584:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25584:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 3914, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "25602:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25584:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3995, - "nodeType": "Block", - "src": "26087:180:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3973, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "26099:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3976, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "26123:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3974, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "26112:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "26112:10:3", - "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": 3977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26112:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26099:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3979, - "nodeType": "ExpressionStatement", - "src": "26099:33:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3980, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "26144:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3981, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "26161:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26144:26:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3983, - "nodeType": "ExpressionStatement", - "src": "26144:26:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3984, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "26182:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3987, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "26211:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3985, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3595, - "src": "26197:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "26197:13:3", - "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": 3988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26197:23:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26182:38:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3990, - "nodeType": "ExpressionStatement", - "src": "26182:38:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3992, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "26249:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3991, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3617, - "src": "26237:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26237:19:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3994, - "nodeType": "EmitStatement", - "src": "26232:24:3" - } - ] - }, - "id": 3996, - "nodeType": "IfStatement", - "src": "25580:687:3", - "trueBody": { - "id": 3972, - "nodeType": "Block", - "src": "25613:468:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3916, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25629:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25629:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3918, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "25648:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25629:31:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3953, - "nodeType": "Block", - "src": "25730:205:3", - "statements": [ - { - "assignments": [ - 3929 - ], - "declarations": [ - { - "constant": false, - "id": 3929, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 3953, - "src": "25746:17:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25746:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3935, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3932, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25783:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25783:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3930, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "25766:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2789, - "src": "25766:16:3", - "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": 3934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25766:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25746:53:3" - }, - { - "assignments": [ - 3937 - ], - "declarations": [ - { - "constant": false, - "id": 3937, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 3953, - "src": "25815:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3936, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25815:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3942, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3940, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "25848:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3938, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3929, - "src": "25834:9:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 2850, - "src": "25834:13:3", - "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": 3941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25834:25:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25815:44:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3943, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "25875:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3949, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "25913:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3946, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3937, - "src": "25899:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3944, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "25888:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "25888:10:3", - "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": 3947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25888:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "25888:24:3", - "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": 3950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25888:34:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25875:47:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3952, - "nodeType": "ExpressionStatement", - "src": "25875:47:3" - } - ] - }, - "id": 3954, - "nodeType": "IfStatement", - "src": "25625:310:3", - "trueBody": { - "id": 3927, - "nodeType": "Block", - "src": "25662:62:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3920, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3601, - "src": "25678:10:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3923, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "25702:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3921, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "25691:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 2866, - "src": "25691:10:3", - "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": 3924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25691:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25678:33:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3926, - "nodeType": "ExpressionStatement", - "src": "25678:33:3" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 3958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3955, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3603, - "src": "25946:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3956, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25963:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25963:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25946:32:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3959, - "nodeType": "ExpressionStatement", - "src": "25946:32:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 3966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3960, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3598, - "src": "25990:12:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3964, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3592, - "src": "26025:8:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3961, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26005:5:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26005:15:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2773, - "src": "26005:19:3", - "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": 3965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26005:29:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25990:44:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3967, - "nodeType": "ExpressionStatement", - "src": "25990:44:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3969, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3902, - "src": "26063:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3968, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3617, - "src": "26051:11:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26051:19:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3971, - "nodeType": "EmitStatement", - "src": "26046:24:3" - } - ] - } - } - ] - }, - "documentation": null, - "id": 3998, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3905, - "modifierName": { - "argumentTypes": null, - "id": 3904, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3451, - "src": "25510:22:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25510:22:3" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3908, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25562:1:3", - "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": 3907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25554:7:3", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25554:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 3910, - "modifierName": { - "argumentTypes": null, - "id": 3906, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3684, - "src": "25541:12:3", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25541:24:3" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3903, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3902, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 3998, - "src": "25469:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3901, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25469:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25468:16:3" - }, - "returnParameters": { - "id": 3911, - "nodeType": "ParameterList", - "parameters": [], - "src": "25570:0:3" - }, - "scope": 3999, - "src": "25441:832:3", - "stateMutability": "nonpayable", - "superFunction": 3439, - "visibility": "external" - } - ], - "scope": 4000, - "src": "22374:3901:3" - } - ], - "src": "1490:24786:3" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0xF7a280F71f3a31e4eeBa6deC7923768f0f1B91Ae", - "transactionHash": "0xda38a9697586732a3675f08ea014758fc45696bf406aed39ab67eb72294264b0" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.544Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMGovernanceStorage.json b/build/contracts/YAMGovernanceStorage.json deleted file mode 100644 index f5f438e..0000000 --- a/build/contracts/YAMGovernanceStorage.json +++ /dev/null @@ -1,1072 +0,0 @@ -{ - "contractName": "YAMGovernanceStorage", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":\"YAMGovernanceStorage\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506103c1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80637ecebe00116100505780637ecebe00146100aa578063e7a324dc146100bd578063f1127ed8146100c557610067565b806320606b701461006c5780636fcfff451461008a575b600080fd5b6100746100e6565b60405161008191906102eb565b60405180910390f35b61009d610098366004610179565b6100fd565b60405161008191906102f9565b6100746100b8366004610179565b610115565b610074610127565b6100d86100d336600461019f565b610133565b604051610081929190610307565b6040516100f2906102d5565b604051809103902081565b60026020526000908152604090205463ffffffff1681565b60036020526000908152604090205481565b6040516100f2906102e0565b60016020818152600093845260408085209091529183529120805491015463ffffffff9091169082565b80356101688161035e565b92915050565b803561016881610375565b60006020828403121561018b57600080fd5b6000610197848461015d565b949350505050565b600080604083850312156101b257600080fd5b60006101be858561015d565b92505060206101cf8582860161016e565b9150509250929050565b6101e281610339565b82525050565b60006101f5604383610329565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201527f6374290000000000000000000000000000000000000000000000000000000000604082015260430192915050565b600061027a603a83610329565b7f44656c65676174696f6e28616464726573732064656c6567617465652c75696e81527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020820152603a0192915050565b6101e281610355565b6000610168826101e8565b60006101688261026d565b6020810161016882846101d9565b6020810161016882846102cc565b6040810161031582856102cc565b61032260208301846101d9565b9392505050565b919050565b60006101688261033c565b90565b73ffffffffffffffffffffffffffffffffffffffff1690565b63ffffffff1690565b6103678161032e565b811461037257600080fd5b50565b6103678161035556fea365627a7a723158202c0c4076d587bcb4fbee9bc79dee18f3c5d9ac3d971beb1429851be0d2cea0156c6578706572696d656e74616cf564736f6c63430005110040", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100675760003560e01c80637ecebe00116100505780637ecebe00146100aa578063e7a324dc146100bd578063f1127ed8146100c557610067565b806320606b701461006c5780636fcfff451461008a575b600080fd5b6100746100e6565b60405161008191906102eb565b60405180910390f35b61009d610098366004610179565b6100fd565b60405161008191906102f9565b6100746100b8366004610179565b610115565b610074610127565b6100d86100d336600461019f565b610133565b604051610081929190610307565b6040516100f2906102d5565b604051809103902081565b60026020526000908152604090205463ffffffff1681565b60036020526000908152604090205481565b6040516100f2906102e0565b60016020818152600093845260408085209091529183529120805491015463ffffffff9091169082565b80356101688161035e565b92915050565b803561016881610375565b60006020828403121561018b57600080fd5b6000610197848461015d565b949350505050565b600080604083850312156101b257600080fd5b60006101be858561015d565b92505060206101cf8582860161016e565b9150509250929050565b6101e281610339565b82525050565b60006101f5604383610329565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201527f6374290000000000000000000000000000000000000000000000000000000000604082015260430192915050565b600061027a603a83610329565b7f44656c65676174696f6e28616464726573732064656c6567617465652c75696e81527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020820152603a0192915050565b6101e281610355565b6000610168826101e8565b60006101688261026d565b6020810161016882846101d9565b6020810161016882846102cc565b6040810161031582856102cc565b61032260208301846101d9565b9392505050565b919050565b60006101688261033c565b90565b73ffffffffffffffffffffffffffffffffffffffff1690565b63ffffffff1690565b6103678161032e565b811461037257600080fd5b50565b6103678161035556fea365627a7a723158202c0c4076d587bcb4fbee9bc79dee18f3c5d9ac3d971beb1429851be0d2cea0156c6578706572696d656e74616cf564736f6c63430005110040", - "sourceMap": "59:1076:26:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;59:1076:26;;;;;;;", - "deployedSourceMap": "59:1076:26:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;59:1076:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;685:122;;;:::i;:::-;;;;;;;;;;;;;;;;566:49;;;;;;;;;:::i;:::-;;;;;;;;1093:39;;;;;;;;;:::i;898:117::-;;;:::i;430:70::-;;;;;;;;;:::i;:::-;;;;;;;;;685:122;727:80;;;;;;;;;;;;;;685:122;:::o;566:49::-;;;;;;;;;;;;;;;:::o;1093:39::-;;;;;;;;;;;;;:::o;898:117::-;944:71;;;;;;430:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;;57:78;;;;;142:128;208:20;;233:32;208:20;233:32;;277:241;;381:2;369:9;360:7;356:23;352:32;349:2;;;397:1;394;387:12;349:2;432:1;449:53;494:7;474:9;449:53;;;439:63;343:175;-1:-1;;;;343:175;525:364;;;645:2;633:9;624:7;620:23;616:32;613:2;;;661:1;658;651:12;613:2;696:1;713:53;758:7;738:9;713:53;;;703:63;;675:97;803:2;821:52;865:7;856:6;845:9;841:22;821:52;;;811:62;;782:97;607:282;;;;;;896:113;979:24;997:5;979:24;;;974:3;967:37;961:48;;;1017:477;;1195:85;1277:2;1272:3;1195:85;;;1313:34;1293:55;;1382:34;1377:2;1368:12;;1361:56;1451:5;1446:2;1437:12;;1430:27;1485:2;1476:12;;1181:313;-1:-1;;1181:313;1503:431;;1681:85;1763:2;1758:3;1681:85;;;1799:34;1779:55;;1868:28;1863:2;1854:12;;1847:50;1925:2;1916:12;;1667:267;-1:-1;;1667:267;2062:110;2143:23;2160:5;2143:23;;2179:372;;2378:148;2522:3;2378:148;;2558:372;;2757:148;2901:3;2757:148;;2937:213;3055:2;3040:18;;3069:71;3044:9;3113:6;3069:71;;3377:209;3493:2;3478:18;;3507:69;3482:9;3549:6;3507:69;;3593:320;3737:2;3722:18;;3751:69;3726:9;3793:6;3751:69;;;3831:72;3899:2;3888:9;3884:18;3875:6;3831:72;;;3708:205;;;;;;3921:145;4057:3;4035:31;-1:-1;4035:31;4074:91;;4136:24;4154:5;4136:24;;4172:72;4234:5;4217:27;4251:121;4324:42;4313:54;;4296:76;4458:88;4530:10;4519:22;;4502:44;4553:117;4622:24;4640:5;4622:24;;;4615:5;4612:35;4602:2;;4661:1;4658;4651:12;4602:2;4596:74;;4677:115;4745:23;4762:5;4745:23;", - "source": "pragma solidity 0.5.17;\npragma experimental ABIEncoderV2;\n\ncontract YAMGovernanceStorage {\n /// @notice A record of each accounts delegate\n mapping (address => address) internal _delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint256 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping (address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH = keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping (address => uint) public nonces;\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol", - "exportedSymbols": { - "YAMGovernanceStorage": [ - 18944 - ] - }, - "id": 18945, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18909, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:26" - }, - { - "id": 18910, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:26" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 18944, - "linearizedBaseContracts": [ - 18944 - ], - "name": "YAMGovernanceStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 18914, - "name": "_delegates", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "146:48:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - }, - "typeName": { - "id": 18913, - "keyType": { - "id": 18911, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "155:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "146:28:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - }, - "valueType": { - "id": 18912, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "166:7:26", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "canonicalName": "YAMGovernanceStorage.Checkpoint", - "id": 18919, - "members": [ - { - "constant": false, - "id": 18916, - "name": "fromBlock", - "nodeType": "VariableDeclaration", - "scope": 18919, - "src": "305:16:26", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18915, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "305:6:26", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18918, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 18919, - "src": "331:13:26", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "331:7:26", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Checkpoint", - "nodeType": "StructDefinition", - "scope": 18944, - "src": "277:74:26", - "visibility": "public" - }, - { - "constant": false, - "id": 18925, - "name": "checkpoints", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "430:70:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18919_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint))" - }, - "typeName": { - "id": 18924, - "keyType": { - "id": 18920, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "439:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "430:51:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18919_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint))" - }, - "valueType": { - "id": 18923, - "keyType": { - "id": 18921, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "459:6:26", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Mapping", - "src": "450:30:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18919_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint)" - }, - "valueType": { - "contractScope": null, - "id": 18922, - "name": "Checkpoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18919, - "src": "469:10:26", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18919_storage_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint" - } - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 18929, - "name": "numCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "566:49:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - }, - "typeName": { - "id": 18928, - "keyType": { - "id": 18926, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "575:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "566:27:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - }, - "valueType": { - "id": 18927, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "586:6:26", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 18934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "685:122:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18930, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "685:7:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 18932, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "737:69:26", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 18931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19237, - "src": "727:9:26", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "727:80:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 18939, - "name": "DELEGATION_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "898:117:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18935, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "898:7:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "44656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929", - "id": 18937, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "954:60:26", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf", - "typeString": "literal_string \"Delegation(address delegatee,uint256 nonce,uint256 expiry)\"" - }, - "value": "Delegation(address delegatee,uint256 nonce,uint256 expiry)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf", - "typeString": "literal_string \"Delegation(address delegatee,uint256 nonce,uint256 expiry)\"" - } - ], - "id": 18936, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19237, - "src": "944:9:26", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "944:71:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 18943, - "name": "nonces", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "1093:39:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 18942, - "keyType": { - "id": 18940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1102:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1093:25:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 18941, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1113:4:26", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 18945, - "src": "59:1076:26" - } - ], - "src": "0:1136:26" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol", - "exportedSymbols": { - "YAMGovernanceStorage": [ - 18944 - ] - }, - "id": 18945, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18909, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:26" - }, - { - "id": 18910, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:26" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 18944, - "linearizedBaseContracts": [ - 18944 - ], - "name": "YAMGovernanceStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 18914, - "name": "_delegates", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "146:48:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - }, - "typeName": { - "id": 18913, - "keyType": { - "id": 18911, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "155:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "146:28:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - }, - "valueType": { - "id": 18912, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "166:7:26", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "canonicalName": "YAMGovernanceStorage.Checkpoint", - "id": 18919, - "members": [ - { - "constant": false, - "id": 18916, - "name": "fromBlock", - "nodeType": "VariableDeclaration", - "scope": 18919, - "src": "305:16:26", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18915, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "305:6:26", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18918, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 18919, - "src": "331:13:26", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "331:7:26", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Checkpoint", - "nodeType": "StructDefinition", - "scope": 18944, - "src": "277:74:26", - "visibility": "public" - }, - { - "constant": false, - "id": 18925, - "name": "checkpoints", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "430:70:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18919_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint))" - }, - "typeName": { - "id": 18924, - "keyType": { - "id": 18920, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "439:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "430:51:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18919_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint))" - }, - "valueType": { - "id": 18923, - "keyType": { - "id": 18921, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "459:6:26", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Mapping", - "src": "450:30:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18919_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint)" - }, - "valueType": { - "contractScope": null, - "id": 18922, - "name": "Checkpoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18919, - "src": "469:10:26", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18919_storage_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint" - } - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 18929, - "name": "numCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "566:49:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - }, - "typeName": { - "id": 18928, - "keyType": { - "id": 18926, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "575:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "566:27:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - }, - "valueType": { - "id": 18927, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "586:6:26", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 18934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "685:122:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18930, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "685:7:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 18932, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "737:69:26", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 18931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19237, - "src": "727:9:26", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "727:80:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 18939, - "name": "DELEGATION_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "898:117:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18935, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "898:7:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "44656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929", - "id": 18937, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "954:60:26", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf", - "typeString": "literal_string \"Delegation(address delegatee,uint256 nonce,uint256 expiry)\"" - }, - "value": "Delegation(address delegatee,uint256 nonce,uint256 expiry)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf", - "typeString": "literal_string \"Delegation(address delegatee,uint256 nonce,uint256 expiry)\"" - } - ], - "id": 18936, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19237, - "src": "944:9:26", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "944:71:26", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 18943, - "name": "nonces", - "nodeType": "VariableDeclaration", - "scope": 18944, - "src": "1093:39:26", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 18942, - "keyType": { - "id": 18940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1102:7:26", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1093:25:26", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 18941, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1113:4:26", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 18945, - "src": "59:1076:26" - } - ], - "src": "0:1136:26" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-09T23:21:18.302Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMGovernanceToken.json b/build/contracts/YAMGovernanceToken.json deleted file mode 100644 index ee1d237..0000000 --- a/build/contracts/YAMGovernanceToken.json +++ /dev/null @@ -1,16251 +0,0 @@ -{ - "contractName": "YAMGovernanceToken", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "BASE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "incentivizer_", - "type": "address" - } - ], - "name": "_setIncentivizer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "incentivizer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "internalDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "indexDelta", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "positive", - "type": "bool" - } - ], - "name": "rebase", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamsScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldIncentivizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newIncentivizer\",\"type\":\"address\"}],\"name\":\"NewIncentivizer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevYamsScalingFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newYamsScalingFactor\",\"type\":\"uint256\"}],\"name\":\"Rebase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"incentivizer_\",\"type\":\"address\"}],\"name\":\"_setIncentivizer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"incentivizer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"internalDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexDelta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"positive\",\"type\":\"bool\"}],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamsScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\",\"expiry\":\"The time at which to expire the signature\",\"nonce\":\"The contract state required to match the signature\",\"r\":\"Half of the ECDSA signature pair\",\"s\":\"Half of the ECDSA signature pair\",\"v\":\"The recovery byte of the signature\"}},\"delegates(address)\":{\"params\":{\"delegator\":\"The address to get delegatee for\"}},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"The address to get votes balance\"},\"return\":\"The number of current votes for `account`\"},\"getPriorVotes(address,uint256)\":{\"details\":\"Block number must be a finalized block or else this function will revert to prevent misinformation.\",\"params\":{\"account\":\"The address of the account to check\",\"blockNumber\":\"The block number to get the vote balance at\"},\"return\":\"The number of votes the account had as of the given block\"}}},\"userdoc\":{\"methods\":{\"delegate(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Delegates votes from signatory to `delegatee`\"},\"delegates(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"getCurrentVotes(address)\":{\"notice\":\"Gets the current votes balance for `account`\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"Determine the prior number of votes for an account as of a block number\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":\"YAMGovernanceToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity 0.5.17;\npragma experimental ABIEncoderV2;\n\nimport \"./YAMGovernanceStorage.sol\";\nimport \"./YAMTokenInterface.sol\";\n\ncontract YAMGovernanceToken is YAMTokenInterface {\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegator The address to get delegatee for\n */\n function delegates(address delegator)\n external\n view\n returns (address)\n {\n return _delegates[delegator];\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n external\n {\n bytes32 domainSeparator = keccak256(\n abi.encode(\n DOMAIN_TYPEHASH,\n keccak256(bytes(name)),\n getChainId(),\n address(this)\n )\n );\n\n bytes32 structHash = keccak256(\n abi.encode(\n DELEGATION_TYPEHASH,\n delegatee,\n nonce,\n expiry\n )\n );\n\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n domainSeparator,\n structHash\n )\n );\n\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"YAM::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"YAM::delegateBySig: invalid nonce\");\n require(now <= expiry, \"YAM::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account)\n external\n view\n returns (uint256)\n {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber)\n external\n view\n returns (uint256)\n {\n require(blockNumber < block.number, \"YAM::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee)\n internal\n {\n address currentDelegate = _delegates[delegator];\n uint256 delegatorBalance = _yamBalances[delegator]; // balance of underlying YAMs (not scaled);\n _delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n // decrease old representative\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint256 srcRepNew = srcRepOld.sub(amount);\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n // increase new representative\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint256 dstRepNew = dstRepOld.add(amount);\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(\n address delegatee,\n uint32 nCheckpoints,\n uint256 oldVotes,\n uint256 newVotes\n )\n internal\n {\n uint32 blockNumber = safe32(block.number, \"YAM::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2**32, errorMessage);\n return uint32(n);\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly { chainId := chainid() }\n return chainId;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol", - "exportedSymbols": { - "YAMGovernanceToken": [ - 18930 - ] - }, - "id": 18931, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18376, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:25" - }, - { - "id": 18377, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:25" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol", - "file": "./YAMGovernanceStorage.sol", - "id": 18378, - "nodeType": "ImportDirective", - "scope": 18931, - "sourceUnit": 18968, - "src": "59:36:25", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "./YAMTokenInterface.sol", - "id": 18379, - "nodeType": "ImportDirective", - "scope": 18931, - "sourceUnit": 19203, - "src": "96:33:25", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 18380, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "162:17:25", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 18381, - "nodeType": "InheritanceSpecifier", - "src": "162:17:25" - } - ], - "contractDependencies": [ - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 18930, - "linearizedBaseContracts": [ - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMGovernanceToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice An event thats emitted when an account changes its delegate", - "id": 18389, - "name": "DelegateChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18388, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18383, - "indexed": true, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18389, - "src": "287:25:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18382, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "287:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18385, - "indexed": true, - "name": "fromDelegate", - "nodeType": "VariableDeclaration", - "scope": 18389, - "src": "314:28:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18384, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "314:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18387, - "indexed": true, - "name": "toDelegate", - "nodeType": "VariableDeclaration", - "scope": 18389, - "src": "344:26:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18386, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "344:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "286:85:25" - }, - "src": "265:107:25" - }, - { - "anonymous": false, - "documentation": "@notice An event thats emitted when a delegate account's vote balance changes", - "id": 18397, - "name": "DelegateVotesChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18396, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18391, - "indexed": true, - "name": "delegate", - "nodeType": "VariableDeclaration", - "scope": 18397, - "src": "491:24:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18390, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "491:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18393, - "indexed": false, - "name": "previousBalance", - "nodeType": "VariableDeclaration", - "scope": 18397, - "src": "517:20:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18392, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "517:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18395, - "indexed": false, - "name": "newBalance", - "nodeType": "VariableDeclaration", - "scope": 18397, - "src": "539:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18394, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "539:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "490:65:25" - }, - "src": "464:92:25" - }, - { - "body": { - "id": 18408, - "nodeType": "Block", - "src": "796:45:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18404, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "813:10:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 18406, - "indexExpression": { - "argumentTypes": null, - "id": 18405, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18399, - "src": "824:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "813:21:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 18403, - "id": 18407, - "nodeType": "Return", - "src": "806:28:25" - } - ] - }, - "documentation": "@notice Delegate votes from `msg.sender` to `delegatee`\n@param delegator The address to get delegatee for", - "id": 18409, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18400, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18399, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18409, - "src": "717:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18398, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "717:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "716:19:25" - }, - "returnParameters": { - "id": 18403, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18402, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18409, - "src": "783:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18401, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "783:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "782:9:25" - }, - "scope": 18930, - "src": "698:143:25", - "stateMutability": "view", - "superFunction": 19156, - "visibility": "external" - }, - { - "body": { - "id": 18420, - "nodeType": "Block", - "src": "1025:56:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18415, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1052:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1052:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 18417, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18411, - "src": "1064:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18414, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18716, - "src": "1042:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 18418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1042:32:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 18413, - "id": 18419, - "nodeType": "Return", - "src": "1035:39:25" - } - ] - }, - "documentation": "@notice Delegate votes from `msg.sender` to `delegatee`\n@param delegatee The address to delegate votes to", - "id": 18421, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18412, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18411, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18421, - "src": "997:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18410, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "997:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "996:19:25" - }, - "returnParameters": { - "id": 18413, - "nodeType": "ParameterList", - "parameters": [], - "src": "1025:0:25" - }, - "scope": 18930, - "src": "979:102:25", - "stateMutability": "nonpayable", - "superFunction": 19149, - "visibility": "external" - }, - { - "body": { - "id": 18518, - "nodeType": "Block", - "src": "1677:959:25", - "statements": [ - { - "assignments": [ - 18437 - ], - "declarations": [ - { - "constant": false, - "id": 18437, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "1687:23:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18436, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1687:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18454, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18441, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18957, - "src": "1764:15:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18444, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19212, - "src": "1813:4:25", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - ], - "id": 18443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1807:5:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 18445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1807:11:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes storage pointer" - } - ], - "id": 18442, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "1797:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1797:22:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18447, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18929, - "src": "1837:10:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 18448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1837:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18450, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19336, - "src": "1875:4:25", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - ], - "id": 18449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1867:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1867:13:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 18439, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1736:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18440, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1736:10:25", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 18452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1736:158:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18438, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "1713:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1713:191:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1687:217:25" - }, - { - "assignments": [ - 18456 - ], - "declarations": [ - { - "constant": false, - "id": 18456, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "1915:18:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18455, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1915:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18466, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18460, - "name": "DELEGATION_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18962, - "src": "1987:19:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18461, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18423, - "src": "2024:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18462, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18425, - "src": "2051:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18463, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18427, - "src": "2074:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 18458, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1959:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18459, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1959:10:25", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 18464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1959:135:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18457, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "1936:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1936:168:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1915:189:25" - }, - { - "assignments": [ - 18468 - ], - "declarations": [ - { - "constant": false, - "id": 18468, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "2115:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18467, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2115:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18477, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 18472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2189:10:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 18473, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18437, - "src": "2217:15:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18474, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18456, - "src": "2250:10:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 18470, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2155:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2155:16:25", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 18475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2155:119:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18469, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "2132:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2132:152:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2115:169:25" - }, - { - "assignments": [ - 18479 - ], - "declarations": [ - { - "constant": false, - "id": 18479, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "2295:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2295:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18486, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18481, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18468, - "src": "2325:6:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18482, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18429, - "src": "2333:1:25", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 18483, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18431, - "src": "2336:1:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18484, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18433, - "src": "2339:1:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 18480, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "2315:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 18485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2315:26:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2295:46:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18488, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18479, - "src": "2359:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 18490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2380:1:25", - "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": 18489, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2372:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2372:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2359:23:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a64656c656761746542795369673a20696e76616c6964207369676e6174757265", - "id": 18493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2384:39:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_184babfb6466f1dab112d4792e91ed0d0fe450a5c48fc35742f2690afebf7b67", - "typeString": "literal_string \"YAM::delegateBySig: invalid signature\"" - }, - "value": "YAM::delegateBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_184babfb6466f1dab112d4792e91ed0d0fe450a5c48fc35742f2690afebf7b67", - "typeString": "literal_string \"YAM::delegateBySig: invalid signature\"" - } - ], - "id": 18487, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2351:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2351:73:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18495, - "nodeType": "ExpressionStatement", - "src": "2351:73:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18497, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18425, - "src": "2442:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2451:19:25", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18498, - "name": "nonces", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18966, - "src": "2451:6:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 18500, - "indexExpression": { - "argumentTypes": null, - "id": 18499, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18479, - "src": "2458:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2451:17:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2442:28:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e6365", - "id": 18503, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2472:35:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0fc6782a8889e626c37744401e2fa3617fa4e15e94083efa2f77057db9cf34e6", - "typeString": "literal_string \"YAM::delegateBySig: invalid nonce\"" - }, - "value": "YAM::delegateBySig: invalid nonce" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0fc6782a8889e626c37744401e2fa3617fa4e15e94083efa2f77057db9cf34e6", - "typeString": "literal_string \"YAM::delegateBySig: invalid nonce\"" - } - ], - "id": 18496, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2434:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2434:74:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18505, - "nodeType": "ExpressionStatement", - "src": "2434:74:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18507, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "2526:3:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 18508, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18427, - "src": "2533:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2526:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a64656c656761746542795369673a207369676e61747572652065787069726564", - "id": 18510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2541:39:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_93fb057ac97627637ebb8a8e6875c18ebe19dea7b041453dfbe91101ba3b9a43", - "typeString": "literal_string \"YAM::delegateBySig: signature expired\"" - }, - "value": "YAM::delegateBySig: signature expired" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_93fb057ac97627637ebb8a8e6875c18ebe19dea7b041453dfbe91101ba3b9a43", - "typeString": "literal_string \"YAM::delegateBySig: signature expired\"" - } - ], - "id": 18506, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2518:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2518:63:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18512, - "nodeType": "ExpressionStatement", - "src": "2518:63:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18514, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18479, - "src": "2608:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18515, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18423, - "src": "2619:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18513, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18716, - "src": "2598:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 18516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2598:31:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 18435, - "id": 18517, - "nodeType": "Return", - "src": "2591:38:25" - } - ] - }, - "documentation": "@notice Delegates votes from signatory to `delegatee`\n@param delegatee The address to delegate votes to\n@param nonce The contract state required to match the signature\n@param expiry The time at which to expire the signature\n@param v The recovery byte of the signature\n@param r Half of the ECDSA signature pair\n@param s Half of the ECDSA signature pair", - "id": 18519, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18423, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1536:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18422, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1536:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18425, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1563:10:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18424, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1563:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18427, - "name": "expiry", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1583:11:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18426, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1583:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18429, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1604:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 18428, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1604:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18431, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1621:9:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18430, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1621:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18433, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1640:9:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18432, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1640:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1526:129:25" - }, - "returnParameters": { - "id": 18435, - "nodeType": "ParameterList", - "parameters": [], - "src": "1677:0:25" - }, - "scope": 18930, - "src": "1504:1132:25", - "stateMutability": "nonpayable", - "superFunction": 19144, - "visibility": "external" - }, - { - "body": { - "id": 18546, - "nodeType": "Block", - "src": "2932:146:25", - "statements": [ - { - "assignments": [ - 18527 - ], - "declarations": [ - { - "constant": false, - "id": 18527, - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18546, - "src": "2942:19:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18526, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2942:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18531, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18528, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "2964:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18530, - "indexExpression": { - "argumentTypes": null, - "id": 18529, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18521, - "src": "2979:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2964:23:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2942:45:25" - }, - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18532, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18527, - "src": "3004:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3019:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3004:16:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3070:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 18544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "3004:67:25", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18535, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "3023:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18537, - "indexExpression": { - "argumentTypes": null, - "id": 18536, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18521, - "src": "3035:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3023:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18541, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18538, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18527, - "src": "3044:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3059:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3044:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3023:38:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18542, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "3023:44:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18525, - "id": 18545, - "nodeType": "Return", - "src": "2997:74:25" - } - ] - }, - "documentation": "@notice Gets the current votes balance for `account`\n@param account The address to get votes balance\n@return The number of current votes for `account`", - "id": 18547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getCurrentVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18521, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18547, - "src": "2855:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18520, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2855:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2854:17:25" - }, - "returnParameters": { - "id": 18525, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18524, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18547, - "src": "2919:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2919:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2918:9:25" - }, - "scope": 18930, - "src": "2830:248:25", - "stateMutability": "view", - "superFunction": 19163, - "visibility": "external" - }, - { - "body": { - "id": 18677, - "nodeType": "Block", - "src": "3618:1098:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18557, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "3636:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18558, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "3650:5:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 18559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3650:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3636:26:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e6564", - "id": 18561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3664:40:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_38d421f3d842114e4be7c1f8fe05e144cb3bff2df3d8a293f7ee1e74e3a8cb57", - "typeString": "literal_string \"YAM::getPriorVotes: not yet determined\"" - }, - "value": "YAM::getPriorVotes: not yet determined" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_38d421f3d842114e4be7c1f8fe05e144cb3bff2df3d8a293f7ee1e74e3a8cb57", - "typeString": "literal_string \"YAM::getPriorVotes: not yet determined\"" - } - ], - "id": 18556, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3628:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3628:77:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18563, - "nodeType": "ExpressionStatement", - "src": "3628:77:25" - }, - { - "assignments": [ - 18565 - ], - "declarations": [ - { - "constant": false, - "id": 18565, - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18677, - "src": "3716:19:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18564, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3716:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18569, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18566, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "3738:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18568, - "indexExpression": { - "argumentTypes": null, - "id": 18567, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "3753:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3738:23:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3716:45:25" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18570, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "3775:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18571, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3791:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3775:17:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18576, - "nodeType": "IfStatement", - "src": "3771:56:25", - "trueBody": { - "id": 18575, - "nodeType": "Block", - "src": "3794:33:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18573, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3815:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 18555, - "id": 18574, - "nodeType": "Return", - "src": "3808:8:25" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18577, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "3884:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18579, - "indexExpression": { - "argumentTypes": null, - "id": 18578, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "3896:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3884:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18583, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18580, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "3905:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18581, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3920:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3905:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3884:38:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "3884:48:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 18585, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "3936:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3884:63:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18597, - "nodeType": "IfStatement", - "src": "3880:145:25", - "trueBody": { - "id": 18596, - "nodeType": "Block", - "src": "3949:76:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18587, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "3970:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18589, - "indexExpression": { - "argumentTypes": null, - "id": 18588, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "3982:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3970:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18593, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18590, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "3991:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18591, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4006:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3991:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3970:38:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "3970:44:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18555, - "id": 18595, - "nodeType": "Return", - "src": "3963:51:25" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18598, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "4083:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18600, - "indexExpression": { - "argumentTypes": null, - "id": 18599, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "4095:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4083:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18602, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4104:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4083:23:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18603, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "4083:33:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 18604, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "4119:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4083:47:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18609, - "nodeType": "IfStatement", - "src": "4079:86:25", - "trueBody": { - "id": 18608, - "nodeType": "Block", - "src": "4132:33:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4153:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 18555, - "id": 18607, - "nodeType": "Return", - "src": "4146:8:25" - } - ] - } - }, - { - "assignments": [ - 18611 - ], - "declarations": [ - { - "constant": false, - "id": 18611, - "name": "lower", - "nodeType": "VariableDeclaration", - "scope": 18677, - "src": "4175:12:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18610, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4175:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18613, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 18612, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4190:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4175:16:25" - }, - { - "assignments": [ - 18615 - ], - "declarations": [ - { - "constant": false, - "id": 18615, - "name": "upper", - "nodeType": "VariableDeclaration", - "scope": 18677, - "src": "4201:12:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18614, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4201:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18619, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18616, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "4216:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4231:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4216:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4201:31:25" - }, - { - "body": { - "id": 18668, - "nodeType": "Block", - "src": "4264:396:25", - "statements": [ - { - "assignments": [ - 18624 - ], - "declarations": [ - { - "constant": false, - "id": 18624, - "name": "center", - "nodeType": "VariableDeclaration", - "scope": 18668, - "src": "4278:13:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18623, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4278:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18633, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18625, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4294:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18626, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4303:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 18627, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4311:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4303:13:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "id": 18629, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4302:15:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 18630, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4320:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "4302:19:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4294:27:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4278:43:25" - }, - { - "assignments": [ - 18635 - ], - "declarations": [ - { - "constant": false, - "id": 18635, - "name": "cp", - "nodeType": "VariableDeclaration", - "scope": 18668, - "src": "4362:20:25", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint" - }, - "typeName": { - "contractScope": null, - "id": 18634, - "name": "Checkpoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18942, - "src": "4362:10:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18641, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18636, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "4385:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18638, - "indexExpression": { - "argumentTypes": null, - "id": 18637, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "4397:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4385:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18640, - "indexExpression": { - "argumentTypes": null, - "id": 18639, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18624, - "src": "4406:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4385:28:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4362:51:25" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18642, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18635, - "src": "4431:2:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "id": 18643, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "4431:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18644, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "4447:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4431:27:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18650, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18635, - "src": "4518:2:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "id": 18651, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "4518:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 18652, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "4533:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4518:26:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 18665, - "nodeType": "Block", - "src": "4599:51:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 18659, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4617:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18660, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18624, - "src": "4625:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18661, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4634:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4625:10:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4617:18:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 18664, - "nodeType": "ExpressionStatement", - "src": "4617:18:25" - } - ] - }, - "id": 18666, - "nodeType": "IfStatement", - "src": "4514:136:25", - "trueBody": { - "id": 18658, - "nodeType": "Block", - "src": "4546:47:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 18654, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4564:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 18655, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18624, - "src": "4572:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4564:14:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 18657, - "nodeType": "ExpressionStatement", - "src": "4564:14:25" - } - ] - } - }, - "id": 18667, - "nodeType": "IfStatement", - "src": "4427:223:25", - "trueBody": { - "id": 18649, - "nodeType": "Block", - "src": "4460:48:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18646, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18635, - "src": "4485:2:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "id": 18647, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "4485:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18555, - "id": 18648, - "nodeType": "Return", - "src": "4478:15:25" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18620, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4249:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 18621, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4257:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4249:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 18669, - "nodeType": "WhileStatement", - "src": "4242:418:25" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18670, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "4676:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18672, - "indexExpression": { - "argumentTypes": null, - "id": 18671, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "4688:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4676:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18674, - "indexExpression": { - "argumentTypes": null, - "id": 18673, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4697:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4676:27:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "4676:33:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18555, - "id": 18676, - "nodeType": "Return", - "src": "4669:40:25" - } - ] - }, - "documentation": "@notice Determine the prior number of votes for an account as of a block number\n@dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n@param account The address of the account to check\n@param blockNumber The block number to get the vote balance at\n@return The number of votes the account had as of the given block", - "id": 18678, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18549, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18678, - "src": "3523:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18548, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3523:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18551, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 18678, - "src": "3540:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18550, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3540:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3522:35:25" - }, - "returnParameters": { - "id": 18555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18678, - "src": "3605:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3605:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3604:9:25" - }, - "scope": 18930, - "src": "3500:1216:25", - "stateMutability": "view", - "superFunction": 19129, - "visibility": "external" - }, - { - "body": { - "id": 18715, - "nodeType": "Block", - "src": "4800:352:25", - "statements": [ - { - "assignments": [ - 18686 - ], - "declarations": [ - { - "constant": false, - "id": 18686, - "name": "currentDelegate", - "nodeType": "VariableDeclaration", - "scope": 18715, - "src": "4810:23:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18685, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4810:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18690, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18687, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4836:10:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 18689, - "indexExpression": { - "argumentTypes": null, - "id": 18688, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "4847:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4836:21:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4810:47:25" - }, - { - "assignments": [ - 18692 - ], - "declarations": [ - { - "constant": false, - "id": 18692, - "name": "delegatorBalance", - "nodeType": "VariableDeclaration", - "scope": 18715, - "src": "4867:24:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4867:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18696, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18693, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4894:12:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 18695, - "indexExpression": { - "argumentTypes": null, - "id": 18694, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "4907:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4894:23:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4867:50:25" - }, - { - "expression": { - "argumentTypes": null, - "id": 18701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18697, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4971:10:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 18699, - "indexExpression": { - "argumentTypes": null, - "id": 18698, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "4982:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4971:21:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 18700, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18682, - "src": "4995:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4971:33:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18702, - "nodeType": "ExpressionStatement", - "src": "4971:33:25" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18704, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "5036:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18705, - "name": "currentDelegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18686, - "src": "5047:15:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18706, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18682, - "src": "5064:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18703, - "name": "DelegateChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 18389 - ], - "referencedDeclaration": 18389, - "src": "5020:15:25", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address,address)" - } - }, - "id": 18707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5020:54:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18708, - "nodeType": "EmitStatement", - "src": "5015:59:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18710, - "name": "currentDelegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18686, - "src": "5100:15:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18711, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18682, - "src": "5117:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18712, - "name": "delegatorBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18692, - "src": "5128:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18709, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "5085:14:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 18713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5085:60:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18714, - "nodeType": "ExpressionStatement", - "src": "5085:60:25" - } - ] - }, - "documentation": null, - "id": 18716, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18683, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18680, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18716, - "src": "4741:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18679, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4741:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18682, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18716, - "src": "4760:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18681, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4760:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4740:38:25" - }, - "returnParameters": { - "id": 18684, - "nodeType": "ParameterList", - "parameters": [], - "src": "4800:0:25" - }, - "scope": 18930, - "src": "4722:430:25", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18820, - "nodeType": "Block", - "src": "5239:848:25", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 18731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18725, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5253:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 18726, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5263:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5253:16:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18728, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18722, - "src": "5273:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18729, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5282:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5273:10:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5253:30:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18819, - "nodeType": "IfStatement", - "src": "5249:832:25", - "trueBody": { - "id": 18818, - "nodeType": "Block", - "src": "5285:796:25", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18732, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5303:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 18734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5321:1:25", - "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": 18733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5313:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5313:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5303:20:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18774, - "nodeType": "IfStatement", - "src": "5299:379:25", - "trueBody": { - "id": 18773, - "nodeType": "Block", - "src": "5325:353:25", - "statements": [ - { - "assignments": [ - 18738 - ], - "declarations": [ - { - "constant": false, - "id": 18738, - "name": "srcRepNum", - "nodeType": "VariableDeclaration", - "scope": 18773, - "src": "5390:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18737, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5390:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18742, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18739, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "5409:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18741, - "indexExpression": { - "argumentTypes": null, - "id": 18740, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5424:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5409:22:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5390:41:25" - }, - { - "assignments": [ - 18744 - ], - "declarations": [ - { - "constant": false, - "id": 18744, - "name": "srcRepOld", - "nodeType": "VariableDeclaration", - "scope": 18773, - "src": "5449:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18743, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5449:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18758, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18745, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18738, - "src": "5469:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5481:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5469:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5528:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 18757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "5469:60:25", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18748, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "5485:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18750, - "indexExpression": { - "argumentTypes": null, - "id": 18749, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5497:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5485:19:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18754, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18751, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18738, - "src": "5505:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5517:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5505:13:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5485:34:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18755, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "5485:40:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5449:80:25" - }, - { - "assignments": [ - 18760 - ], - "declarations": [ - { - "constant": false, - "id": 18760, - "name": "srcRepNew", - "nodeType": "VariableDeclaration", - "scope": 18773, - "src": "5547:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5547:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18765, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18763, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18722, - "src": "5581:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 18761, - "name": "srcRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18744, - "src": "5567:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "5567:13:25", - "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": 18764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5567:21:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5547:41:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18767, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5623:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18768, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18738, - "src": "5631:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 18769, - "name": "srcRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18744, - "src": "5642:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18770, - "name": "srcRepNew", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18760, - "src": "5653:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18766, - "name": "_writeCheckpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18894, - "src": "5606:16:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint32_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint32,uint256,uint256)" - } - }, - "id": 18771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5606:57:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18772, - "nodeType": "ExpressionStatement", - "src": "5606:57:25" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18775, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5696:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 18777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5714:1:25", - "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": 18776, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5706:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18778, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5706:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5696:20:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18817, - "nodeType": "IfStatement", - "src": "5692:379:25", - "trueBody": { - "id": 18816, - "nodeType": "Block", - "src": "5718:353:25", - "statements": [ - { - "assignments": [ - 18781 - ], - "declarations": [ - { - "constant": false, - "id": 18781, - "name": "dstRepNum", - "nodeType": "VariableDeclaration", - "scope": 18816, - "src": "5783:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18780, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5783:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18785, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18782, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "5802:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18784, - "indexExpression": { - "argumentTypes": null, - "id": 18783, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5817:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5802:22:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5783:41:25" - }, - { - "assignments": [ - 18787 - ], - "declarations": [ - { - "constant": false, - "id": 18787, - "name": "dstRepOld", - "nodeType": "VariableDeclaration", - "scope": 18816, - "src": "5842:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18786, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5842:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18801, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18788, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18781, - "src": "5862:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5874:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5862:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18799, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5921:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 18800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "5862:60:25", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18791, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "5878:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18793, - "indexExpression": { - "argumentTypes": null, - "id": 18792, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5890:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5878:19:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18797, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18794, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18781, - "src": "5898:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5910:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5898:13:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5878:34:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18798, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "5878:40:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5842:80:25" - }, - { - "assignments": [ - 18803 - ], - "declarations": [ - { - "constant": false, - "id": 18803, - "name": "dstRepNew", - "nodeType": "VariableDeclaration", - "scope": 18816, - "src": "5940:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18802, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5940:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18808, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18806, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18722, - "src": "5974:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 18804, - "name": "dstRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18787, - "src": "5960:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "5960:13:25", - "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": 18807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5960:21:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5940:41:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18810, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "6016:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18811, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18781, - "src": "6024:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 18812, - "name": "dstRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18787, - "src": "6035:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18813, - "name": "dstRepNew", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18803, - "src": "6046:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18809, - "name": "_writeCheckpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18894, - "src": "5999:16:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint32_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint32,uint256,uint256)" - } - }, - "id": 18814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5999:57:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18815, - "nodeType": "ExpressionStatement", - "src": "5999:57:25" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 18821, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_moveDelegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18723, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18718, - "name": "srcRep", - "nodeType": "VariableDeclaration", - "scope": 18821, - "src": "5182:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5182:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18720, - "name": "dstRep", - "nodeType": "VariableDeclaration", - "scope": 18821, - "src": "5198:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5198:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18722, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18821, - "src": "5214:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18721, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5214:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5181:48:25" - }, - "returnParameters": { - "id": 18724, - "nodeType": "ParameterList", - "parameters": [], - "src": "5239:0:25" - }, - "scope": 18930, - "src": "5158:929:25", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18893, - "nodeType": "Block", - "src": "6254:524:25", - "statements": [ - { - "assignments": [ - 18833 - ], - "declarations": [ - { - "constant": false, - "id": 18833, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 18893, - "src": "6264:18:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18832, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6264:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18839, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18835, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6292:5:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 18836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6292:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473", - "id": 18837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6306:53:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bde83c9110d5d6a9b2c61d0637aeaed894210d16f599828baf99da164d8adddf", - "typeString": "literal_string \"YAM::_writeCheckpoint: block number exceeds 32 bits\"" - }, - "value": "YAM::_writeCheckpoint: block number exceeds 32 bits" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_bde83c9110d5d6a9b2c61d0637aeaed894210d16f599828baf99da164d8adddf", - "typeString": "literal_string \"YAM::_writeCheckpoint: block number exceeds 32 bits\"" - } - ], - "id": 18834, - "name": "safe32", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18917, - "src": "6285:6:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint32_$", - "typeString": "function (uint256,string memory) pure returns (uint32)" - } - }, - "id": 18838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6285:75:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6264:96:25" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 18853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18840, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6375:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18841, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6390:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6375:16:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18843, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "6395:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18845, - "indexExpression": { - "argumentTypes": null, - "id": 18844, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6407:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6395:22:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18849, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18846, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6418:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6433:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6418:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6395:40:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18850, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "6395:50:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18851, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18833, - "src": "6449:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6395:65:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6375:85:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 18885, - "nodeType": "Block", - "src": "6550:155:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18866, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "6564:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18869, - "indexExpression": { - "argumentTypes": null, - "id": 18867, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6576:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6564:22:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18870, - "indexExpression": { - "argumentTypes": null, - "id": 18868, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6587:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6564:36:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18872, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18833, - "src": "6614:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 18873, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18829, - "src": "6627:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18871, - "name": "Checkpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18942, - "src": "6603:10:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Checkpoint_$18942_storage_ptr_$", - "typeString": "type(struct YAMGovernanceStorage.Checkpoint storage pointer)" - } - }, - "id": 18874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6603:33:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "src": "6564:72:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18876, - "nodeType": "ExpressionStatement", - "src": "6564:72:25" - }, - { - "expression": { - "argumentTypes": null, - "id": 18883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18877, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "6650:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18879, - "indexExpression": { - "argumentTypes": null, - "id": 18878, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6665:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6650:25:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18880, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6678:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6693:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6678:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6650:44:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 18884, - "nodeType": "ExpressionStatement", - "src": "6650:44:25" - } - ] - }, - "id": 18886, - "nodeType": "IfStatement", - "src": "6371:334:25", - "trueBody": { - "id": 18865, - "nodeType": "Block", - "src": "6462:82:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18854, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "6476:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18859, - "indexExpression": { - "argumentTypes": null, - "id": 18855, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6488:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6476:22:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18860, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18856, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6499:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18857, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6514:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6499:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6476:40:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18861, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "6476:46:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 18862, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18829, - "src": "6525:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6476:57:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18864, - "nodeType": "ExpressionStatement", - "src": "6476:57:25" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18888, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6741:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18889, - "name": "oldVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18827, - "src": "6752:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18890, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18829, - "src": "6762:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18887, - "name": "DelegateVotesChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 18397 - ], - "referencedDeclaration": 18397, - "src": "6720:20:25", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 18891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6720:51:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18892, - "nodeType": "EmitStatement", - "src": "6715:56:25" - } - ] - }, - "documentation": null, - "id": 18894, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_writeCheckpoint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18830, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18823, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6128:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18822, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6128:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18825, - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6155:19:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18824, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6155:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18827, - "name": "oldVotes", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6184:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18826, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6184:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18829, - "name": "newVotes", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6210:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18828, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6210:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6118:114:25" - }, - "returnParameters": { - "id": 18831, - "nodeType": "ParameterList", - "parameters": [], - "src": "6254:0:25" - }, - "scope": 18930, - "src": "6093:685:25", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18916, - "nodeType": "Block", - "src": "6867:75:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18904, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18896, - "src": "6885:1:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - }, - "id": 18907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 18905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6889:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 18906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6892:2:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "6889:5:25", - "typeDescriptions": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - } - }, - "src": "6885:9:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 18909, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18898, - "src": "6896:12:25", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 18903, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6877:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6877:32:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18911, - "nodeType": "ExpressionStatement", - "src": "6877:32:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18913, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18896, - "src": "6933:1:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6926:6:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 18914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6926:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "functionReturnParameters": 18902, - "id": 18915, - "nodeType": "Return", - "src": "6919:16:25" - } - ] - }, - "documentation": null, - "id": 18917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safe32", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18899, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18896, - "name": "n", - "nodeType": "VariableDeclaration", - "scope": 18917, - "src": "6800:6:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18895, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6800:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18898, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 18917, - "src": "6808:26:25", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 18897, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6808:6:25", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6799:36:25" - }, - "returnParameters": { - "id": 18902, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18901, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18917, - "src": "6859:6:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18900, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6859:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6858:8:25" - }, - "scope": 18930, - "src": "6784:158:25", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18928, - "nodeType": "Block", - "src": "6999:98:25", - "statements": [ - { - "assignments": [ - 18923 - ], - "declarations": [ - { - "constant": false, - "id": 18923, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 18928, - "src": "7009:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18922, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7009:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18924, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "7009:15:25" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 18923, - "isOffset": false, - "isSlot": false, - "src": "7045:7:25", - "valueSize": 1 - } - } - ], - "id": 18925, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "7034:33:25" - }, - { - "expression": { - "argumentTypes": null, - "id": 18926, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18923, - "src": "7083:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18921, - "id": 18927, - "nodeType": "Return", - "src": "7076:14:25" - } - ] - }, - "documentation": null, - "id": 18929, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18918, - "nodeType": "ParameterList", - "parameters": [], - "src": "6967:2:25" - }, - "returnParameters": { - "id": 18921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18920, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18929, - "src": "6993:4:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18919, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6993:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6992:6:25" - }, - "scope": 18930, - "src": "6948:149:25", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 18931, - "src": "131:6968:25" - } - ], - "src": "0:7100:25" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol", - "exportedSymbols": { - "YAMGovernanceToken": [ - 18930 - ] - }, - "id": 18931, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18376, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:25" - }, - { - "id": 18377, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:25" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol", - "file": "./YAMGovernanceStorage.sol", - "id": 18378, - "nodeType": "ImportDirective", - "scope": 18931, - "sourceUnit": 18968, - "src": "59:36:25", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "./YAMTokenInterface.sol", - "id": 18379, - "nodeType": "ImportDirective", - "scope": 18931, - "sourceUnit": 19203, - "src": "96:33:25", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 18380, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "162:17:25", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 18381, - "nodeType": "InheritanceSpecifier", - "src": "162:17:25" - } - ], - "contractDependencies": [ - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 18930, - "linearizedBaseContracts": [ - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMGovernanceToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice An event thats emitted when an account changes its delegate", - "id": 18389, - "name": "DelegateChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18388, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18383, - "indexed": true, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18389, - "src": "287:25:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18382, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "287:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18385, - "indexed": true, - "name": "fromDelegate", - "nodeType": "VariableDeclaration", - "scope": 18389, - "src": "314:28:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18384, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "314:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18387, - "indexed": true, - "name": "toDelegate", - "nodeType": "VariableDeclaration", - "scope": 18389, - "src": "344:26:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18386, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "344:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "286:85:25" - }, - "src": "265:107:25" - }, - { - "anonymous": false, - "documentation": "@notice An event thats emitted when a delegate account's vote balance changes", - "id": 18397, - "name": "DelegateVotesChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18396, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18391, - "indexed": true, - "name": "delegate", - "nodeType": "VariableDeclaration", - "scope": 18397, - "src": "491:24:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18390, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "491:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18393, - "indexed": false, - "name": "previousBalance", - "nodeType": "VariableDeclaration", - "scope": 18397, - "src": "517:20:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18392, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "517:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18395, - "indexed": false, - "name": "newBalance", - "nodeType": "VariableDeclaration", - "scope": 18397, - "src": "539:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18394, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "539:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "490:65:25" - }, - "src": "464:92:25" - }, - { - "body": { - "id": 18408, - "nodeType": "Block", - "src": "796:45:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18404, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "813:10:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 18406, - "indexExpression": { - "argumentTypes": null, - "id": 18405, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18399, - "src": "824:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "813:21:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 18403, - "id": 18407, - "nodeType": "Return", - "src": "806:28:25" - } - ] - }, - "documentation": "@notice Delegate votes from `msg.sender` to `delegatee`\n@param delegator The address to get delegatee for", - "id": 18409, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18400, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18399, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18409, - "src": "717:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18398, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "717:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "716:19:25" - }, - "returnParameters": { - "id": 18403, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18402, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18409, - "src": "783:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18401, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "783:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "782:9:25" - }, - "scope": 18930, - "src": "698:143:25", - "stateMutability": "view", - "superFunction": 19156, - "visibility": "external" - }, - { - "body": { - "id": 18420, - "nodeType": "Block", - "src": "1025:56:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18415, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1052:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1052:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 18417, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18411, - "src": "1064:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18414, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18716, - "src": "1042:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 18418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1042:32:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 18413, - "id": 18419, - "nodeType": "Return", - "src": "1035:39:25" - } - ] - }, - "documentation": "@notice Delegate votes from `msg.sender` to `delegatee`\n@param delegatee The address to delegate votes to", - "id": 18421, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18412, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18411, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18421, - "src": "997:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18410, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "997:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "996:19:25" - }, - "returnParameters": { - "id": 18413, - "nodeType": "ParameterList", - "parameters": [], - "src": "1025:0:25" - }, - "scope": 18930, - "src": "979:102:25", - "stateMutability": "nonpayable", - "superFunction": 19149, - "visibility": "external" - }, - { - "body": { - "id": 18518, - "nodeType": "Block", - "src": "1677:959:25", - "statements": [ - { - "assignments": [ - 18437 - ], - "declarations": [ - { - "constant": false, - "id": 18437, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "1687:23:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18436, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1687:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18454, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18441, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18957, - "src": "1764:15:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18444, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19212, - "src": "1813:4:25", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - ], - "id": 18443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1807:5:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 18445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1807:11:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes storage pointer" - } - ], - "id": 18442, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "1797:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1797:22:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18447, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18929, - "src": "1837:10:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 18448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1837:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18450, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19336, - "src": "1875:4:25", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - ], - "id": 18449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1867:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1867:13:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 18439, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1736:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18440, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1736:10:25", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 18452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1736:158:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18438, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "1713:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1713:191:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1687:217:25" - }, - { - "assignments": [ - 18456 - ], - "declarations": [ - { - "constant": false, - "id": 18456, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "1915:18:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18455, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1915:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18466, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18460, - "name": "DELEGATION_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18962, - "src": "1987:19:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18461, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18423, - "src": "2024:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18462, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18425, - "src": "2051:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18463, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18427, - "src": "2074:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 18458, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "1959:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18459, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1959:10:25", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 18464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1959:135:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18457, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "1936:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1936:168:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1915:189:25" - }, - { - "assignments": [ - 18468 - ], - "declarations": [ - { - "constant": false, - "id": 18468, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "2115:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18467, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2115:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18477, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 18472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2189:10:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 18473, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18437, - "src": "2217:15:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18474, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18456, - "src": "2250:10:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 18470, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "2155:3:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 18471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2155:16:25", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 18475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2155:119:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 18469, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "2132:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 18476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2132:152:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2115:169:25" - }, - { - "assignments": [ - 18479 - ], - "declarations": [ - { - "constant": false, - "id": 18479, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 18518, - "src": "2295:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2295:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18486, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18481, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18468, - "src": "2325:6:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18482, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18429, - "src": "2333:1:25", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 18483, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18431, - "src": "2336:1:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 18484, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18433, - "src": "2339:1:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 18480, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "2315:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 18485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2315:26:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2295:46:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18488, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18479, - "src": "2359:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 18490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2380:1:25", - "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": 18489, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2372:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2372:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2359:23:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a64656c656761746542795369673a20696e76616c6964207369676e6174757265", - "id": 18493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2384:39:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_184babfb6466f1dab112d4792e91ed0d0fe450a5c48fc35742f2690afebf7b67", - "typeString": "literal_string \"YAM::delegateBySig: invalid signature\"" - }, - "value": "YAM::delegateBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_184babfb6466f1dab112d4792e91ed0d0fe450a5c48fc35742f2690afebf7b67", - "typeString": "literal_string \"YAM::delegateBySig: invalid signature\"" - } - ], - "id": 18487, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2351:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2351:73:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18495, - "nodeType": "ExpressionStatement", - "src": "2351:73:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18497, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18425, - "src": "2442:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2451:19:25", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18498, - "name": "nonces", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18966, - "src": "2451:6:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 18500, - "indexExpression": { - "argumentTypes": null, - "id": 18499, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18479, - "src": "2458:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2451:17:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2442:28:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e6365", - "id": 18503, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2472:35:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0fc6782a8889e626c37744401e2fa3617fa4e15e94083efa2f77057db9cf34e6", - "typeString": "literal_string \"YAM::delegateBySig: invalid nonce\"" - }, - "value": "YAM::delegateBySig: invalid nonce" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0fc6782a8889e626c37744401e2fa3617fa4e15e94083efa2f77057db9cf34e6", - "typeString": "literal_string \"YAM::delegateBySig: invalid nonce\"" - } - ], - "id": 18496, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2434:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2434:74:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18505, - "nodeType": "ExpressionStatement", - "src": "2434:74:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18507, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "2526:3:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 18508, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18427, - "src": "2533:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2526:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a64656c656761746542795369673a207369676e61747572652065787069726564", - "id": 18510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2541:39:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_93fb057ac97627637ebb8a8e6875c18ebe19dea7b041453dfbe91101ba3b9a43", - "typeString": "literal_string \"YAM::delegateBySig: signature expired\"" - }, - "value": "YAM::delegateBySig: signature expired" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_93fb057ac97627637ebb8a8e6875c18ebe19dea7b041453dfbe91101ba3b9a43", - "typeString": "literal_string \"YAM::delegateBySig: signature expired\"" - } - ], - "id": 18506, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2518:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2518:63:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18512, - "nodeType": "ExpressionStatement", - "src": "2518:63:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18514, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18479, - "src": "2608:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18515, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18423, - "src": "2619:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18513, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18716, - "src": "2598:9:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 18516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2598:31:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 18435, - "id": 18517, - "nodeType": "Return", - "src": "2591:38:25" - } - ] - }, - "documentation": "@notice Delegates votes from signatory to `delegatee`\n@param delegatee The address to delegate votes to\n@param nonce The contract state required to match the signature\n@param expiry The time at which to expire the signature\n@param v The recovery byte of the signature\n@param r Half of the ECDSA signature pair\n@param s Half of the ECDSA signature pair", - "id": 18519, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18423, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1536:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18422, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1536:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18425, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1563:10:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18424, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1563:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18427, - "name": "expiry", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1583:11:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18426, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1583:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18429, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1604:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 18428, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1604:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18431, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1621:9:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18430, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1621:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18433, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 18519, - "src": "1640:9:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 18432, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1640:7:25", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1526:129:25" - }, - "returnParameters": { - "id": 18435, - "nodeType": "ParameterList", - "parameters": [], - "src": "1677:0:25" - }, - "scope": 18930, - "src": "1504:1132:25", - "stateMutability": "nonpayable", - "superFunction": 19144, - "visibility": "external" - }, - { - "body": { - "id": 18546, - "nodeType": "Block", - "src": "2932:146:25", - "statements": [ - { - "assignments": [ - 18527 - ], - "declarations": [ - { - "constant": false, - "id": 18527, - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18546, - "src": "2942:19:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18526, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2942:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18531, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18528, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "2964:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18530, - "indexExpression": { - "argumentTypes": null, - "id": 18529, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18521, - "src": "2979:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2964:23:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2942:45:25" - }, - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18532, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18527, - "src": "3004:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3019:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3004:16:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3070:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 18544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "3004:67:25", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18535, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "3023:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18537, - "indexExpression": { - "argumentTypes": null, - "id": 18536, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18521, - "src": "3035:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3023:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18541, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18538, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18527, - "src": "3044:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3059:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3044:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3023:38:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18542, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "3023:44:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18525, - "id": 18545, - "nodeType": "Return", - "src": "2997:74:25" - } - ] - }, - "documentation": "@notice Gets the current votes balance for `account`\n@param account The address to get votes balance\n@return The number of current votes for `account`", - "id": 18547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getCurrentVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18521, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18547, - "src": "2855:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18520, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2855:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2854:17:25" - }, - "returnParameters": { - "id": 18525, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18524, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18547, - "src": "2919:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2919:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2918:9:25" - }, - "scope": 18930, - "src": "2830:248:25", - "stateMutability": "view", - "superFunction": 19163, - "visibility": "external" - }, - { - "body": { - "id": 18677, - "nodeType": "Block", - "src": "3618:1098:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18557, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "3636:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18558, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "3650:5:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 18559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3650:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3636:26:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e6564", - "id": 18561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3664:40:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_38d421f3d842114e4be7c1f8fe05e144cb3bff2df3d8a293f7ee1e74e3a8cb57", - "typeString": "literal_string \"YAM::getPriorVotes: not yet determined\"" - }, - "value": "YAM::getPriorVotes: not yet determined" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_38d421f3d842114e4be7c1f8fe05e144cb3bff2df3d8a293f7ee1e74e3a8cb57", - "typeString": "literal_string \"YAM::getPriorVotes: not yet determined\"" - } - ], - "id": 18556, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3628:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3628:77:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18563, - "nodeType": "ExpressionStatement", - "src": "3628:77:25" - }, - { - "assignments": [ - 18565 - ], - "declarations": [ - { - "constant": false, - "id": 18565, - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18677, - "src": "3716:19:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18564, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3716:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18569, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18566, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "3738:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18568, - "indexExpression": { - "argumentTypes": null, - "id": 18567, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "3753:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3738:23:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3716:45:25" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18570, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "3775:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18571, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3791:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3775:17:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18576, - "nodeType": "IfStatement", - "src": "3771:56:25", - "trueBody": { - "id": 18575, - "nodeType": "Block", - "src": "3794:33:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18573, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3815:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 18555, - "id": 18574, - "nodeType": "Return", - "src": "3808:8:25" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18577, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "3884:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18579, - "indexExpression": { - "argumentTypes": null, - "id": 18578, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "3896:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3884:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18583, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18580, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "3905:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18581, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3920:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3905:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3884:38:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "3884:48:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 18585, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "3936:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3884:63:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18597, - "nodeType": "IfStatement", - "src": "3880:145:25", - "trueBody": { - "id": 18596, - "nodeType": "Block", - "src": "3949:76:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18587, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "3970:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18589, - "indexExpression": { - "argumentTypes": null, - "id": 18588, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "3982:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3970:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18593, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18590, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "3991:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18591, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4006:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3991:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3970:38:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "3970:44:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18555, - "id": 18595, - "nodeType": "Return", - "src": "3963:51:25" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18598, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "4083:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18600, - "indexExpression": { - "argumentTypes": null, - "id": 18599, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "4095:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4083:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18602, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4104:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4083:23:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18603, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "4083:33:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 18604, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "4119:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4083:47:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18609, - "nodeType": "IfStatement", - "src": "4079:86:25", - "trueBody": { - "id": 18608, - "nodeType": "Block", - "src": "4132:33:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4153:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 18555, - "id": 18607, - "nodeType": "Return", - "src": "4146:8:25" - } - ] - } - }, - { - "assignments": [ - 18611 - ], - "declarations": [ - { - "constant": false, - "id": 18611, - "name": "lower", - "nodeType": "VariableDeclaration", - "scope": 18677, - "src": "4175:12:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18610, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4175:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18613, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 18612, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4190:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4175:16:25" - }, - { - "assignments": [ - 18615 - ], - "declarations": [ - { - "constant": false, - "id": 18615, - "name": "upper", - "nodeType": "VariableDeclaration", - "scope": 18677, - "src": "4201:12:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18614, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4201:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18619, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18616, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18565, - "src": "4216:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4231:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4216:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4201:31:25" - }, - { - "body": { - "id": 18668, - "nodeType": "Block", - "src": "4264:396:25", - "statements": [ - { - "assignments": [ - 18624 - ], - "declarations": [ - { - "constant": false, - "id": 18624, - "name": "center", - "nodeType": "VariableDeclaration", - "scope": 18668, - "src": "4278:13:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18623, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4278:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18633, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18625, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4294:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18626, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4303:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 18627, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4311:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4303:13:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "id": 18629, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4302:15:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 18630, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4320:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "4302:19:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4294:27:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4278:43:25" - }, - { - "assignments": [ - 18635 - ], - "declarations": [ - { - "constant": false, - "id": 18635, - "name": "cp", - "nodeType": "VariableDeclaration", - "scope": 18668, - "src": "4362:20:25", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint" - }, - "typeName": { - "contractScope": null, - "id": 18634, - "name": "Checkpoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18942, - "src": "4362:10:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18641, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18636, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "4385:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18638, - "indexExpression": { - "argumentTypes": null, - "id": 18637, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "4397:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4385:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18640, - "indexExpression": { - "argumentTypes": null, - "id": 18639, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18624, - "src": "4406:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4385:28:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4362:51:25" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18642, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18635, - "src": "4431:2:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "id": 18643, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "4431:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18644, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "4447:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4431:27:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18650, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18635, - "src": "4518:2:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "id": 18651, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "4518:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 18652, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18551, - "src": "4533:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4518:26:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 18665, - "nodeType": "Block", - "src": "4599:51:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 18659, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4617:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18660, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18624, - "src": "4625:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18661, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4634:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4625:10:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4617:18:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 18664, - "nodeType": "ExpressionStatement", - "src": "4617:18:25" - } - ] - }, - "id": 18666, - "nodeType": "IfStatement", - "src": "4514:136:25", - "trueBody": { - "id": 18658, - "nodeType": "Block", - "src": "4546:47:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 18654, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4564:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 18655, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18624, - "src": "4572:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4564:14:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 18657, - "nodeType": "ExpressionStatement", - "src": "4564:14:25" - } - ] - } - }, - "id": 18667, - "nodeType": "IfStatement", - "src": "4427:223:25", - "trueBody": { - "id": 18649, - "nodeType": "Block", - "src": "4460:48:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18646, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18635, - "src": "4485:2:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory_ptr", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "id": 18647, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "4485:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18555, - "id": 18648, - "nodeType": "Return", - "src": "4478:15:25" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18620, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18615, - "src": "4249:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 18621, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4257:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "4249:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 18669, - "nodeType": "WhileStatement", - "src": "4242:418:25" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18670, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "4676:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18672, - "indexExpression": { - "argumentTypes": null, - "id": 18671, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18549, - "src": "4688:7:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4676:20:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18674, - "indexExpression": { - "argumentTypes": null, - "id": 18673, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18611, - "src": "4697:5:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4676:27:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "4676:33:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18555, - "id": 18676, - "nodeType": "Return", - "src": "4669:40:25" - } - ] - }, - "documentation": "@notice Determine the prior number of votes for an account as of a block number\n@dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n@param account The address of the account to check\n@param blockNumber The block number to get the vote balance at\n@return The number of votes the account had as of the given block", - "id": 18678, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18549, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 18678, - "src": "3523:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18548, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3523:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18551, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 18678, - "src": "3540:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18550, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3540:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3522:35:25" - }, - "returnParameters": { - "id": 18555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18678, - "src": "3605:7:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3605:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3604:9:25" - }, - "scope": 18930, - "src": "3500:1216:25", - "stateMutability": "view", - "superFunction": 19129, - "visibility": "external" - }, - { - "body": { - "id": 18715, - "nodeType": "Block", - "src": "4800:352:25", - "statements": [ - { - "assignments": [ - 18686 - ], - "declarations": [ - { - "constant": false, - "id": 18686, - "name": "currentDelegate", - "nodeType": "VariableDeclaration", - "scope": 18715, - "src": "4810:23:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18685, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4810:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18690, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18687, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4836:10:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 18689, - "indexExpression": { - "argumentTypes": null, - "id": 18688, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "4847:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4836:21:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4810:47:25" - }, - { - "assignments": [ - 18692 - ], - "declarations": [ - { - "constant": false, - "id": 18692, - "name": "delegatorBalance", - "nodeType": "VariableDeclaration", - "scope": 18715, - "src": "4867:24:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4867:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18696, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18693, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4894:12:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 18695, - "indexExpression": { - "argumentTypes": null, - "id": 18694, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "4907:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4894:23:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4867:50:25" - }, - { - "expression": { - "argumentTypes": null, - "id": 18701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18697, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4971:10:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 18699, - "indexExpression": { - "argumentTypes": null, - "id": 18698, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "4982:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4971:21:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 18700, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18682, - "src": "4995:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4971:33:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 18702, - "nodeType": "ExpressionStatement", - "src": "4971:33:25" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18704, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18680, - "src": "5036:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18705, - "name": "currentDelegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18686, - "src": "5047:15:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18706, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18682, - "src": "5064:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 18703, - "name": "DelegateChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 18389 - ], - "referencedDeclaration": 18389, - "src": "5020:15:25", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address,address)" - } - }, - "id": 18707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5020:54:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18708, - "nodeType": "EmitStatement", - "src": "5015:59:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18710, - "name": "currentDelegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18686, - "src": "5100:15:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18711, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18682, - "src": "5117:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18712, - "name": "delegatorBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18692, - "src": "5128:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18709, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "5085:14:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 18713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5085:60:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18714, - "nodeType": "ExpressionStatement", - "src": "5085:60:25" - } - ] - }, - "documentation": null, - "id": 18716, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18683, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18680, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18716, - "src": "4741:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18679, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4741:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18682, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18716, - "src": "4760:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18681, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4760:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4740:38:25" - }, - "returnParameters": { - "id": 18684, - "nodeType": "ParameterList", - "parameters": [], - "src": "4800:0:25" - }, - "scope": 18930, - "src": "4722:430:25", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18820, - "nodeType": "Block", - "src": "5239:848:25", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 18731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18725, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5253:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 18726, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5263:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5253:16:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18728, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18722, - "src": "5273:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18729, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5282:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5273:10:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5253:30:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18819, - "nodeType": "IfStatement", - "src": "5249:832:25", - "trueBody": { - "id": 18818, - "nodeType": "Block", - "src": "5285:796:25", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18732, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5303:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 18734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5321:1:25", - "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": 18733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5313:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5313:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5303:20:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18774, - "nodeType": "IfStatement", - "src": "5299:379:25", - "trueBody": { - "id": 18773, - "nodeType": "Block", - "src": "5325:353:25", - "statements": [ - { - "assignments": [ - 18738 - ], - "declarations": [ - { - "constant": false, - "id": 18738, - "name": "srcRepNum", - "nodeType": "VariableDeclaration", - "scope": 18773, - "src": "5390:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18737, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5390:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18742, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18739, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "5409:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18741, - "indexExpression": { - "argumentTypes": null, - "id": 18740, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5424:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5409:22:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5390:41:25" - }, - { - "assignments": [ - 18744 - ], - "declarations": [ - { - "constant": false, - "id": 18744, - "name": "srcRepOld", - "nodeType": "VariableDeclaration", - "scope": 18773, - "src": "5449:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18743, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5449:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18758, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18745, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18738, - "src": "5469:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5481:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5469:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5528:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 18757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "5469:60:25", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18748, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "5485:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18750, - "indexExpression": { - "argumentTypes": null, - "id": 18749, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5497:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5485:19:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18754, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18751, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18738, - "src": "5505:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5517:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5505:13:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5485:34:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18755, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "5485:40:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5449:80:25" - }, - { - "assignments": [ - 18760 - ], - "declarations": [ - { - "constant": false, - "id": 18760, - "name": "srcRepNew", - "nodeType": "VariableDeclaration", - "scope": 18773, - "src": "5547:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5547:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18765, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18763, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18722, - "src": "5581:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 18761, - "name": "srcRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18744, - "src": "5567:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "5567:13:25", - "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": 18764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5567:21:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5547:41:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18767, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18718, - "src": "5623:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18768, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18738, - "src": "5631:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 18769, - "name": "srcRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18744, - "src": "5642:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18770, - "name": "srcRepNew", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18760, - "src": "5653:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18766, - "name": "_writeCheckpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18894, - "src": "5606:16:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint32_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint32,uint256,uint256)" - } - }, - "id": 18771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5606:57:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18772, - "nodeType": "ExpressionStatement", - "src": "5606:57:25" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 18779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18775, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5696:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 18777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5714:1:25", - "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": 18776, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5706:7:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 18778, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5706:10:25", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5696:20:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 18817, - "nodeType": "IfStatement", - "src": "5692:379:25", - "trueBody": { - "id": 18816, - "nodeType": "Block", - "src": "5718:353:25", - "statements": [ - { - "assignments": [ - 18781 - ], - "declarations": [ - { - "constant": false, - "id": 18781, - "name": "dstRepNum", - "nodeType": "VariableDeclaration", - "scope": 18816, - "src": "5783:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18780, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5783:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18785, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18782, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "5802:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18784, - "indexExpression": { - "argumentTypes": null, - "id": 18783, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5817:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5802:22:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5783:41:25" - }, - { - "assignments": [ - 18787 - ], - "declarations": [ - { - "constant": false, - "id": 18787, - "name": "dstRepOld", - "nodeType": "VariableDeclaration", - "scope": 18816, - "src": "5842:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18786, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5842:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18801, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18788, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18781, - "src": "5862:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5874:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5862:13:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18799, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5921:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 18800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "5862:60:25", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18791, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "5878:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18793, - "indexExpression": { - "argumentTypes": null, - "id": 18792, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "5890:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5878:19:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18797, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18794, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18781, - "src": "5898:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5910:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5898:13:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5878:34:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18798, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "5878:40:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5842:80:25" - }, - { - "assignments": [ - 18803 - ], - "declarations": [ - { - "constant": false, - "id": 18803, - "name": "dstRepNew", - "nodeType": "VariableDeclaration", - "scope": 18816, - "src": "5940:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18802, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5940:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18808, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18806, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18722, - "src": "5974:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 18804, - "name": "dstRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18787, - "src": "5960:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "5960:13:25", - "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": 18807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5960:21:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5940:41:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18810, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18720, - "src": "6016:6:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18811, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18781, - "src": "6024:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 18812, - "name": "dstRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18787, - "src": "6035:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18813, - "name": "dstRepNew", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18803, - "src": "6046:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18809, - "name": "_writeCheckpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18894, - "src": "5999:16:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint32_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint32,uint256,uint256)" - } - }, - "id": 18814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5999:57:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18815, - "nodeType": "ExpressionStatement", - "src": "5999:57:25" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 18821, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_moveDelegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18723, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18718, - "name": "srcRep", - "nodeType": "VariableDeclaration", - "scope": 18821, - "src": "5182:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5182:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18720, - "name": "dstRep", - "nodeType": "VariableDeclaration", - "scope": 18821, - "src": "5198:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5198:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18722, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 18821, - "src": "5214:14:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18721, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5214:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5181:48:25" - }, - "returnParameters": { - "id": 18724, - "nodeType": "ParameterList", - "parameters": [], - "src": "5239:0:25" - }, - "scope": 18930, - "src": "5158:929:25", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18893, - "nodeType": "Block", - "src": "6254:524:25", - "statements": [ - { - "assignments": [ - 18833 - ], - "declarations": [ - { - "constant": false, - "id": 18833, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 18893, - "src": "6264:18:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18832, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6264:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18839, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 18835, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6292:5:25", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 18836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6292:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "59414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473", - "id": 18837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6306:53:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bde83c9110d5d6a9b2c61d0637aeaed894210d16f599828baf99da164d8adddf", - "typeString": "literal_string \"YAM::_writeCheckpoint: block number exceeds 32 bits\"" - }, - "value": "YAM::_writeCheckpoint: block number exceeds 32 bits" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_bde83c9110d5d6a9b2c61d0637aeaed894210d16f599828baf99da164d8adddf", - "typeString": "literal_string \"YAM::_writeCheckpoint: block number exceeds 32 bits\"" - } - ], - "id": 18834, - "name": "safe32", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18917, - "src": "6285:6:25", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint32_$", - "typeString": "function (uint256,string memory) pure returns (uint32)" - } - }, - "id": 18838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6285:75:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6264:96:25" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 18853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18840, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6375:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 18841, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6390:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6375:16:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18843, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "6395:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18845, - "indexExpression": { - "argumentTypes": null, - "id": 18844, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6407:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6395:22:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18849, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18846, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6418:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6433:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6418:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6395:40:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18850, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 18939, - "src": "6395:50:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 18851, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18833, - "src": "6449:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6395:65:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6375:85:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 18885, - "nodeType": "Block", - "src": "6550:155:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18866, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "6564:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18869, - "indexExpression": { - "argumentTypes": null, - "id": 18867, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6576:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6564:22:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18870, - "indexExpression": { - "argumentTypes": null, - "id": 18868, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6587:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6564:36:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18872, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18833, - "src": "6614:11:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 18873, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18829, - "src": "6627:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18871, - "name": "Checkpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18942, - "src": "6603:10:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Checkpoint_$18942_storage_ptr_$", - "typeString": "type(struct YAMGovernanceStorage.Checkpoint storage pointer)" - } - }, - "id": 18874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6603:33:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_memory", - "typeString": "struct YAMGovernanceStorage.Checkpoint memory" - } - }, - "src": "6564:72:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18876, - "nodeType": "ExpressionStatement", - "src": "6564:72:25" - }, - { - "expression": { - "argumentTypes": null, - "id": 18883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18877, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18952, - "src": "6650:14:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 18879, - "indexExpression": { - "argumentTypes": null, - "id": 18878, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6665:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6650:25:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18880, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6678:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6693:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6678:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "6650:44:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 18884, - "nodeType": "ExpressionStatement", - "src": "6650:44:25" - } - ] - }, - "id": 18886, - "nodeType": "IfStatement", - "src": "6371:334:25", - "trueBody": { - "id": 18865, - "nodeType": "Block", - "src": "6462:82:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 18863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 18854, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18948, - "src": "6476:11:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref))" - } - }, - "id": 18859, - "indexExpression": { - "argumentTypes": null, - "id": 18855, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6488:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6476:22:25", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$18942_storage_$", - "typeString": "mapping(uint32 => struct YAMGovernanceStorage.Checkpoint storage ref)" - } - }, - "id": 18860, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 18858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18856, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18825, - "src": "6499:12:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 18857, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6514:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6499:16:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6476:40:25", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$18942_storage", - "typeString": "struct YAMGovernanceStorage.Checkpoint storage ref" - } - }, - "id": 18861, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 18941, - "src": "6476:46:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 18862, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18829, - "src": "6525:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6476:57:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18864, - "nodeType": "ExpressionStatement", - "src": "6476:57:25" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18888, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18823, - "src": "6741:9:25", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 18889, - "name": "oldVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18827, - "src": "6752:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 18890, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18829, - "src": "6762:8:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18887, - "name": "DelegateVotesChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 18397 - ], - "referencedDeclaration": 18397, - "src": "6720:20:25", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 18891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6720:51:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18892, - "nodeType": "EmitStatement", - "src": "6715:56:25" - } - ] - }, - "documentation": null, - "id": 18894, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_writeCheckpoint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18830, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18823, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6128:17:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18822, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6128:7:25", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18825, - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6155:19:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18824, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6155:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18827, - "name": "oldVotes", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6184:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18826, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6184:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18829, - "name": "newVotes", - "nodeType": "VariableDeclaration", - "scope": 18894, - "src": "6210:16:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18828, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6210:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6118:114:25" - }, - "returnParameters": { - "id": 18831, - "nodeType": "ParameterList", - "parameters": [], - "src": "6254:0:25" - }, - "scope": 18930, - "src": "6093:685:25", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18916, - "nodeType": "Block", - "src": "6867:75:25", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 18908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 18904, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18896, - "src": "6885:1:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - }, - "id": 18907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 18905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6889:1:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 18906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6892:2:25", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "6889:5:25", - "typeDescriptions": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - } - }, - "src": "6885:9:25", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 18909, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18898, - "src": "6896:12:25", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 18903, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6877:7:25", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 18910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6877:32:25", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 18911, - "nodeType": "ExpressionStatement", - "src": "6877:32:25" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 18913, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18896, - "src": "6933:1:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 18912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6926:6:25", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 18914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6926:9:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "functionReturnParameters": 18902, - "id": 18915, - "nodeType": "Return", - "src": "6919:16:25" - } - ] - }, - "documentation": null, - "id": 18917, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safe32", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18899, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18896, - "name": "n", - "nodeType": "VariableDeclaration", - "scope": 18917, - "src": "6800:6:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18895, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6800:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18898, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 18917, - "src": "6808:26:25", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 18897, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6808:6:25", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6799:36:25" - }, - "returnParameters": { - "id": 18902, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18901, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18917, - "src": "6859:6:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 18900, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6859:6:25", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6858:8:25" - }, - "scope": 18930, - "src": "6784:158:25", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 18928, - "nodeType": "Block", - "src": "6999:98:25", - "statements": [ - { - "assignments": [ - 18923 - ], - "declarations": [ - { - "constant": false, - "id": 18923, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 18928, - "src": "7009:15:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18922, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7009:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 18924, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "7009:15:25" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 18923, - "isOffset": false, - "isSlot": false, - "src": "7045:7:25", - "valueSize": 1 - } - } - ], - "id": 18925, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "7034:33:25" - }, - { - "expression": { - "argumentTypes": null, - "id": 18926, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18923, - "src": "7083:7:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 18921, - "id": 18927, - "nodeType": "Return", - "src": "7076:14:25" - } - ] - }, - "documentation": null, - "id": 18929, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18918, - "nodeType": "ParameterList", - "parameters": [], - "src": "6967:2:25" - }, - "returnParameters": { - "id": 18921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18920, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 18929, - "src": "6993:4:25", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18919, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6993:4:25", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6992:6:25" - }, - "scope": 18930, - "src": "6948:149:25", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 18931, - "src": "131:6968:25" - } - ], - "src": "0:7100:25" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.474Z", - "devdoc": { - "methods": { - "delegate(address)": { - "params": { - "delegatee": "The address to delegate votes to" - } - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "params": { - "delegatee": "The address to delegate votes to", - "expiry": "The time at which to expire the signature", - "nonce": "The contract state required to match the signature", - "r": "Half of the ECDSA signature pair", - "s": "Half of the ECDSA signature pair", - "v": "The recovery byte of the signature" - } - }, - "delegates(address)": { - "params": { - "delegator": "The address to get delegatee for" - } - }, - "getCurrentVotes(address)": { - "params": { - "account": "The address to get votes balance" - }, - "return": "The number of current votes for `account`" - }, - "getPriorVotes(address,uint256)": { - "details": "Block number must be a finalized block or else this function will revert to prevent misinformation.", - "params": { - "account": "The address of the account to check", - "blockNumber": "The block number to get the vote balance at" - }, - "return": "The number of votes the account had as of the given block" - } - } - }, - "userdoc": { - "methods": { - "delegate(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "notice": "Delegates votes from signatory to `delegatee`" - }, - "delegates(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "getCurrentVotes(address)": { - "notice": "Gets the current votes balance for `account`" - }, - "getPriorVotes(address,uint256)": { - "notice": "Determine the prior number of votes for an account as of a block number" - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMIncentives.json b/build/contracts/YAMIncentives.json deleted file mode 100644 index 59b8e29..0000000 --- a/build/contracts/YAMIncentives.json +++ /dev/null @@ -1,37161 +0,0 @@ -{ - "contractName": "YAMIncentives", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initreward", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "uni_lp", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initreward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"uni_lp\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":\"YAMIncentives\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":{\"keccak256\":\"0xadb5cff58316801bc193c5479630cd2f8d5bf74d0e84ad0f44057b930066077e\",\"urls\":[\"bzz-raw://9a5be9c5f2f0e1a9b83d1bb4377a462a412dd3a987b8e8c41b7ad56653b6184e\",\"dweb:/ipfs/QmXXHz4DCZ2nDkJbATJtY4xEaP6vn8yCtTPt1xCpGVbCAj\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b031990811673e9b70db3e22324f962f53e5290cb1f4af72c9ebd17825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a1790556a01a784379d99db42000000600655635f2f3c80600755600881905560095561007b6001600160e01b036100cc16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100d0565b3390565b611b45806100df6000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c806383d0fdc1116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b146103785780639c907b5814610394576101ad565b806383d0fdc11461032d5780638b876347146103355780638da5889714610368576101ad565b80632e1a7d4d1161015b57806370a082311161013557806370a08231146102e2578063715018a6146103155780637b0a47ee1461031d57806380faa57d14610325576101ad565b80632e1a7d4d146102a05780633c6b16ab146102bd5780633d18b912146102da576101ad565b80630d68b7611161018c5780630d68b7611461025b57806318160ddd146102905780631be0528914610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b6101e561058f565b6101e5610596565b61028e600480360360208110156102b657600080fd5b503561059d565b61028e600480360360208110156102d357600080fd5b5035610734565b61028e610a4d565b6101e5600480360360208110156102f857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cd5565b61028e610cfd565b6101e5610ddf565b6101e5610de5565b610232610df8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e14565b6101e5610e26565b610232610e2c565b610380610e48565b604080519115158252519081900360200190f35b6101e5610e88565b61028e600480360360208110156103b257600080fd5b5035610e8e565b6101e5611144565b6101e561114a565b6101e561119e565b61028e6111a4565b6101e56111bf565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111c5565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d6020908152604080832054600c9092528220546104a1919061049590670de0b6b3a764000090610489906104749061046861114a565b9063ffffffff61124416565b61047d88610cd5565b9063ffffffff61128d16565b9063ffffffff61130016565b9063ffffffff61134216565b92915050565b600d6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610e48565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6001545b90565b62093a8081565b336105a661114a565b600b556105b1610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610612576105d981610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600754421161068257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600082116106f157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b6106fa826113b6565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff16610755611424565b73ffffffffffffffffffffffffffffffffffffffff16146107c1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ac66021913960400191505060405180910390fd5b60006107cb61114a565b600b556107d6610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610837576107fe81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600854421061085b576108538262093a8063ffffffff61130016565b6009556108a9565b600854600090610871904263ffffffff61124416565b9050600061088a6009548361128d90919063ffffffff16565b90506108a362093a80610489868463ffffffff61134216565b60095550505b600554604080517fb6fa8576000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163b6fa857691600480830192602092919082900301818787803b15801561091557600080fd5b505af1158015610929573d6000803e3d6000fd5b505050506040513d602081101561093f57600080fd5b50519050600061096369d3c21bcecceda1000000610489868563ffffffff61128d16565b600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101849052905192935073ffffffffffffffffffffffffffffffffffffffff909116916340c10f199160448082019260009290919082900301818387803b1580156109df57600080fd5b505af11580156109f3573d6000803e3d6000fd5b505042600a819055610a119250905062093a8063ffffffff61134216565b6008556040805185815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505050565b33610a5661114a565b600b55610a61610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610ac257610a8981610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6008544210610be157610ae66064610489603260065461128d90919063ffffffff16565b6006819055600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101939093525173ffffffffffffffffffffffffffffffffffffffff909116916340c10f1991604480830192600092919082900301818387803b158015610b6357600080fd5b505af1158015610b77573d6000803e3d6000fd5b5050600654610b929250905062093a8063ffffffff61130016565b600955610ba84262093a8063ffffffff61134216565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b6007544211610c5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610c5c33610414565b90508015610cd157336000818152600d6020526040812055600554610c9a9173ffffffffffffffffffffffffffffffffffffffff9091169083611428565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610d05610e48565b610d7057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60095481565b6000610df3426008546114ba565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600c6020526000908152604090205481565b60075481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610e6c611424565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60065481565b33610e9761114a565b600b55610ea2610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610f0357610eca81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600854421061102257610f276064610489603260065461128d90919063ffffffff16565b6006819055600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101939093525173ffffffffffffffffffffffffffffffffffffffff909116916340c10f1991604480830192600092919082900301818387803b158015610fa457600080fd5b505af1158015610fb8573d6000803e3d6000fd5b5050600654610fd39250905062093a8063ffffffff61130016565b600955610fe94262093a8063ffffffff61134216565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b600754421161109257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161110157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b61110a826114d0565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600a5481565b600061115461058f565b6111615750600b54610593565b610df361118f61116f61058f565b610489670de0b6b3a764000061047d60095461047d600a54610468610de5565b600b549063ffffffff61134216565b600b5481565b6111b56111b033610cd5565b61059d565b6111bd610a4d565b565b60085481565b6111cd610e48565b61123857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6112418161153f565b50565b600061128683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611639565b9392505050565b60008261129c575060006104a1565b828202828482816112a957fe5b0414611286576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611aa56021913960400191505060405180910390fd5b600061128683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116ea565b60008282018381101561128657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001546113c9908263ffffffff61124416565b600155336000908152600260205260409020546113ec908263ffffffff61124416565b3360008181526002602052604081209290925590546112419173ffffffffffffffffffffffffffffffffffffffff9091169083611428565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526114b5908490611769565b505050565b60008183106114c95781611286565b5090919050565b6001546114e3908263ffffffff61134216565b60015533600090815260026020526040902054611506908263ffffffff61134216565b3360008181526002602052604081209290925590546112419173ffffffffffffffffffffffffffffffffffffffff9091169030846119ad565b73ffffffffffffffffffffffffffffffffffffffff81166115ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611a7f6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156116e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156116a757818101518382015260200161168f565b50505050905090810190601f1680156116d45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611753576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156116a757818101518382015260200161168f565b50600083858161175f57fe5b0495945050505050565b6117888273ffffffffffffffffffffffffffffffffffffffff16611a42565b6117f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061185c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161181f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118be576040519150601f19603f3d011682016040523d82523d6000602084013e6118c3565b606091505b50915091508161193457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156119a75780806020019051602081101561195057600080fd5b50516119a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611ae7602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119a7908590611769565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611a765750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820e7b6454fa4ad3e9e80edc140843988120bcbb19bdfdaea87ff5bfab90ceeae3664736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c806383d0fdc1116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b146103785780639c907b5814610394576101ad565b806383d0fdc11461032d5780638b876347146103355780638da5889714610368576101ad565b80632e1a7d4d1161015b57806370a082311161013557806370a08231146102e2578063715018a6146103155780637b0a47ee1461031d57806380faa57d14610325576101ad565b80632e1a7d4d146102a05780633c6b16ab146102bd5780633d18b912146102da576101ad565b80630d68b7611161018c5780630d68b7611461025b57806318160ddd146102905780631be0528914610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b6101e561058f565b6101e5610596565b61028e600480360360208110156102b657600080fd5b503561059d565b61028e600480360360208110156102d357600080fd5b5035610734565b61028e610a4d565b6101e5600480360360208110156102f857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cd5565b61028e610cfd565b6101e5610ddf565b6101e5610de5565b610232610df8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e14565b6101e5610e26565b610232610e2c565b610380610e48565b604080519115158252519081900360200190f35b6101e5610e88565b61028e600480360360208110156103b257600080fd5b5035610e8e565b6101e5611144565b6101e561114a565b6101e561119e565b61028e6111a4565b6101e56111bf565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111c5565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d6020908152604080832054600c9092528220546104a1919061049590670de0b6b3a764000090610489906104749061046861114a565b9063ffffffff61124416565b61047d88610cd5565b9063ffffffff61128d16565b9063ffffffff61130016565b9063ffffffff61134216565b92915050565b600d6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610e48565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6001545b90565b62093a8081565b336105a661114a565b600b556105b1610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610612576105d981610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600754421161068257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600082116106f157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b6106fa826113b6565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff16610755611424565b73ffffffffffffffffffffffffffffffffffffffff16146107c1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ac66021913960400191505060405180910390fd5b60006107cb61114a565b600b556107d6610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610837576107fe81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600854421061085b576108538262093a8063ffffffff61130016565b6009556108a9565b600854600090610871904263ffffffff61124416565b9050600061088a6009548361128d90919063ffffffff16565b90506108a362093a80610489868463ffffffff61134216565b60095550505b600554604080517fb6fa8576000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163b6fa857691600480830192602092919082900301818787803b15801561091557600080fd5b505af1158015610929573d6000803e3d6000fd5b505050506040513d602081101561093f57600080fd5b50519050600061096369d3c21bcecceda1000000610489868563ffffffff61128d16565b600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101849052905192935073ffffffffffffffffffffffffffffffffffffffff909116916340c10f199160448082019260009290919082900301818387803b1580156109df57600080fd5b505af11580156109f3573d6000803e3d6000fd5b505042600a819055610a119250905062093a8063ffffffff61134216565b6008556040805185815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505050565b33610a5661114a565b600b55610a61610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610ac257610a8981610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6008544210610be157610ae66064610489603260065461128d90919063ffffffff16565b6006819055600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101939093525173ffffffffffffffffffffffffffffffffffffffff909116916340c10f1991604480830192600092919082900301818387803b158015610b6357600080fd5b505af1158015610b77573d6000803e3d6000fd5b5050600654610b929250905062093a8063ffffffff61130016565b600955610ba84262093a8063ffffffff61134216565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b6007544211610c5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610c5c33610414565b90508015610cd157336000818152600d6020526040812055600554610c9a9173ffffffffffffffffffffffffffffffffffffffff9091169083611428565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610d05610e48565b610d7057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60095481565b6000610df3426008546114ba565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600c6020526000908152604090205481565b60075481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610e6c611424565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60065481565b33610e9761114a565b600b55610ea2610de5565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610f0357610eca81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600854421061102257610f276064610489603260065461128d90919063ffffffff16565b6006819055600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101939093525173ffffffffffffffffffffffffffffffffffffffff909116916340c10f1991604480830192600092919082900301818387803b158015610fa457600080fd5b505af1158015610fb8573d6000803e3d6000fd5b5050600654610fd39250905062093a8063ffffffff61130016565b600955610fe94262093a8063ffffffff61134216565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b600754421161109257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161110157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b61110a826114d0565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600a5481565b600061115461058f565b6111615750600b54610593565b610df361118f61116f61058f565b610489670de0b6b3a764000061047d60095461047d600a54610468610de5565b600b549063ffffffff61134216565b600b5481565b6111b56111b033610cd5565b61059d565b6111bd610a4d565b565b60085481565b6111cd610e48565b61123857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6112418161153f565b50565b600061128683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611639565b9392505050565b60008261129c575060006104a1565b828202828482816112a957fe5b0414611286576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611aa56021913960400191505060405180910390fd5b600061128683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116ea565b60008282018381101561128657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001546113c9908263ffffffff61124416565b600155336000908152600260205260409020546113ec908263ffffffff61124416565b3360008181526002602052604081209290925590546112419173ffffffffffffffffffffffffffffffffffffffff9091169083611428565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526114b5908490611769565b505050565b60008183106114c95781611286565b5090919050565b6001546114e3908263ffffffff61134216565b60015533600090815260026020526040902054611506908263ffffffff61134216565b3360008181526002602052604081209290925590546112419173ffffffffffffffffffffffffffffffffffffffff9091169030846119ad565b73ffffffffffffffffffffffffffffffffffffffff81166115ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611a7f6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156116e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156116a757818101518382015260200161168f565b50505050905090810190601f1680156116d45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611753576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156116a757818101518382015260200161168f565b50600083858161175f57fe5b0495945050505050565b6117888273ffffffffffffffffffffffffffffffffffffffff16611a42565b6117f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061185c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161181f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118be576040519150601f19603f3d011682016040523d82523d6000602084013e6118c3565b606091505b50915091508161193457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156119a75780806020019051602081101561195057600080fd5b50516119a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611ae7602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119a7908590611769565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611a765750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820e7b6454fa4ad3e9e80edc140843988120bcbb19bdfdaea87ff5bfab90ceeae3664736f6c63430005110032", - "sourceMap": "22626:4090:6:-;;;21663:73;;;-1:-1:-1;;;;;;21663:73:6;;;21693:42;21663:73;;;22703:70;;;;;;22730:42;22703:70;;;22855:18;22827:46;;22912:10;22885:37;;22966:31;;;;23003:29;;9647:12;-1:-1:-1;;;;;9647:10:6;:12;:::i;:::-;9638:6;:21;;-1:-1:-1;;;;;;9638:21:6;-1:-1:-1;;;;;9638:21:6;;;;;;;;9674:40;;9707:6;;;-1:-1:-1;;9674:40:6;;-1:-1:-1;;9674:40:6;22626:4090;;8585:96;8664:10;8585:96;:::o;22626:4090::-;;;;;;;", - "deployedSourceMap": "22626:4090:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22626:4090:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24318:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24318:259:6;;;;:::i;:::-;;;;;;;;;;;;;;;;23177:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23177:42:6;;;;:::i;22703:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21341:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21341:156:6;;;;:::i;:::-;;21829:89;;;:::i;22779:41::-;;;:::i;24879:209::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24879:209:6;;:::i;25957:757::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25957:757:6;;:::i;25194:298::-;;;:::i;21924:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21924:108:6;;;;:::i;10582:137::-;;;:::i;23003:29::-;;;:::i;23769:129::-;;;:::i;21663:73::-;;;:::i;23114:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23114:57:6;;;;:::i;22885:37::-;;;:::i;9797:77::-;;;:::i;10148:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;22827:46;;;:::i;24665:208::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24665:208:6;;:::i;23038:29::-;;;:::i;23904:408::-;;;:::i;23073:35::-;;;:::i;25094:94::-;;;:::i;22966:31::-;;;:::i;10868:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10868:107:6;;;;:::i;24318:259::-;24553:16;;;24372:7;24553:16;;;:7;:16;;;;;;;;;24471:22;:31;;;;;;24410:160;;24553:16;24410:121;;24526:4;;24410:94;;24450:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24410:18;24420:7;24410:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24391:179;24318:259;-1:-1:-1;;24318:259:6:o;23177:42::-;;;;;;;;;;;;;:::o;22703:70::-;;;;;;:::o;21341:156::-;10001:9;:7;:9::i;:::-;9993:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21450:18;:40;;;;;;;;;;;;;;;21341:156::o;21829:89::-;21899:12;;21829:89;;:::o;22779:41::-;22814:6;22779:41;:::o;24879:209::-;24933:10;23513:16;:14;:16::i;:::-;23490:20;:39;23556:26;:24;:26::i;:::-;23539:14;:43;23596:21;;;;23592:154;;23652:15;23659:7;23652:6;:15::i;:::-;23633:16;;;;;;;:7;:16;;;;;;;;:34;;;;23715:20;;23681:22;:31;;;;;;:54;23592:154;25911:9;;25893:15;:27;25885:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24982:1;24973:6;:10;24965:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25015:22;25030:6;25015:14;:22::i;:::-;25052:29;;;;;;;;25062:10;;25052:29;;;;;;;;;;24879:209;;:::o;25957:757::-;21261:18;;;;21245:12;:10;:12::i;:::-;:34;;;21237:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26078:1;23513:16;:14;:16::i;:::-;23490:20;:39;23556:26;:24;:26::i;:::-;23539:14;:43;23596:21;;;;23592:154;;23652:15;23659:7;23652:6;:15::i;:::-;23633:16;;;;;;;:7;:16;;;;;;;;:34;;;;23715:20;;23681:22;:31;;;;;;:54;23592:154;26119:12;;26100:15;:31;26096:298;;26160:20;:6;22814;26160:20;:10;:20;:::i;:::-;26147:10;:33;26096:298;;;26231:12;;26211:17;;26231:33;;26248:15;26231:33;:16;:33;:::i;:::-;26211:53;;26278:16;26297:25;26311:10;;26297:9;:13;;:25;;;;:::i;:::-;26278:44;-1:-1:-1;26349:34:6;22814:6;26349:20;:6;26278:44;26349:20;:10;:20;:::i;:34::-;26336:10;:47;-1:-1:-1;;26096:298:6;26439:3;;26427:37;;;;;;;;26403:21;;26439:3;;;26427:35;;:37;;;;;;;;;;;;;;26403:21;26439:3;26427:37;;;5:2:-1;;;;30:1;27;20:12;5:2;26427:37:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26427:37:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26427:37:6;;-1:-1:-1;26474:18:6;26495:37;26525:6;26495:25;:6;26427:37;26495:25;:10;:25;:::i;:37::-;26542:3;;:35;;;;;;26559:4;26542:35;;;;;;;;;;;;26474:58;;-1:-1:-1;26542:3:6;;;;;:8;;:35;;;;;:3;;:35;;;;;;;;:3;;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;26542:35:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;26604:15:6;26587:14;:32;;;26644:29;;-1:-1:-1;26604:15:6;-1:-1:-1;22814:6:6;26644:29;:19;:29;:::i;:::-;26629:12;:44;26688:19;;;;;;;;;;;;;;;;;23755:1;;21327;25957:757;:::o;25194:298::-;25235:10;23513:16;:14;:16::i;:::-;23490:20;:39;23556:26;:24;:26::i;:::-;23539:14;:43;23596:21;;;;23592:154;;23652:15;23659:7;23652:6;:15::i;:::-;23633:16;;;;;;;:7;:16;;;;;;;;:34;;;;23715:20;;23681:22;:31;;;;;;:54;23592:154;25552:12;;25533:15;:31;25529:303;;25593:27;25616:3;25593:18;25608:2;25593:10;;:14;;:18;;;;:::i;:27::-;25580:10;:40;;;25634:3;;:35;;;;;;25651:4;25634:35;;;;;;;;;;;;:3;;;;;:8;;:35;;;;;:3;;:35;;;;;;;:3;;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;25634:35:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;25697:10:6;;:24;;-1:-1:-1;25697:10:6;-1:-1:-1;22814:6:6;25697:24;:14;:24;:::i;:::-;25684:10;:37;25750:29;:15;22814:6;25750:29;:19;:29;:::i;:::-;25735:12;:44;25810:10;;25798:23;;;;;;;;;;;;;;;;25529:303;25911:9;;25893:15;:27;25885:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25278:14;25295:18;25302:10;25295:6;:18::i;:::-;25278:35;-1:-1:-1;25327:10:6;;25323:163;;25361:10;25375:1;25353:19;;;:7;:19;;;;;:23;25390:3;;:36;;25353:19;25390:3;;;;25419:6;25390:16;:36::i;:::-;25445:30;;;;;;;;25456:10;;25445:30;;;;;;;;;;25323:163;25943:1;25194:298;:::o;21924:108::-;22007:18;;21981:7;22007:18;;;:9;:18;;;;;;;21924:108::o;10582:137::-;10001:9;:7;:9::i;:::-;9993:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10664:6;;10643:40;;10680:1;;10643:40;10664:6;;10643:40;;10680:1;;10643:40;10693:6;:19;;;;;;10582:137::o;23003:29::-;;;;:::o;23769:129::-;23826:7;23852:39;23861:15;23878:12;;23852:8;:39::i;:::-;23845:46;;23769:129;:::o;21663:73::-;;;;;;:::o;23114:57::-;;;;;;;;;;;;;:::o;22885:37::-;;;;:::o;9797:77::-;9861:6;;;;9797:77;:::o;10148:92::-;10227:6;;10188:4;;10227:6;;10211:12;:10;:12::i;:::-;:22;;;10204:29;;10148:92;:::o;22827:46::-;;;;:::o;24665:208::-;24716:10;23513:16;:14;:16::i;:::-;23490:20;:39;23556:26;:24;:26::i;:::-;23539:14;:43;23596:21;;;;23592:154;;23652:15;23659:7;23652:6;:15::i;:::-;23633:16;;;;;;;:7;:16;;;;;;;;:34;;;;23715:20;;23681:22;:31;;;;;;:54;23592:154;25552:12;;25533:15;:31;25529:303;;25593:27;25616:3;25593:18;25608:2;25593:10;;:14;;:18;;;;:::i;:27::-;25580:10;:40;;;25634:3;;:35;;;;;;25651:4;25634:35;;;;;;;;;;;;:3;;;;;:8;;:35;;;;;:3;;:35;;;;;;;:3;;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;25634:35:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;25697:10:6;;:24;;-1:-1:-1;25697:10:6;-1:-1:-1;22814:6:6;25697:24;:14;:24;:::i;:::-;25684:10;:37;25750:29;:15;22814:6;25750:29;:19;:29;:::i;:::-;25735:12;:44;25810:10;;25798:23;;;;;;;;;;;;;;;;25529:303;25911:9;;25893:15;:27;25885:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24776:1;24767:6;:10;24759:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24806:19;24818:6;24806:11;:19::i;:::-;24840:26;;;;;;;;24847:10;;24840:26;;;;;;;;;;24665:208;;:::o;23038:29::-;;;;:::o;23904:408::-;23951:7;23974:13;:11;:13::i;:::-;23970:76;;-1:-1:-1;24015:20:6;;24008:27;;23970:76;24074:231;24116:175;24277:13;:11;:13::i;:::-;24116:135;24246:4;24116:104;24209:10;;24116:67;24168:14;;24116:26;:24;:26::i;:175::-;24074:20;;;:231;:24;:231;:::i;23073:35::-;;;;:::o;25094:94::-;25129:31;25138:21;25148:10;25138:9;:21::i;:::-;25129:8;:31::i;:::-;25170:11;:9;:11::i;:::-;25094:94::o;22966:31::-;;;;:::o;10868:107::-;10001:9;:7;:9::i;:::-;9993:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10940:28;10959:8;10940:18;:28::i;:::-;10868:107;:::o;3722:134::-;3780:7;3806:43;3810:1;3813;3806:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3799:50;3722:134;-1:-1:-1;;;3722:134:6:o;4607:459::-;4665:7;4906:6;4902:45;;-1:-1:-1;4935:1:6;4928:8;;4902:45;4969:5;;;4973:1;4969;:5;:1;4992:5;;;;;:10;4984:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5521:130;5579:7;5605:39;5609:1;5612;5605:39;;;;;;;;;;;;;;;;;:3;:39::i;3282:176::-;3340:7;3371:5;;;3394:6;;;;3386:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22273:213;22339:12;;:24;;22356:6;22339:24;:16;:24;:::i;:::-;22324:12;:39;22407:10;22397:21;;;;:9;:21;;;;;;:33;;22423:6;22397:33;:25;:33;:::i;:::-;22383:10;22373:21;;;;:9;:21;;;;;:57;;;;22440:6;;:39;;22373:21;22440:6;;;;22472;22440:19;:39::i;8585:96::-;8664:10;8585:96;:::o;17863:174::-;17971:58;;;17994:14;17971:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17971:58:6;;;;;;;;25:18:-1;;61:17;;17971:58:6;182:15:-1;17994:23:6;179:29:-1;160:49;;17945:85:6;;17964:5;;17945:18;:85::i;:::-;17863:174;;;:::o;1985:104::-;2043:7;2073:1;2069;:5;:13;;2081:1;2069:13;;;-1:-1:-1;2077:1:6;;1985:104;-1:-1:-1;1985:104:6:o;22038:229::-;22101:12;;:24;;22118:6;22101:24;:16;:24;:::i;:::-;22086:12;:39;22169:10;22159:21;;;;:9;:21;;;;;;:33;;22185:6;22159:33;:25;:33;:::i;:::-;22145:10;22135:21;;;;:9;:21;;;;;:57;;;;22202:6;;:58;;22135:21;22202:6;;;;22246:4;22253:6;22202:23;:58::i;11076:225::-;11149:22;;;11141:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11250:6;;11229:38;;;;;;;11250:6;;11229:38;;11250:6;;11229:38;11277:6;:17;;;;;;;;;;;;;;;11076:225::o;4180:187::-;4266:7;4301:12;4293:6;;;;4285:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4285:29:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4336:5:6;;;4180:187::o;6166:338::-;6252:7;6352:12;6345:5;6337:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6337:28:6;;6375:9;6391:1;6387;:5;;;;;;;6166:338;-1:-1:-1;;;;;6166:338:6:o;19867:1095::-;20462:27;20470:5;20462:25;;;:27::i;:::-;20454:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20596:12;20610:23;20645:5;20637:19;;20657:4;20637:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20637:25:6;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20595:67:6;;;;20680:7;20672:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20739:17;;:21;20735:221;;20879:10;20868:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20868:30:6;20860:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19867:1095;;;;:::o;18043:202::-;18169:68;;;18192:18;18169:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;18169:68:6;;;;;;;;25:18:-1;;61:17;;18169:68:6;182:15:-1;18192:27:6;179:29:-1;160:49;;18143:95:6;;18162:5;;18143:18;:95::i;14773:797::-;14833:4;15481:20;;15326:66;15520:15;;;;;:42;;;15551:11;15539:8;:23;;15520:42;15512:51;14773:797;-1:-1:-1;;;;14773:797:6:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-27\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-26\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMIncentives.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n function mint(address account, uint amount) external;\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni_lp = IERC20(0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n function mint(address to, uint256 amount) external;\n}\n\ncontract YAMIncentives is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 7 days;\n\n uint256 public initreward = 2 * 10**6 * 10**18; // 6m\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart{\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart{\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkhalve checkStart{\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n yam.safeTransfer(msg.sender, reward);\n emit RewardPaid(msg.sender, reward);\n }\n }\n\n modifier checkhalve(){\n if (block.timestamp >= periodFinish) {\n initreward = initreward.mul(50).div(100);\n yam.mint(address(this), initreward);\n\n rewardRate = initreward.div(DURATION);\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(initreward);\n }\n _;\n }\n modifier checkStart(){\n require(block.timestamp > starttime,\"not start\");\n _;\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**24);\n yam.mint(address(this), trueReward);\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 6162 - ], - "Context": [ - 5901 - ], - "IERC20": [ - 6088 - ], - "IRewardDistributionRecipient": [ - 6413 - ], - "LPTokenWrapper": [ - 6523 - ], - "Math": [ - 5689 - ], - "Ownable": [ - 6013 - ], - "SafeERC20": [ - 6378 - ], - "SafeMath": [ - 5875 - ], - "YAM": [ - 6536 - ], - "YAMIncentives": [ - 6998 - ] - }, - "id": 6999, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 5622, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 5689, - "linearizedBaseContracts": [ - 5689 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5638, - "nodeType": "Block", - "src": "1876:38:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5631, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5624, - "src": "1893:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5632, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5626, - "src": "1898:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5635, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5626, - "src": "1906:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:6", - "trueExpression": { - "argumentTypes": null, - "id": 5634, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5624, - "src": "1902:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5630, - "id": 5637, - "nodeType": "Return", - "src": "1886:21:6" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 5639, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5627, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5624, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5639, - "src": "1822:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5623, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5626, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5639, - "src": "1833:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5625, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:6" - }, - "returnParameters": { - "id": 5630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5629, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5639, - "src": "1867:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5628, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:6" - }, - "scope": 5689, - "src": "1809:105:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5655, - "nodeType": "Block", - "src": "2052:37:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5648, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5641, - "src": "2069:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 5649, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5643, - "src": "2073:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5652, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5643, - "src": "2081:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:6", - "trueExpression": { - "argumentTypes": null, - "id": 5651, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5641, - "src": "2077:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5647, - "id": 5654, - "nodeType": "Return", - "src": "2062:20:6" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 5656, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5641, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5656, - "src": "1998:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5640, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5643, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5656, - "src": "2009:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5642, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:6" - }, - "returnParameters": { - "id": 5647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5646, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5656, - "src": "2043:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5645, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:6" - }, - "scope": 5689, - "src": "1985:104:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5687, - "nodeType": "Block", - "src": "2273:119:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5665, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5658, - "src": "2345:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5668, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5669, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5660, - "src": "2355:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5672, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5674, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5658, - "src": "2366:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5677, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5660, - "src": "2374:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5681, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5684, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5664, - "id": 5686, - "nodeType": "Return", - "src": "2337:48:6" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 5688, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5661, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5658, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "2219:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5657, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5660, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "2230:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5659, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:6" - }, - "returnParameters": { - "id": 5664, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5663, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "2264:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5662, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:6" - }, - "scope": 5689, - "src": "2202:190:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "1726:668:6" - }, - { - "id": 5690, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 5875, - "linearizedBaseContracts": [ - 5875 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5714, - "nodeType": "Block", - "src": "3349:109:6", - "statements": [ - { - "assignments": [ - 5700 - ], - "declarations": [ - { - "constant": false, - "id": 5700, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5714, - "src": "3359:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5699, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5704, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5701, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5692, - "src": "3371:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 5702, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5694, - "src": "3375:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5706, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5700, - "src": "3394:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5707, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5692, - "src": "3399:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 5709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 5705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "3386:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5711, - "nodeType": "ExpressionStatement", - "src": "3386:46:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5712, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5700, - "src": "3450:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5698, - "id": 5713, - "nodeType": "Return", - "src": "3443:8:6" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 5715, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5695, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5692, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5715, - "src": "3295:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5694, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5715, - "src": "3306:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5693, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:6" - }, - "returnParameters": { - "id": 5698, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5697, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5715, - "src": "3340:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5696, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:6" - }, - "scope": 5875, - "src": "3282:176:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5730, - "nodeType": "Block", - "src": "3789:67:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5725, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5717, - "src": "3810:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5726, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5719, - "src": "3813:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 5727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 5724, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5731, - 5758 - ], - "referencedDeclaration": 5758, - "src": "3806:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5723, - "id": 5729, - "nodeType": "Return", - "src": "3799:50:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 5731, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5720, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5717, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5731, - "src": "3735:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5716, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5719, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5731, - "src": "3746:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5718, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:6" - }, - "returnParameters": { - "id": 5723, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5722, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5731, - "src": "3780:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5721, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:6" - }, - "scope": 5875, - "src": "3722:134:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5757, - "nodeType": "Block", - "src": "4275:92:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5743, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5735, - "src": "4293:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 5744, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5733, - "src": "4298:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5746, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5737, - "src": "4301:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5742, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "4285:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5748, - "nodeType": "ExpressionStatement", - "src": "4285:29:6" - }, - { - "assignments": [ - 5750 - ], - "declarations": [ - { - "constant": false, - "id": 5750, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5757, - "src": "4324:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5749, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5754, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5751, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5733, - "src": "4336:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 5752, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5735, - "src": "4340:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5755, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5750, - "src": "4359:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5741, - "id": 5756, - "nodeType": "Return", - "src": "4352:8:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 5758, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5738, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5733, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4193:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5732, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5735, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4204:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5734, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5737, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4215:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5736, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:6" - }, - "returnParameters": { - "id": 5741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5740, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4266:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5739, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:6" - }, - "scope": 5875, - "src": "4180:187:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5791, - "nodeType": "Block", - "src": "4674:392:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5767, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5760, - "src": "4906:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5773, - "nodeType": "IfStatement", - "src": "4902:45:6", - "trueBody": { - "id": 5772, - "nodeType": "Block", - "src": "4914:33:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5770, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5766, - "id": 5771, - "nodeType": "Return", - "src": "4928:8:6" - } - ] - } - }, - { - "assignments": [ - 5775 - ], - "declarations": [ - { - "constant": false, - "id": 5775, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5791, - "src": "4957:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5774, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5779, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5776, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5760, - "src": "4969:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 5777, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5762, - "src": "4973:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5783, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5781, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5775, - "src": "4992:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5782, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5760, - "src": "4996:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5784, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5762, - "src": "5001:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 5786, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 5780, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "4984:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5788, - "nodeType": "ExpressionStatement", - "src": "4984:56:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5789, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5775, - "src": "5058:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5766, - "id": 5790, - "nodeType": "Return", - "src": "5051:8:6" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 5792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5760, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5792, - "src": "4620:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5762, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5792, - "src": "4631:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5761, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:6" - }, - "returnParameters": { - "id": 5766, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5765, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5792, - "src": "4665:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5764, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:6" - }, - "scope": 5875, - "src": "4607:459:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5807, - "nodeType": "Block", - "src": "5588:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5802, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5794, - "src": "5609:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5803, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5796, - "src": "5612:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 5804, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 5801, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5808, - 5835 - ], - "referencedDeclaration": 5835, - "src": "5605:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5800, - "id": 5806, - "nodeType": "Return", - "src": "5598:46:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5808, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5797, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5794, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5808, - "src": "5534:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5793, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5796, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5808, - "src": "5545:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5795, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:6" - }, - "returnParameters": { - "id": 5800, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5799, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5808, - "src": "5579:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5798, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:6" - }, - "scope": 5875, - "src": "5521:130:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5834, - "nodeType": "Block", - "src": "6261:243:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5820, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5812, - "src": "6345:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5821, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5823, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5814, - "src": "6352:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5819, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "6337:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5825, - "nodeType": "ExpressionStatement", - "src": "6337:28:6" - }, - { - "assignments": [ - 5827 - ], - "declarations": [ - { - "constant": false, - "id": 5827, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5834, - "src": "6375:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5826, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5831, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5828, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5810, - "src": "6387:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5829, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5812, - "src": "6391:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5832, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5827, - "src": "6496:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5818, - "id": 5833, - "nodeType": "Return", - "src": "6489:8:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5835, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5815, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5810, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6179:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5809, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5812, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6190:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5811, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5814, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6201:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5813, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:6" - }, - "returnParameters": { - "id": 5818, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5817, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6252:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5816, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:6" - }, - "scope": 5875, - "src": "6166:338:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5850, - "nodeType": "Block", - "src": "7015:61:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5845, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5837, - "src": "7036:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5846, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5839, - "src": "7039:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 5847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 5844, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5851, - 5874 - ], - "referencedDeclaration": 5874, - "src": "7032:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5843, - "id": 5849, - "nodeType": "Return", - "src": "7025:44:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5851, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5837, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5851, - "src": "6961:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5836, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5839, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5851, - "src": "6972:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5838, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:6" - }, - "returnParameters": { - "id": 5843, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5842, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5851, - "src": "7006:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:6" - }, - "scope": 5875, - "src": "6948:128:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5873, - "nodeType": "Block", - "src": "7675:68:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5863, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5855, - "src": "7693:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5866, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5857, - "src": "7701:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5862, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "7685:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5868, - "nodeType": "ExpressionStatement", - "src": "7685:29:6" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5869, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5853, - "src": "7731:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 5870, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5855, - "src": "7735:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5861, - "id": 5872, - "nodeType": "Return", - "src": "7724:12:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5874, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5853, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7593:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5852, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5855, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7604:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5854, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5857, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7615:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5856, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:6" - }, - "returnParameters": { - "id": 5861, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5860, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7666:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5859, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:6" - }, - "scope": 5875, - "src": "7580:163:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "3037:4708:6" - }, - { - "id": 5876, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5901, - "linearizedBaseContracts": [ - 5901 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5879, - "nodeType": "Block", - "src": "8523:3:6", - "statements": [] - }, - "documentation": null, - "id": 5880, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5877, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:6" - }, - "returnParameters": { - "id": 5878, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:6" - }, - "scope": 5901, - "src": "8499:27:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5888, - "nodeType": "Block", - "src": "8647:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5885, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "8664:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 5884, - "id": 5887, - "nodeType": "Return", - "src": "8657:17:6" - } - ] - }, - "documentation": null, - "id": 5889, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5881, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:6" - }, - "returnParameters": { - "id": 5884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5883, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5889, - "src": "8630:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5882, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:6" - }, - "scope": 5901, - "src": "8585:96:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5899, - "nodeType": "Block", - "src": "8744:165:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5894, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12223, - "src": "8754:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5901", - "typeString": "contract Context" - } - }, - "id": 5895, - "nodeType": "ExpressionStatement", - "src": "8754:4:6" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5896, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "8894:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 5893, - "id": 5898, - "nodeType": "Return", - "src": "8887:15:6" - } - ] - }, - "documentation": null, - "id": 5900, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5890, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:6" - }, - "returnParameters": { - "id": 5893, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5892, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5900, - "src": "8730:12:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5891, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:6" - }, - "scope": 5901, - "src": "8687:222:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "8322:589:6" - }, - { - "id": 5902, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 5903, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5901, - "src": "9375:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5901", - "typeString": "contract Context" - } - }, - "id": 5904, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:6" - } - ], - "contractDependencies": [ - 5901 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 6013, - "linearizedBaseContracts": [ - 6013, - 5901 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 5906, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 6013, - "src": "9389:22:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5905, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 5912, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 5911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5908, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 5912, - "src": "9445:29:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5907, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5910, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5912, - "src": "9476:24:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5909, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:6" - }, - "src": "9418:84:6" - }, - { - "body": { - "id": 5927, - "nodeType": "Block", - "src": "9628:93:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5915, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "9638:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5916, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5889, - "src": "9647:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5919, - "nodeType": "ExpressionStatement", - "src": "9638:21:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:6", - "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": 5921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5923, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5924, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "9707:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5920, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5912, - "src": "9674:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5926, - "nodeType": "EmitStatement", - "src": "9669:45:6" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 5928, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5913, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:6" - }, - "returnParameters": { - "id": 5914, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:6" - }, - "scope": 6013, - "src": "9604:117:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5935, - "nodeType": "Block", - "src": "9844:30:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5933, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "9861:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 5932, - "id": 5934, - "nodeType": "Return", - "src": "9854:13:6" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 5936, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5929, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:6" - }, - "returnParameters": { - "id": 5932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5931, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5936, - "src": "9835:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5930, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:6" - }, - "scope": 6013, - "src": "9797:77:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5945, - "nodeType": "Block", - "src": "9983:82:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5939, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5957, - "src": "10001:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 5940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 5941, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 5938, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "9993:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5943, - "nodeType": "ExpressionStatement", - "src": "9993:54:6" - }, - { - "id": 5944, - "nodeType": "PlaceholderStatement", - "src": "10057:1:6" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 5946, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 5937, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:6" - }, - "src": "9962:103:6", - "visibility": "internal" - }, - { - "body": { - "id": 5956, - "nodeType": "Block", - "src": "10194:46:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5951, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5889, - "src": "10211:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5953, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "10227:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5950, - "id": 5955, - "nodeType": "Return", - "src": "10204:29:6" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 5957, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5947, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:6" - }, - "returnParameters": { - "id": 5950, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5949, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5957, - "src": "10188:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5948, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:6" - }, - "scope": 6013, - "src": "10148:92:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5975, - "nodeType": "Block", - "src": "10628:91:6", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5963, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "10664:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:6", - "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": 5964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5962, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5912, - "src": "10643:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5968, - "nodeType": "EmitStatement", - "src": "10638:45:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5969, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "10693:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5971, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:6", - "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": 5970, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5972, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5974, - "nodeType": "ExpressionStatement", - "src": "10693:19:6" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 5976, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5960, - "modifierName": { - "argumentTypes": null, - "id": 5959, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5946, - "src": "10618:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:6" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5958, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:6" - }, - "returnParameters": { - "id": 5961, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:6" - }, - "scope": 6013, - "src": "10582:137:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5987, - "nodeType": "Block", - "src": "10930:45:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5984, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5978, - "src": "10959:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5983, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6012, - "src": "10940:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5986, - "nodeType": "ExpressionStatement", - "src": "10940:28:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 5988, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5981, - "modifierName": { - "argumentTypes": null, - "id": 5980, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5946, - "src": "10920:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:6" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5979, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5978, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5988, - "src": "10895:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5977, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:6" - }, - "returnParameters": { - "id": 5982, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:6" - }, - "scope": 6013, - "src": "10868:107:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6011, - "nodeType": "Block", - "src": "11131:170:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5994, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5990, - "src": "11149:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5996, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:6", - "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": 5995, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 5999, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 5993, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "11141:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6001, - "nodeType": "ExpressionStatement", - "src": "11141:73:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6003, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "11250:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6004, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5990, - "src": "11258:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6002, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5912, - "src": "11229:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 6005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6006, - "nodeType": "EmitStatement", - "src": "11224:43:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6007, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "11277:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6008, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5990, - "src": "11286:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6010, - "nodeType": "ExpressionStatement", - "src": "11277:17:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 6012, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5991, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5990, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 6012, - "src": "11104:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5989, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:6" - }, - "returnParameters": { - "id": 5992, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:6" - }, - "scope": 6013, - "src": "11076:225:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "9355:1948:6" - }, - { - "id": 6014, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 6088, - "linearizedBaseContracts": [ - 6088 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 6019, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6015, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:6" - }, - "returnParameters": { - "id": 6018, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6017, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6019, - "src": "11678:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6016, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:6" - }, - "scope": 6088, - "src": "11632:55:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 6026, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6021, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6026, - "src": "11789:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6020, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:6" - }, - "returnParameters": { - "id": 6025, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6024, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6026, - "src": "11829:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6023, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:6" - }, - "scope": 6088, - "src": "11770:68:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 6035, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6031, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6028, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 6035, - "src": "12076:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6027, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6030, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6035, - "src": "12095:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6029, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:6" - }, - "returnParameters": { - "id": 6034, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6033, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6035, - "src": "12129:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6032, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:6" - }, - "scope": 6088, - "src": "12058:77:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 6042, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6037, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6042, - "src": "12154:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6036, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6039, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6042, - "src": "12171:11:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6038, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:6" - }, - "returnParameters": { - "id": 6041, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:6" - }, - "scope": 6088, - "src": "12140:53:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 6051, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6047, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6044, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 6051, - "src": "12487:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6043, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6046, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6051, - "src": "12502:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6045, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:6" - }, - "returnParameters": { - "id": 6050, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6049, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6051, - "src": "12542:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6048, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:6" - }, - "scope": 6088, - "src": "12468:83:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 6060, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6056, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6053, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "13221:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6052, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6055, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "13238:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6054, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:6" - }, - "returnParameters": { - "id": 6059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6058, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "13272:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6057, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:6" - }, - "scope": 6088, - "src": "13204:74:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 6071, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6067, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6062, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13607:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6061, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6064, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13623:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6063, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6066, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13642:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6065, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:6" - }, - "returnParameters": { - "id": 6070, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6069, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13676:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6068, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:6" - }, - "scope": 6088, - "src": "13585:97:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 6079, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 6078, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6073, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 6079, - "src": "13866:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6072, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6075, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6079, - "src": "13888:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6074, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6077, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6079, - "src": "13908:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6076, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:6" - }, - "src": "13851:72:6" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 6087, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 6086, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6081, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 6087, - "src": "14097:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6080, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6083, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6087, - "src": "14120:23:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6082, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6085, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6087, - "src": "14145:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6084, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:6" - }, - "src": "14082:78:6" - } - ], - "scope": 6999, - "src": "11538:2624:6" - }, - { - "id": 6089, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 6162, - "linearizedBaseContracts": [ - 6162 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6113, - "nodeType": "Block", - "src": "14839:731:6", - "statements": [ - { - "assignments": [ - 6097 - ], - "declarations": [ - { - "constant": false, - "id": 6097, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 6113, - "src": "15278:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 6096, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6098, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:6" - }, - { - "assignments": [ - 6100 - ], - "declarations": [ - { - "constant": false, - "id": 6100, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 6113, - "src": "15304:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 6099, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6102, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 6101, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:6" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 6097, - "isOffset": false, - "isSlot": false, - "src": "15469:8:6", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 6091, - "isOffset": false, - "isSlot": false, - "src": "15493:7:6", - "valueSize": 1 - } - } - ], - "id": 6103, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:6" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 6110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 6106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6104, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6097, - "src": "15520:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 6105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 6109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6107, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6097, - "src": "15539:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 6108, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "15551:11:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 6111, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 6095, - "id": 6112, - "nodeType": "Return", - "src": "15512:51:6" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 6114, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6091, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6114, - "src": "14793:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6090, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:6" - }, - "returnParameters": { - "id": 6095, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6094, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6114, - "src": "14833:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6093, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:6" - }, - "scope": 6162, - "src": "14773:797:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6127, - "nodeType": "Block", - "src": "15855:49:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6123, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6116, - "src": "15888:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 6124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 6121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 6120, - "id": 6126, - "nodeType": "Return", - "src": "15865:32:6" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 6128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6116, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6128, - "src": "15798:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6115, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:6" - }, - "returnParameters": { - "id": 6120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6119, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6128, - "src": "15838:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 6118, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:6" - }, - "scope": 6162, - "src": "15779:125:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6160, - "nodeType": "Block", - "src": "16932:294:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6137, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12229, - "src": "16958:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$6162", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$6162", - "typeString": "library Address" - } - ], - "id": 6136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6140, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6132, - "src": "16975:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 6142, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 6135, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "16942:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6144, - "nodeType": "ExpressionStatement", - "src": "16942:73:6" - }, - { - "assignments": [ - 6146, - null - ], - "declarations": [ - { - "constant": false, - "id": 6146, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 6160, - "src": "17081:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6145, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 6154, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 6152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 6150, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6132, - "src": "17120:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6147, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "17099:9:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 6148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:6", - "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": 6149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 6151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:6", - "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": 6153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6156, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6146, - "src": "17149:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 6157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 6155, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "17141:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6159, - "nodeType": "ExpressionStatement", - "src": "17141:78:6" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 6161, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6133, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6130, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 6161, - "src": "16880:25:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 6129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6132, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6161, - "src": "16907:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:6" - }, - "returnParameters": { - "id": 6134, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:6" - }, - "scope": 6162, - "src": "16861:365:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "14309:2919:6" - }, - { - "id": 6163, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 6378, - "linearizedBaseContracts": [ - 6378 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6166, - "libraryName": { - "contractScope": null, - "id": 6164, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5875, - "src": "17805:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5875", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:6", - "typeName": { - "id": 6165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 6169, - "libraryName": { - "contractScope": null, - "id": 6167, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6162, - "src": "17837:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$6162", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:6", - "typeName": { - "id": 6168, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 6190, - "nodeType": "Block", - "src": "17935:102:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6179, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6171, - "src": "17964:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6182, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6171, - "src": "17994:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6035, - "src": "17994:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6185, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6173, - "src": "18019:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6186, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6175, - "src": "18023:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6180, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "17971:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6178, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "17945:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6189, - "nodeType": "ExpressionStatement", - "src": "17945:85:6" - } - ] - }, - "documentation": null, - "id": 6191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6171, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6191, - "src": "17885:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6170, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "17885:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6173, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6191, - "src": "17899:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6172, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6175, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6191, - "src": "17911:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:6" - }, - "returnParameters": { - "id": 6177, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:6" - }, - "scope": 6378, - "src": "17863:174:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6215, - "nodeType": "Block", - "src": "18133:112:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6203, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6193, - "src": "18162:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6206, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6193, - "src": "18192:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 6071, - "src": "18192:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 6208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6209, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6195, - "src": "18221:4:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6210, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6197, - "src": "18227:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6211, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6199, - "src": "18231:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6204, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "18169:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6202, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "18143:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6214, - "nodeType": "ExpressionStatement", - "src": "18143:95:6" - } - ] - }, - "documentation": null, - "id": 6216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6193, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18069:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6192, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "18069:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6195, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18083:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6197, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18097:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6199, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18109:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6198, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:6" - }, - "returnParameters": { - "id": 6201, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:6" - }, - "scope": 6378, - "src": "18043:202:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6256, - "nodeType": "Block", - "src": "18327:536:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 6240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6226, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6222, - "src": "18616:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6227, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 6229, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6233, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12231, - "src": "18656:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - ], - "id": 6232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6235, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6220, - "src": "18663:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6230, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6218, - "src": "18632:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 6051, - "src": "18632:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 6239, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 6241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 6225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "18607:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6243, - "nodeType": "ExpressionStatement", - "src": "18607:150:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6245, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6218, - "src": "18786:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6248, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6218, - "src": "18816:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 6060, - "src": "18816:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6251, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6220, - "src": "18840:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6252, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6222, - "src": "18849:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6246, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "18793:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6247, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6244, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "18767:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6255, - "nodeType": "ExpressionStatement", - "src": "18767:89:6" - } - ] - }, - "documentation": null, - "id": 6257, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6223, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6218, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "18272:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6217, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "18272:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6220, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "18286:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6219, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6222, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "18303:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:6" - }, - "returnParameters": { - "id": 6224, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:6" - }, - "scope": 6378, - "src": "18251:612:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6291, - "nodeType": "Block", - "src": "18955:196:6", - "statements": [ - { - "assignments": [ - 6267 - ], - "declarations": [ - { - "constant": false, - "id": 6267, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 6291, - "src": "18965:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6266, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6278, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6276, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6263, - "src": "19032:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6271, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12231, - "src": "19012:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - ], - "id": 6270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6273, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6261, - "src": "19019:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6268, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "18988:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 6051, - "src": "18988:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "18988:43:6", - "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": 6277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6280, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "19067:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6283, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "19097:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 6060, - "src": "19097:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6286, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6261, - "src": "19121:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6287, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6267, - "src": "19130:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6281, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "19074:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6282, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6279, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "19048:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6290, - "nodeType": "ExpressionStatement", - "src": "19048:96:6" - } - ] - }, - "documentation": null, - "id": 6292, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6259, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6292, - "src": "18900:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6258, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "18900:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6261, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6292, - "src": "18914:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6260, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6263, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6292, - "src": "18931:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:6" - }, - "returnParameters": { - "id": 6265, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:6" - }, - "scope": 6378, - "src": "18869:282:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6327, - "nodeType": "Block", - "src": "19243:241:6", - "statements": [ - { - "assignments": [ - 6302 - ], - "declarations": [ - { - "constant": false, - "id": 6302, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 6327, - "src": "19253:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6314, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6311, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6298, - "src": "19320:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 6312, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6306, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12231, - "src": "19300:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - ], - "id": 6305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6308, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6296, - "src": "19307:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6303, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6294, - "src": "19276:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 6051, - "src": "19276:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5758, - "src": "19276:43:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6316, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6294, - "src": "19400:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6319, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6294, - "src": "19430:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 6060, - "src": "19430:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6322, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6296, - "src": "19454:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6323, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6302, - "src": "19463:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6317, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "19407:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6315, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "19381:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6326, - "nodeType": "ExpressionStatement", - "src": "19381:96:6" - } - ] - }, - "documentation": null, - "id": 6328, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6299, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6294, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6328, - "src": "19188:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6293, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "19188:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6296, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6328, - "src": "19202:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6298, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6328, - "src": "19219:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6297, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:6" - }, - "returnParameters": { - "id": 6300, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:6" - }, - "scope": 6378, - "src": "19157:327:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6376, - "nodeType": "Block", - "src": "19936:1026:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6337, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6330, - "src": "20470:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - ], - "id": 6336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 6114, - "src": "20462:25:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 6340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 6341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 6335, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "20454:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6343, - "nodeType": "ExpressionStatement", - "src": "20454:71:6" - }, - { - "assignments": [ - 6345, - 6347 - ], - "declarations": [ - { - "constant": false, - "id": 6345, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 6376, - "src": "20596:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6344, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6347, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 6376, - "src": "20610:23:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6346, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6354, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6352, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6332, - "src": "20657:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6349, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6330, - "src": "20645:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - ], - "id": 6348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:6", - "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": 6353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6356, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6345, - "src": "20680:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 6357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 6355, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "20672:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6359, - "nodeType": "ExpressionStatement", - "src": "20672:52:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6360, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6347, - "src": "20739:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 6361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6375, - "nodeType": "IfStatement", - "src": "20735:221:6", - "trueBody": { - "id": 6374, - "nodeType": "Block", - "src": "20762:194:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6367, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6347, - "src": "20879:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 6368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 6369, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 6365, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "20868:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 6370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 6371, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 6364, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "20860:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6373, - "nodeType": "ExpressionStatement", - "src": "20860:85:6" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 6377, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6333, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6330, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6377, - "src": "19895:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6329, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "19895:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6332, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6377, - "src": "19909:17:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6331, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:6" - }, - "returnParameters": { - "id": 6334, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:6" - }, - "scope": 6378, - "src": "19867:1095:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 6999, - "src": "17775:3189:6" - }, - { - "id": 6379, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6380, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6013, - "src": "21087:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$6013", - "typeString": "contract Ownable" - } - }, - "id": 6381, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:6" - } - ], - "contractDependencies": [ - 5901, - 6013 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 6413, - "linearizedBaseContracts": [ - 6413, - 6013, - 5901 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6383, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6413, - "src": "21101:26:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6382, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 6388, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6386, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6385, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6388, - "src": "21162:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:6" - }, - "returnParameters": { - "id": 6387, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:6" - }, - "scope": 6413, - "src": "21134:53:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6399, - "nodeType": "Block", - "src": "21227:108:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6391, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5889, - "src": "21245:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6393, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6383, - "src": "21261:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 6395, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 6390, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "21237:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6397, - "nodeType": "ExpressionStatement", - "src": "21237:80:6" - }, - { - "id": 6398, - "nodeType": "PlaceholderStatement", - "src": "21327:1:6" - } - ] - }, - "documentation": null, - "id": 6400, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6389, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:6" - }, - "src": "21193:142:6", - "visibility": "internal" - }, - { - "body": { - "id": 6411, - "nodeType": "Block", - "src": "21440:57:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6407, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6383, - "src": "21450:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6408, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6402, - "src": "21471:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6410, - "nodeType": "ExpressionStatement", - "src": "21450:40:6" - } - ] - }, - "documentation": null, - "id": 6412, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6405, - "modifierName": { - "argumentTypes": null, - "id": 6404, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5946, - "src": "21426:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:6" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6403, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6402, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6412, - "src": "21372:27:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6401, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:6" - }, - "returnParameters": { - "id": 6406, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:6" - }, - "scope": 6413, - "src": "21341:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6999, - "src": "21046:453:6" - }, - { - "id": 6414, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6523, - "linearizedBaseContracts": [ - 6523 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6417, - "libraryName": { - "contractScope": null, - "id": 6415, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5875, - "src": "21604:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5875", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:6", - "typeName": { - "id": 6416, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 6420, - "libraryName": { - "contractScope": null, - "id": 6418, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6378, - "src": "21636:9:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:6", - "typeName": { - "contractScope": null, - "id": 6419, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "21650:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 6425, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 6523, - "src": "21663:73:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6421, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "21663:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 6423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6422, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6088, - "src": "21686:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6088_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6427, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 6523, - "src": "21743:28:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 6431, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 6523, - "src": "21777:45:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6430, - "keyType": { - "id": 6428, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21785:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21777:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21796:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 6438, - "nodeType": "Block", - "src": "21882:36:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6436, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "21899:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6435, - "id": 6437, - "nodeType": "Return", - "src": "21892:19:6" - } - ] - }, - "documentation": null, - "id": 6439, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6432, - "nodeType": "ParameterList", - "parameters": [], - "src": "21849:2:6" - }, - "returnParameters": { - "id": 6435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6439, - "src": "21873:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21873:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21872:9:6" - }, - "scope": 6523, - "src": "21829:89:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6450, - "nodeType": "Block", - "src": "21990:42:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6446, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22007:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6448, - "indexExpression": { - "argumentTypes": null, - "id": 6447, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6441, - "src": "22017:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22007:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6445, - "id": 6449, - "nodeType": "Return", - "src": "22000:25:6" - } - ] - }, - "documentation": null, - "id": 6451, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6441, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6451, - "src": "21943:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6440, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21943:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21942:17:6" - }, - "returnParameters": { - "id": 6445, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6444, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6451, - "src": "21981:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6443, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21981:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21980:9:6" - }, - "scope": 6523, - "src": "21924:108:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6487, - "nodeType": "Block", - "src": "22076:191:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6456, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22086:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6459, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6453, - "src": "22118:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6457, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22101:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "22101:16:6", - "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": 6460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22101:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22086:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6462, - "nodeType": "ExpressionStatement", - "src": "22086:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6463, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22135:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6466, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6464, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22145:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22145:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22135:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6472, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6453, - "src": "22185:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6467, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22159:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6470, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6468, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22169:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22169:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22159:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "22159:25:6", - "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": 6473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22159:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22135:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6475, - "nodeType": "ExpressionStatement", - "src": "22135:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6479, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22226:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22226:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6482, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12235, - "src": "22246:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6523", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6523", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 6481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22238:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6484, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6453, - "src": "22253:6:6", - "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, - "id": 6476, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6425, - "src": "22202:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 6216, - "src": "22202:23:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$6088_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 6485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22202:58:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6486, - "nodeType": "ExpressionStatement", - "src": "22202:58:6" - } - ] - }, - "documentation": null, - "id": 6488, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6454, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6453, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6488, - "src": "22053:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6452, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22053:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22052:16:6" - }, - "returnParameters": { - "id": 6455, - "nodeType": "ParameterList", - "parameters": [], - "src": "22076:0:6" - }, - "scope": 6523, - "src": "22038:229:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6521, - "nodeType": "Block", - "src": "22314:172:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6493, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22324:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6496, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6490, - "src": "22356:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6494, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22339:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "22339:16:6", - "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": 6497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22339:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22324:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6499, - "nodeType": "ExpressionStatement", - "src": "22324:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6500, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22373:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6503, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6501, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22383:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22383:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22373:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6509, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6490, - "src": "22423:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6504, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22397:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6507, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6505, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22407:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22407:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22397:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "22397:25:6", - "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": 6510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22397:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22373:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6512, - "nodeType": "ExpressionStatement", - "src": "22373:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6516, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22460:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22460:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6518, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6490, - "src": "22472:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6513, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6425, - "src": "22440:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6191, - "src": "22440:19:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$6088_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22440:39:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6520, - "nodeType": "ExpressionStatement", - "src": "22440:39:6" - } - ] - }, - "documentation": null, - "id": 6522, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6491, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6490, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6522, - "src": "22291:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6489, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22291:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22290:16:6" - }, - "returnParameters": { - "id": 6492, - "nodeType": "ParameterList", - "parameters": [], - "src": "22314:0:6" - }, - "scope": 6523, - "src": "22273:213:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 6999, - "src": "21568:920:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 6536, - "linearizedBaseContracts": [ - 6536 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 6528, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6524, - "nodeType": "ParameterList", - "parameters": [], - "src": "22536:2:6" - }, - "returnParameters": { - "id": 6527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6526, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6528, - "src": "22557:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6525, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22557:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22556:9:6" - }, - "scope": 6536, - "src": "22510:56:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 6535, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6533, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6530, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6535, - "src": "22585:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22585:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6532, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6535, - "src": "22597:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6531, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22597:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22584:28:6" - }, - "returnParameters": { - "id": 6534, - "nodeType": "ParameterList", - "parameters": [], - "src": "22621:0:6" - }, - "scope": 6536, - "src": "22571:51:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6999, - "src": "22490:134:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6537, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6523, - "src": "22652:14:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6523", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 6538, - "nodeType": "InheritanceSpecifier", - "src": "22652:14:6" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6539, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6413, - "src": "22668:28:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$6413", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 6540, - "nodeType": "InheritanceSpecifier", - "src": "22668:28:6" - } - ], - "contractDependencies": [ - 5901, - 6013, - 6413, - 6523 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6998, - "linearizedBaseContracts": [ - 6998, - 6413, - 6013, - 5901, - 6523 - ], - "name": "YAMIncentives", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6545, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22703:70:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6541, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "22703:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 6543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22730:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6542, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6088, - "src": "22723:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6088_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6544, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22723:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 6548, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22779:41:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22779:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "37", - "id": 6547, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22814:6:6", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_604800_by_1", - "typeString": "int_const 604800" - }, - "value": "7" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6559, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22827:46:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6549, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22827:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_2000000000000000000000000_by_1", - "typeString": "int_const 2000000000000000000000000" - }, - "id": 6558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_2000000_by_1", - "typeString": "int_const 2000000" - }, - "id": 6554, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22855:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000_by_1", - "typeString": "int_const 1000000" - }, - "id": 6553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22859:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "36", - "id": 6552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_6_by_1", - "typeString": "int_const 6" - }, - "value": "6" - }, - "src": "22859:5:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000_by_1", - "typeString": "int_const 1000000" - } - }, - "src": "22855:9:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_2000000_by_1", - "typeString": "int_const 2000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 6557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 6556, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22867:6:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22855:18:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_2000000000000000000000000_by_1", - "typeString": "int_const 2000000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6562, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22885:37:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6560, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22885:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353936393331323030", - "id": 6561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22912:10:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6565, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22966:31:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6563, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22966:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6564, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22996:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6568, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23003:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23031:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6570, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23038:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6569, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23038:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6572, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23073:35:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23073:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6576, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23114:57:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6575, - "keyType": { - "id": 6573, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23122:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23114:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6574, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23133:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6580, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23177:42:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6579, - "keyType": { - "id": 6577, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23185:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23177:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23196:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6584, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 6583, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6582, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6584, - "src": "23244:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6581, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23244:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23243:16:6" - }, - "src": "23226:34:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 6590, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 6589, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6586, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6590, - "src": "23278:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6585, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23278:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6588, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6590, - "src": "23300:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6587, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23300:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23277:38:6" - }, - "src": "23265:51:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 6596, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 6595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6592, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6596, - "src": "23337:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23337:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6594, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6596, - "src": "23359:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6593, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23359:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23336:38:6" - }, - "src": "23321:54:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 6602, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 6601, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6598, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6602, - "src": "23397:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6597, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23397:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6600, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6602, - "src": "23419:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23419:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23396:38:6" - }, - "src": "23380:55:6" - }, - { - "body": { - "id": 6638, - "nodeType": "Block", - "src": "23480:283:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6606, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "23490:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6607, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6685, - "src": "23513:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23513:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23490:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6610, - "nodeType": "ExpressionStatement", - "src": "23490:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6611, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6570, - "src": "23539:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6612, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6652, - "src": "23556:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23556:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23539:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6615, - "nodeType": "ExpressionStatement", - "src": "23539:43:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6616, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23596:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6618, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23615:1:6", - "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": 6617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23607:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23607:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23596:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6636, - "nodeType": "IfStatement", - "src": "23592:154:6", - "trueBody": { - "id": 6635, - "nodeType": "Block", - "src": "23619:127:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6621, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6580, - "src": "23633:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6623, - "indexExpression": { - "argumentTypes": null, - "id": 6622, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23641:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23633:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6625, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23659:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6624, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6714, - "src": "23652:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23652:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23633:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6628, - "nodeType": "ExpressionStatement", - "src": "23633:34:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6629, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6576, - "src": "23681:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6631, - "indexExpression": { - "argumentTypes": null, - "id": 6630, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23704:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23681:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6632, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "23715:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23681:54:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6634, - "nodeType": "ExpressionStatement", - "src": "23681:54:6" - } - ] - } - }, - { - "id": 6637, - "nodeType": "PlaceholderStatement", - "src": "23755:1:6" - } - ] - }, - "documentation": null, - "id": 6639, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6604, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6639, - "src": "23463:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23463:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23462:17:6" - }, - "src": "23441:322:6", - "visibility": "internal" - }, - { - "body": { - "id": 6651, - "nodeType": "Block", - "src": "23835:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "23861:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23861:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6648, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "23878:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6644, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5689, - "src": "23852:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$5689_$", - "typeString": "type(library Math)" - } - }, - "id": 6645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 5656, - "src": "23852:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 6649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23852:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6643, - "id": 6650, - "nodeType": "Return", - "src": "23845:46:6" - } - ] - }, - "documentation": null, - "id": 6652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6640, - "nodeType": "ParameterList", - "parameters": [], - "src": "23802:2:6" - }, - "returnParameters": { - "id": 6643, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6642, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6652, - "src": "23826:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6641, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23826:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23825:9:6" - }, - "scope": 6998, - "src": "23769:129:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6684, - "nodeType": "Block", - "src": "23960:352:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6657, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6439, - "src": "23974:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23974:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23991:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23974:18:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6664, - "nodeType": "IfStatement", - "src": "23970:76:6", - "trueBody": { - "id": 6663, - "nodeType": "Block", - "src": "23994:52:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6661, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "24015:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6656, - "id": 6662, - "nodeType": "Return", - "src": "24008:27:6" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6679, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6439, - "src": "24277:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24277:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24246:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6673, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "24209:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6670, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6570, - "src": "24168:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6667, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6652, - "src": "24116:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "24116:51:6", - "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": 6671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:67:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "24116:92:6", - "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": 6674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:104:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "24116:129:6", - "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": 6677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:135:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "24116:160:6", - "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": 6681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:175:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6665, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "24074:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "24074:24:6", - "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": 6682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24074:231:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6656, - "id": 6683, - "nodeType": "Return", - "src": "24055:250:6" - } - ] - }, - "documentation": null, - "id": 6685, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6653, - "nodeType": "ParameterList", - "parameters": [], - "src": "23927:2:6" - }, - "returnParameters": { - "id": 6656, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6655, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6685, - "src": "23951:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6654, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23951:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23950:9:6" - }, - "scope": 6998, - "src": "23904:408:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6713, - "nodeType": "Block", - "src": "24381:196:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6708, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6580, - "src": "24553:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6710, - "indexExpression": { - "argumentTypes": null, - "id": 6709, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6687, - "src": "24561:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24553:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6705, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24526:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6699, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6576, - "src": "24471:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6701, - "indexExpression": { - "argumentTypes": null, - "id": 6700, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6687, - "src": "24494:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24471:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6696, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6685, - "src": "24450:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24450:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "24450:20:6", - "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": 6702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24450:53:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6693, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6687, - "src": "24420:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6692, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6451, - "src": "24410:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "24410:39:6", - "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": 6703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:94:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "24410:115:6", - "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": 6706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:121:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "24410:142:6", - "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": 6711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:160:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6691, - "id": 6712, - "nodeType": "Return", - "src": "24391:179:6" - } - ] - }, - "documentation": null, - "id": 6714, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6687, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6714, - "src": "24334:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24334:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24333:17:6" - }, - "returnParameters": { - "id": 6691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6690, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6714, - "src": "24372:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6689, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24372:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24371:9:6" - }, - "scope": 6998, - "src": "24318:259:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6746, - "nodeType": "Block", - "src": "24749:124:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6728, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6716, - "src": "24767:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6729, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24776:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24767:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 6731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24779:16:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 6727, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "24759:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24759:37:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6733, - "nodeType": "ExpressionStatement", - "src": "24759:37:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6737, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6716, - "src": "24818:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6734, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12240, - "src": "24806:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentives_$6998", - "typeString": "contract super YAMIncentives" - } - }, - "id": 6736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 6488, - "src": "24806:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24806:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6739, - "nodeType": "ExpressionStatement", - "src": "24806:19:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6741, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "24847:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24847:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6743, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6716, - "src": "24859:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6740, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6590, - "src": "24840:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24840:26:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6745, - "nodeType": "EmitStatement", - "src": "24835:31:6" - } - ] - }, - "documentation": null, - "id": 6747, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6719, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "24716:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24716:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6721, - "modifierName": { - "argumentTypes": null, - "id": 6718, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "24703:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24703:24:6" - }, - { - "arguments": null, - "id": 6723, - "modifierName": { - "argumentTypes": null, - "id": 6722, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6885, - "src": "24728:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24728:10:6" - }, - { - "arguments": null, - "id": 6725, - "modifierName": { - "argumentTypes": null, - "id": 6724, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6897, - "src": "24739:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24739:10:6" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6717, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6716, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6747, - "src": "24680:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6715, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24680:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24679:16:6" - }, - "returnParameters": { - "id": 6726, - "nodeType": "ParameterList", - "parameters": [], - "src": "24749:0:6" - }, - "scope": 6998, - "src": "24665:208:6", - "stateMutability": "nonpayable", - "superFunction": 6488, - "visibility": "public" - }, - { - "body": { - "id": 6777, - "nodeType": "Block", - "src": "24955:133:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6759, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6749, - "src": "24973:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6760, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24982:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24973:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 6762, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24985:19:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 6758, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "24965:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24965:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6764, - "nodeType": "ExpressionStatement", - "src": "24965:40:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6768, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6749, - "src": "25030:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6765, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12240, - "src": "25015:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentives_$6998", - "typeString": "contract super YAMIncentives" - } - }, - "id": 6767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 6522, - "src": "25015:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25015:22:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6770, - "nodeType": "ExpressionStatement", - "src": "25015:22:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6772, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25062:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25062:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6774, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6749, - "src": "25074:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6771, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6596, - "src": "25052:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25052:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6776, - "nodeType": "EmitStatement", - "src": "25047:34:6" - } - ] - }, - "documentation": null, - "id": 6778, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6752, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "24933:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24933:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6754, - "modifierName": { - "argumentTypes": null, - "id": 6751, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "24920:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24920:24:6" - }, - { - "arguments": null, - "id": 6756, - "modifierName": { - "argumentTypes": null, - "id": 6755, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6897, - "src": "24945:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24945:10:6" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6749, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6778, - "src": "24897:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24897:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24896:16:6" - }, - "returnParameters": { - "id": 6757, - "nodeType": "ParameterList", - "parameters": [], - "src": "24955:0:6" - }, - "scope": 6998, - "src": "24879:209:6", - "stateMutability": "nonpayable", - "superFunction": 6522, - "visibility": "public" - }, - { - "body": { - "id": 6791, - "nodeType": "Block", - "src": "25119:69:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6783, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25148:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25148:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6782, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6451, - "src": "25138:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25138:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6781, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6778 - ], - "referencedDeclaration": 6778, - "src": "25129:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25129:31:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6787, - "nodeType": "ExpressionStatement", - "src": "25129:31:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6788, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6837, - "src": "25170:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 6789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25170:11:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6790, - "nodeType": "ExpressionStatement", - "src": "25170:11:6" - } - ] - }, - "documentation": null, - "id": 6792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6779, - "nodeType": "ParameterList", - "parameters": [], - "src": "25107:2:6" - }, - "returnParameters": { - "id": 6780, - "nodeType": "ParameterList", - "parameters": [], - "src": "25119:0:6" - }, - "scope": 6998, - "src": "25094:94:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6836, - "nodeType": "Block", - "src": "25268:224:6", - "statements": [ - { - "assignments": [ - 6804 - ], - "declarations": [ - { - "constant": false, - "id": 6804, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6836, - "src": "25278:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6803, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25278:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6809, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6806, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25302:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25302:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6805, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6714, - "src": "25295:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25295:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25278:35:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6810, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6804, - "src": "25327:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6811, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25336:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25327:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6835, - "nodeType": "IfStatement", - "src": "25323:163:6", - "trueBody": { - "id": 6834, - "nodeType": "Block", - "src": "25339:147:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6813, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6580, - "src": "25353:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6816, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6814, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25361:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25361:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25353:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 6817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25375:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25353:23:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6819, - "nodeType": "ExpressionStatement", - "src": "25353:23:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6823, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25407:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25407:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6825, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6804, - "src": "25419:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6820, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "25390:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6191, - "src": "25390:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$6088_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25390:36:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6827, - "nodeType": "ExpressionStatement", - "src": "25390:36:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6829, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25456:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25456:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6831, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6804, - "src": "25468:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6828, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6602, - "src": "25445:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25445:30:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6833, - "nodeType": "EmitStatement", - "src": "25440:35:6" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6837, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6795, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25235:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25235:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6797, - "modifierName": { - "argumentTypes": null, - "id": 6794, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "25222:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25222:24:6" - }, - { - "arguments": null, - "id": 6799, - "modifierName": { - "argumentTypes": null, - "id": 6798, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6885, - "src": "25247:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25247:10:6" - }, - { - "arguments": null, - "id": 6801, - "modifierName": { - "argumentTypes": null, - "id": 6800, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6897, - "src": "25258:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25258:10:6" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6793, - "nodeType": "ParameterList", - "parameters": [], - "src": "25212:2:6" - }, - "returnParameters": { - "id": 6802, - "nodeType": "ParameterList", - "parameters": [], - "src": "25268:0:6" - }, - "scope": 6998, - "src": "25194:298:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6884, - "nodeType": "Block", - "src": "25519:330:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6839, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "25533:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25533:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6841, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "25552:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25533:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6882, - "nodeType": "IfStatement", - "src": "25529:303:6", - "trueBody": { - "id": 6881, - "nodeType": "Block", - "src": "25566:266:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6843, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25580:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 6849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25616:3:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 6846, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25608:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 6844, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25593:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "25593:14:6", - "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": 6847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25593:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "25593:22:6", - "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": 6850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25593:27:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25580:40:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6852, - "nodeType": "ExpressionStatement", - "src": "25580:40:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6857, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12239, - "src": "25651:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - ], - "id": 6856, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25643:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25643:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6859, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25658:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6853, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "25634:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 6042, - "src": "25634:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 6860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25634:35:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6861, - "nodeType": "ExpressionStatement", - "src": "25634:35:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6862, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "25684:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6865, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "25712:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6863, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25697:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "25697:14:6", - "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": 6866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25697:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25684:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6868, - "nodeType": "ExpressionStatement", - "src": "25684:37:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6869, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "25735:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6873, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "25770:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6870, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "25750:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25750:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "25750:19:6", - "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": 6874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25750:29:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25735:44:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6876, - "nodeType": "ExpressionStatement", - "src": "25735:44:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6878, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25810:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6877, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6584, - "src": "25798:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25798:23:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6880, - "nodeType": "EmitStatement", - "src": "25793:28:6" - } - ] - } - }, - { - "id": 6883, - "nodeType": "PlaceholderStatement", - "src": "25841:1:6" - } - ] - }, - "documentation": null, - "id": 6885, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6838, - "nodeType": "ParameterList", - "parameters": [], - "src": "25517:2:6" - }, - "src": "25498:351:6", - "visibility": "internal" - }, - { - "body": { - "id": 6896, - "nodeType": "Block", - "src": "25875:76:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6888, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "25893:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25893:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 6890, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6562, - "src": "25911:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25893:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 6892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25921:11:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 6887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "25885:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:48:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6894, - "nodeType": "ExpressionStatement", - "src": "25885:48:6" - }, - { - "id": 6895, - "nodeType": "PlaceholderStatement", - "src": "25943:1:6" - } - ] - }, - "documentation": null, - "id": 6897, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6886, - "nodeType": "ParameterList", - "parameters": [], - "src": "25873:2:6" - }, - "src": "25854:97:6", - "visibility": "internal" - }, - { - "body": { - "id": 6996, - "nodeType": "Block", - "src": "26086:628:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6909, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26100:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26100:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6911, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "26119:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 6946, - "nodeType": "Block", - "src": "26197:197:6", - "statements": [ - { - "assignments": [ - 6922 - ], - "declarations": [ - { - "constant": false, - "id": 6922, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 6946, - "src": "26211:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6921, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26211:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6928, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6925, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26248:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26248:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6923, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "26231:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "26231:16:6", - "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": 6927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26231:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26211:53:6" - }, - { - "assignments": [ - 6930 - ], - "declarations": [ - { - "constant": false, - "id": 6930, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 6946, - "src": "26278:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6929, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26278:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6935, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6933, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "26311:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6931, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6922, - "src": "26297:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6932, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "26297:13:6", - "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": 6934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26297:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26278:44:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6936, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "26336:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6942, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "26374:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6939, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6930, - "src": "26360:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6937, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26349:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "26349:10:6", - "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": 6940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26349:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "26349:24:6", - "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": 6943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26349:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26336:47:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6945, - "nodeType": "ExpressionStatement", - "src": "26336:47:6" - } - ] - }, - "id": 6947, - "nodeType": "IfStatement", - "src": "26096:298:6", - "trueBody": { - "id": 6920, - "nodeType": "Block", - "src": "26133:58:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6913, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "26147:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6916, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "26171:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6914, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26160:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "26160:10:6", - "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": 6917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26160:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26147:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6919, - "nodeType": "ExpressionStatement", - "src": "26147:33:6" - } - ] - } - }, - { - "assignments": [ - 6949 - ], - "declarations": [ - { - "constant": false, - "id": 6949, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 6996, - "src": "26403:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6948, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26403:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6957, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6952, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "26439:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - ], - "id": 6951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26431:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26431:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6950, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6536, - "src": "26427:3:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$6536_$", - "typeString": "type(contract YAM)" - } - }, - "id": 6954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26427:17:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$6536", - "typeString": "contract YAM" - } - }, - "id": 6955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 6528, - "src": "26427:35:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 6956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26427:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26403:61:6" - }, - { - "assignments": [ - 6959 - ], - "declarations": [ - { - "constant": false, - "id": 6959, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 6996, - "src": "26474:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6958, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26474:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 6967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26525:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 6966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26529:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "26525:6:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6962, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6949, - "src": "26506:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6960, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26495:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "26495:10:6", - "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": 6963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26495:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "26495:29:6", - "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": 6968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26495:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26474:58:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6974, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12239, - "src": "26559:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - ], - "id": 6973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26551:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26551:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6976, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6959, - "src": "26566:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6970, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "26542:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 6042, - "src": "26542:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 6977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26542:35:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6978, - "nodeType": "ExpressionStatement", - "src": "26542:35:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6979, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6570, - "src": "26587:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6980, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26604:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26604:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26587:32:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6983, - "nodeType": "ExpressionStatement", - "src": "26587:32:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6984, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "26629:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6988, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "26664:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6985, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26644:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26644:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "26644:19:6", - "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": 6989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26644:29:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26629:44:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6991, - "nodeType": "ExpressionStatement", - "src": "26629:44:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6993, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26700:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6992, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6584, - "src": "26688:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26688:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6995, - "nodeType": "EmitStatement", - "src": "26683:24:6" - } - ] - }, - "documentation": null, - "id": 6997, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6902, - "modifierName": { - "argumentTypes": null, - "id": 6901, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6400, - "src": "26026:22:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26026:22:6" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26078:1:6", - "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": 6904, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26070:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26070:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6907, - "modifierName": { - "argumentTypes": null, - "id": 6903, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "26057:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26057:24:6" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6899, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6997, - "src": "25985:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25985:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25984:16:6" - }, - "returnParameters": { - "id": 6908, - "nodeType": "ParameterList", - "parameters": [], - "src": "26086:0:6" - }, - "scope": 6998, - "src": "25957:757:6", - "stateMutability": "nonpayable", - "superFunction": 6388, - "visibility": "external" - } - ], - "scope": 6999, - "src": "22626:4090:6" - } - ], - "src": "1627:25090:6" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 6162 - ], - "Context": [ - 5901 - ], - "IERC20": [ - 6088 - ], - "IRewardDistributionRecipient": [ - 6413 - ], - "LPTokenWrapper": [ - 6523 - ], - "Math": [ - 5689 - ], - "Ownable": [ - 6013 - ], - "SafeERC20": [ - 6378 - ], - "SafeMath": [ - 5875 - ], - "YAM": [ - 6536 - ], - "YAMIncentives": [ - 6998 - ] - }, - "id": 6999, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 5622, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 5689, - "linearizedBaseContracts": [ - 5689 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5638, - "nodeType": "Block", - "src": "1876:38:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5631, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5624, - "src": "1893:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5632, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5626, - "src": "1898:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5635, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5626, - "src": "1906:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:6", - "trueExpression": { - "argumentTypes": null, - "id": 5634, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5624, - "src": "1902:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5630, - "id": 5637, - "nodeType": "Return", - "src": "1886:21:6" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 5639, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5627, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5624, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5639, - "src": "1822:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5623, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5626, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5639, - "src": "1833:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5625, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:6" - }, - "returnParameters": { - "id": 5630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5629, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5639, - "src": "1867:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5628, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:6" - }, - "scope": 5689, - "src": "1809:105:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5655, - "nodeType": "Block", - "src": "2052:37:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5648, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5641, - "src": "2069:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 5649, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5643, - "src": "2073:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5652, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5643, - "src": "2081:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:6", - "trueExpression": { - "argumentTypes": null, - "id": 5651, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5641, - "src": "2077:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5647, - "id": 5654, - "nodeType": "Return", - "src": "2062:20:6" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 5656, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5641, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5656, - "src": "1998:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5640, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5643, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5656, - "src": "2009:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5642, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:6" - }, - "returnParameters": { - "id": 5647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5646, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5656, - "src": "2043:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5645, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:6" - }, - "scope": 5689, - "src": "1985:104:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5687, - "nodeType": "Block", - "src": "2273:119:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5665, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5658, - "src": "2345:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5668, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5669, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5660, - "src": "2355:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5672, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5674, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5658, - "src": "2366:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5677, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5660, - "src": "2374:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5681, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5684, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5664, - "id": 5686, - "nodeType": "Return", - "src": "2337:48:6" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 5688, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5661, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5658, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "2219:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5657, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5660, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "2230:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5659, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:6" - }, - "returnParameters": { - "id": 5664, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5663, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "2264:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5662, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:6" - }, - "scope": 5689, - "src": "2202:190:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "1726:668:6" - }, - { - "id": 5690, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 5875, - "linearizedBaseContracts": [ - 5875 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5714, - "nodeType": "Block", - "src": "3349:109:6", - "statements": [ - { - "assignments": [ - 5700 - ], - "declarations": [ - { - "constant": false, - "id": 5700, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5714, - "src": "3359:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5699, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5704, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5701, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5692, - "src": "3371:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 5702, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5694, - "src": "3375:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5706, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5700, - "src": "3394:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5707, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5692, - "src": "3399:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 5709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 5705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "3386:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5711, - "nodeType": "ExpressionStatement", - "src": "3386:46:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5712, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5700, - "src": "3450:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5698, - "id": 5713, - "nodeType": "Return", - "src": "3443:8:6" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 5715, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5695, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5692, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5715, - "src": "3295:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5694, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5715, - "src": "3306:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5693, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:6" - }, - "returnParameters": { - "id": 5698, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5697, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5715, - "src": "3340:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5696, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:6" - }, - "scope": 5875, - "src": "3282:176:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5730, - "nodeType": "Block", - "src": "3789:67:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5725, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5717, - "src": "3810:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5726, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5719, - "src": "3813:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 5727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 5724, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5731, - 5758 - ], - "referencedDeclaration": 5758, - "src": "3806:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5723, - "id": 5729, - "nodeType": "Return", - "src": "3799:50:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 5731, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5720, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5717, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5731, - "src": "3735:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5716, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5719, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5731, - "src": "3746:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5718, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:6" - }, - "returnParameters": { - "id": 5723, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5722, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5731, - "src": "3780:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5721, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:6" - }, - "scope": 5875, - "src": "3722:134:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5757, - "nodeType": "Block", - "src": "4275:92:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5743, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5735, - "src": "4293:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 5744, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5733, - "src": "4298:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5746, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5737, - "src": "4301:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5742, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "4285:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5748, - "nodeType": "ExpressionStatement", - "src": "4285:29:6" - }, - { - "assignments": [ - 5750 - ], - "declarations": [ - { - "constant": false, - "id": 5750, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5757, - "src": "4324:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5749, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5754, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5751, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5733, - "src": "4336:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 5752, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5735, - "src": "4340:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5755, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5750, - "src": "4359:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5741, - "id": 5756, - "nodeType": "Return", - "src": "4352:8:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 5758, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5738, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5733, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4193:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5732, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5735, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4204:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5734, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5737, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4215:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5736, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:6" - }, - "returnParameters": { - "id": 5741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5740, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5758, - "src": "4266:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5739, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:6" - }, - "scope": 5875, - "src": "4180:187:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5791, - "nodeType": "Block", - "src": "4674:392:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5767, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5760, - "src": "4906:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5773, - "nodeType": "IfStatement", - "src": "4902:45:6", - "trueBody": { - "id": 5772, - "nodeType": "Block", - "src": "4914:33:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5770, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5766, - "id": 5771, - "nodeType": "Return", - "src": "4928:8:6" - } - ] - } - }, - { - "assignments": [ - 5775 - ], - "declarations": [ - { - "constant": false, - "id": 5775, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5791, - "src": "4957:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5774, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5779, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5776, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5760, - "src": "4969:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 5777, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5762, - "src": "4973:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5783, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5781, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5775, - "src": "4992:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5782, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5760, - "src": "4996:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5784, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5762, - "src": "5001:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 5786, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 5780, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "4984:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5788, - "nodeType": "ExpressionStatement", - "src": "4984:56:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5789, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5775, - "src": "5058:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5766, - "id": 5790, - "nodeType": "Return", - "src": "5051:8:6" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 5792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5760, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5792, - "src": "4620:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5762, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5792, - "src": "4631:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5761, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:6" - }, - "returnParameters": { - "id": 5766, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5765, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5792, - "src": "4665:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5764, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:6" - }, - "scope": 5875, - "src": "4607:459:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5807, - "nodeType": "Block", - "src": "5588:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5802, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5794, - "src": "5609:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5803, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5796, - "src": "5612:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 5804, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 5801, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5808, - 5835 - ], - "referencedDeclaration": 5835, - "src": "5605:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5800, - "id": 5806, - "nodeType": "Return", - "src": "5598:46:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5808, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5797, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5794, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5808, - "src": "5534:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5793, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5796, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5808, - "src": "5545:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5795, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:6" - }, - "returnParameters": { - "id": 5800, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5799, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5808, - "src": "5579:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5798, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:6" - }, - "scope": 5875, - "src": "5521:130:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5834, - "nodeType": "Block", - "src": "6261:243:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5820, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5812, - "src": "6345:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5821, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5823, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5814, - "src": "6352:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5819, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "6337:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5825, - "nodeType": "ExpressionStatement", - "src": "6337:28:6" - }, - { - "assignments": [ - 5827 - ], - "declarations": [ - { - "constant": false, - "id": 5827, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5834, - "src": "6375:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5826, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5831, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5828, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5810, - "src": "6387:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5829, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5812, - "src": "6391:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5832, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5827, - "src": "6496:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5818, - "id": 5833, - "nodeType": "Return", - "src": "6489:8:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5835, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5815, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5810, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6179:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5809, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5812, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6190:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5811, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5814, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6201:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5813, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:6" - }, - "returnParameters": { - "id": 5818, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5817, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5835, - "src": "6252:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5816, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:6" - }, - "scope": 5875, - "src": "6166:338:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5850, - "nodeType": "Block", - "src": "7015:61:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5845, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5837, - "src": "7036:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5846, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5839, - "src": "7039:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 5847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 5844, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5851, - 5874 - ], - "referencedDeclaration": 5874, - "src": "7032:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5843, - "id": 5849, - "nodeType": "Return", - "src": "7025:44:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5851, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5837, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5851, - "src": "6961:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5836, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5839, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5851, - "src": "6972:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5838, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:6" - }, - "returnParameters": { - "id": 5843, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5842, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5851, - "src": "7006:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:6" - }, - "scope": 5875, - "src": "6948:128:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5873, - "nodeType": "Block", - "src": "7675:68:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5863, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5855, - "src": "7693:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5866, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5857, - "src": "7701:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5862, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "7685:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5868, - "nodeType": "ExpressionStatement", - "src": "7685:29:6" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5869, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5853, - "src": "7731:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 5870, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5855, - "src": "7735:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5861, - "id": 5872, - "nodeType": "Return", - "src": "7724:12:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5874, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5858, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5853, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7593:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5852, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5855, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7604:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5854, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5857, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7615:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5856, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:6" - }, - "returnParameters": { - "id": 5861, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5860, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5874, - "src": "7666:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5859, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:6" - }, - "scope": 5875, - "src": "7580:163:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "3037:4708:6" - }, - { - "id": 5876, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5901, - "linearizedBaseContracts": [ - 5901 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5879, - "nodeType": "Block", - "src": "8523:3:6", - "statements": [] - }, - "documentation": null, - "id": 5880, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5877, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:6" - }, - "returnParameters": { - "id": 5878, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:6" - }, - "scope": 5901, - "src": "8499:27:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5888, - "nodeType": "Block", - "src": "8647:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5885, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "8664:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 5884, - "id": 5887, - "nodeType": "Return", - "src": "8657:17:6" - } - ] - }, - "documentation": null, - "id": 5889, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5881, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:6" - }, - "returnParameters": { - "id": 5884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5883, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5889, - "src": "8630:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5882, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:6" - }, - "scope": 5901, - "src": "8585:96:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5899, - "nodeType": "Block", - "src": "8744:165:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5894, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12223, - "src": "8754:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5901", - "typeString": "contract Context" - } - }, - "id": 5895, - "nodeType": "ExpressionStatement", - "src": "8754:4:6" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5896, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "8894:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 5893, - "id": 5898, - "nodeType": "Return", - "src": "8887:15:6" - } - ] - }, - "documentation": null, - "id": 5900, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5890, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:6" - }, - "returnParameters": { - "id": 5893, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5892, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5900, - "src": "8730:12:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5891, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:6" - }, - "scope": 5901, - "src": "8687:222:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "8322:589:6" - }, - { - "id": 5902, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 5903, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5901, - "src": "9375:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5901", - "typeString": "contract Context" - } - }, - "id": 5904, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:6" - } - ], - "contractDependencies": [ - 5901 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 6013, - "linearizedBaseContracts": [ - 6013, - 5901 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 5906, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 6013, - "src": "9389:22:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5905, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 5912, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 5911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5908, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 5912, - "src": "9445:29:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5907, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5910, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5912, - "src": "9476:24:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5909, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:6" - }, - "src": "9418:84:6" - }, - { - "body": { - "id": 5927, - "nodeType": "Block", - "src": "9628:93:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5915, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "9638:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5916, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5889, - "src": "9647:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5919, - "nodeType": "ExpressionStatement", - "src": "9638:21:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:6", - "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": 5921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5923, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5924, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "9707:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5920, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5912, - "src": "9674:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5926, - "nodeType": "EmitStatement", - "src": "9669:45:6" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 5928, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5913, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:6" - }, - "returnParameters": { - "id": 5914, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:6" - }, - "scope": 6013, - "src": "9604:117:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5935, - "nodeType": "Block", - "src": "9844:30:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5933, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "9861:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 5932, - "id": 5934, - "nodeType": "Return", - "src": "9854:13:6" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 5936, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5929, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:6" - }, - "returnParameters": { - "id": 5932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5931, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5936, - "src": "9835:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5930, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:6" - }, - "scope": 6013, - "src": "9797:77:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5945, - "nodeType": "Block", - "src": "9983:82:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5939, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5957, - "src": "10001:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 5940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 5941, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 5938, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "9993:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5943, - "nodeType": "ExpressionStatement", - "src": "9993:54:6" - }, - { - "id": 5944, - "nodeType": "PlaceholderStatement", - "src": "10057:1:6" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 5946, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 5937, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:6" - }, - "src": "9962:103:6", - "visibility": "internal" - }, - { - "body": { - "id": 5956, - "nodeType": "Block", - "src": "10194:46:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5951, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5889, - "src": "10211:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5953, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "10227:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5950, - "id": 5955, - "nodeType": "Return", - "src": "10204:29:6" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 5957, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5947, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:6" - }, - "returnParameters": { - "id": 5950, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5949, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5957, - "src": "10188:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5948, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:6" - }, - "scope": 6013, - "src": "10148:92:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5975, - "nodeType": "Block", - "src": "10628:91:6", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5963, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "10664:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:6", - "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": 5964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5962, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5912, - "src": "10643:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5968, - "nodeType": "EmitStatement", - "src": "10638:45:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 5973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5969, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "10693:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5971, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:6", - "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": 5970, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5972, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5974, - "nodeType": "ExpressionStatement", - "src": "10693:19:6" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 5976, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5960, - "modifierName": { - "argumentTypes": null, - "id": 5959, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5946, - "src": "10618:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:6" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5958, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:6" - }, - "returnParameters": { - "id": 5961, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:6" - }, - "scope": 6013, - "src": "10582:137:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5987, - "nodeType": "Block", - "src": "10930:45:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5984, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5978, - "src": "10959:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5983, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6012, - "src": "10940:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5986, - "nodeType": "ExpressionStatement", - "src": "10940:28:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 5988, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5981, - "modifierName": { - "argumentTypes": null, - "id": 5980, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5946, - "src": "10920:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:6" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5979, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5978, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5988, - "src": "10895:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5977, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:6" - }, - "returnParameters": { - "id": 5982, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:6" - }, - "scope": 6013, - "src": "10868:107:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6011, - "nodeType": "Block", - "src": "11131:170:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5994, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5990, - "src": "11149:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5996, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:6", - "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": 5995, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 5999, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 5993, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "11141:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6001, - "nodeType": "ExpressionStatement", - "src": "11141:73:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6003, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "11250:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6004, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5990, - "src": "11258:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6002, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5912, - "src": "11229:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 6005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6006, - "nodeType": "EmitStatement", - "src": "11224:43:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6007, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5906, - "src": "11277:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6008, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5990, - "src": "11286:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6010, - "nodeType": "ExpressionStatement", - "src": "11277:17:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 6012, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5991, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5990, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 6012, - "src": "11104:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5989, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:6" - }, - "returnParameters": { - "id": 5992, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:6" - }, - "scope": 6013, - "src": "11076:225:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "9355:1948:6" - }, - { - "id": 6014, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 6088, - "linearizedBaseContracts": [ - 6088 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 6019, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6015, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:6" - }, - "returnParameters": { - "id": 6018, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6017, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6019, - "src": "11678:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6016, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:6" - }, - "scope": 6088, - "src": "11632:55:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 6026, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6021, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6026, - "src": "11789:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6020, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:6" - }, - "returnParameters": { - "id": 6025, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6024, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6026, - "src": "11829:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6023, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:6" - }, - "scope": 6088, - "src": "11770:68:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 6035, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6031, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6028, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 6035, - "src": "12076:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6027, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6030, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6035, - "src": "12095:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6029, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:6" - }, - "returnParameters": { - "id": 6034, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6033, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6035, - "src": "12129:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6032, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:6" - }, - "scope": 6088, - "src": "12058:77:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 6042, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6037, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6042, - "src": "12154:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6036, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6039, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6042, - "src": "12171:11:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6038, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:6" - }, - "returnParameters": { - "id": 6041, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:6" - }, - "scope": 6088, - "src": "12140:53:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 6051, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6047, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6044, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 6051, - "src": "12487:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6043, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6046, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6051, - "src": "12502:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6045, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:6" - }, - "returnParameters": { - "id": 6050, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6049, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6051, - "src": "12542:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6048, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:6" - }, - "scope": 6088, - "src": "12468:83:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 6060, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6056, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6053, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "13221:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6052, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6055, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "13238:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6054, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:6" - }, - "returnParameters": { - "id": 6059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6058, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "13272:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6057, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:6" - }, - "scope": 6088, - "src": "13204:74:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 6071, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6067, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6062, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13607:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6061, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6064, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13623:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6063, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6066, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13642:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6065, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:6" - }, - "returnParameters": { - "id": 6070, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6069, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6071, - "src": "13676:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6068, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:6" - }, - "scope": 6088, - "src": "13585:97:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 6079, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 6078, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6073, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 6079, - "src": "13866:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6072, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6075, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6079, - "src": "13888:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6074, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6077, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6079, - "src": "13908:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6076, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:6" - }, - "src": "13851:72:6" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 6087, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 6086, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6081, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 6087, - "src": "14097:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6080, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6083, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6087, - "src": "14120:23:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6082, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6085, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6087, - "src": "14145:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6084, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:6" - }, - "src": "14082:78:6" - } - ], - "scope": 6999, - "src": "11538:2624:6" - }, - { - "id": 6089, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 6162, - "linearizedBaseContracts": [ - 6162 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6113, - "nodeType": "Block", - "src": "14839:731:6", - "statements": [ - { - "assignments": [ - 6097 - ], - "declarations": [ - { - "constant": false, - "id": 6097, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 6113, - "src": "15278:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 6096, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6098, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:6" - }, - { - "assignments": [ - 6100 - ], - "declarations": [ - { - "constant": false, - "id": 6100, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 6113, - "src": "15304:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 6099, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6102, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 6101, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:6" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 6097, - "isOffset": false, - "isSlot": false, - "src": "15469:8:6", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 6091, - "isOffset": false, - "isSlot": false, - "src": "15493:7:6", - "valueSize": 1 - } - } - ], - "id": 6103, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:6" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 6110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 6106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6104, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6097, - "src": "15520:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 6105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 6109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6107, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6097, - "src": "15539:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 6108, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "15551:11:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 6111, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 6095, - "id": 6112, - "nodeType": "Return", - "src": "15512:51:6" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 6114, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6091, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6114, - "src": "14793:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6090, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:6" - }, - "returnParameters": { - "id": 6095, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6094, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6114, - "src": "14833:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6093, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:6" - }, - "scope": 6162, - "src": "14773:797:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6127, - "nodeType": "Block", - "src": "15855:49:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6123, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6116, - "src": "15888:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 6124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 6121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 6120, - "id": 6126, - "nodeType": "Return", - "src": "15865:32:6" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 6128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6116, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6128, - "src": "15798:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6115, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:6" - }, - "returnParameters": { - "id": 6120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6119, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6128, - "src": "15838:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 6118, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:6" - }, - "scope": 6162, - "src": "15779:125:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6160, - "nodeType": "Block", - "src": "16932:294:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6137, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12229, - "src": "16958:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$6162", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$6162", - "typeString": "library Address" - } - ], - "id": 6136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6140, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6132, - "src": "16975:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 6142, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 6135, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "16942:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6144, - "nodeType": "ExpressionStatement", - "src": "16942:73:6" - }, - { - "assignments": [ - 6146, - null - ], - "declarations": [ - { - "constant": false, - "id": 6146, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 6160, - "src": "17081:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6145, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 6154, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 6152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 6150, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6132, - "src": "17120:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6147, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "17099:9:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 6148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:6", - "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": 6149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 6151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:6", - "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": 6153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6156, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6146, - "src": "17149:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 6157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 6155, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "17141:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6159, - "nodeType": "ExpressionStatement", - "src": "17141:78:6" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 6161, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6133, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6130, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 6161, - "src": "16880:25:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 6129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6132, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6161, - "src": "16907:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:6" - }, - "returnParameters": { - "id": 6134, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:6" - }, - "scope": 6162, - "src": "16861:365:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6999, - "src": "14309:2919:6" - }, - { - "id": 6163, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 6378, - "linearizedBaseContracts": [ - 6378 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6166, - "libraryName": { - "contractScope": null, - "id": 6164, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5875, - "src": "17805:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5875", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:6", - "typeName": { - "id": 6165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 6169, - "libraryName": { - "contractScope": null, - "id": 6167, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6162, - "src": "17837:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$6162", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:6", - "typeName": { - "id": 6168, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 6190, - "nodeType": "Block", - "src": "17935:102:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6179, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6171, - "src": "17964:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6182, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6171, - "src": "17994:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6035, - "src": "17994:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6185, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6173, - "src": "18019:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6186, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6175, - "src": "18023:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6180, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "17971:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6178, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "17945:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6189, - "nodeType": "ExpressionStatement", - "src": "17945:85:6" - } - ] - }, - "documentation": null, - "id": 6191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6171, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6191, - "src": "17885:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6170, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "17885:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6173, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6191, - "src": "17899:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6172, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6175, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6191, - "src": "17911:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:6" - }, - "returnParameters": { - "id": 6177, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:6" - }, - "scope": 6378, - "src": "17863:174:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6215, - "nodeType": "Block", - "src": "18133:112:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6203, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6193, - "src": "18162:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6206, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6193, - "src": "18192:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 6071, - "src": "18192:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 6208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6209, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6195, - "src": "18221:4:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6210, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6197, - "src": "18227:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6211, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6199, - "src": "18231:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6204, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "18169:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6202, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "18143:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6214, - "nodeType": "ExpressionStatement", - "src": "18143:95:6" - } - ] - }, - "documentation": null, - "id": 6216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6193, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18069:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6192, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "18069:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6195, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18083:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6197, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18097:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6199, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6216, - "src": "18109:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6198, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:6" - }, - "returnParameters": { - "id": 6201, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:6" - }, - "scope": 6378, - "src": "18043:202:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6256, - "nodeType": "Block", - "src": "18327:536:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 6240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6226, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6222, - "src": "18616:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6227, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 6229, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6233, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12231, - "src": "18656:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - ], - "id": 6232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6235, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6220, - "src": "18663:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6230, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6218, - "src": "18632:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 6051, - "src": "18632:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 6239, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 6241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 6225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "18607:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6243, - "nodeType": "ExpressionStatement", - "src": "18607:150:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6245, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6218, - "src": "18786:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6248, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6218, - "src": "18816:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 6060, - "src": "18816:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6251, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6220, - "src": "18840:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6252, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6222, - "src": "18849:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6246, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "18793:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6247, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6244, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "18767:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6255, - "nodeType": "ExpressionStatement", - "src": "18767:89:6" - } - ] - }, - "documentation": null, - "id": 6257, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6223, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6218, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "18272:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6217, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "18272:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6220, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "18286:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6219, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6222, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "18303:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:6" - }, - "returnParameters": { - "id": 6224, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:6" - }, - "scope": 6378, - "src": "18251:612:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6291, - "nodeType": "Block", - "src": "18955:196:6", - "statements": [ - { - "assignments": [ - 6267 - ], - "declarations": [ - { - "constant": false, - "id": 6267, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 6291, - "src": "18965:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6266, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6278, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6276, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6263, - "src": "19032:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6271, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12231, - "src": "19012:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - ], - "id": 6270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6273, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6261, - "src": "19019:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6268, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "18988:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 6051, - "src": "18988:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "18988:43:6", - "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": 6277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6280, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "19067:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6283, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "19097:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 6060, - "src": "19097:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6286, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6261, - "src": "19121:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6287, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6267, - "src": "19130:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6281, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "19074:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6282, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6279, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "19048:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6290, - "nodeType": "ExpressionStatement", - "src": "19048:96:6" - } - ] - }, - "documentation": null, - "id": 6292, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6259, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6292, - "src": "18900:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6258, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "18900:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6261, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6292, - "src": "18914:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6260, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6263, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6292, - "src": "18931:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:6" - }, - "returnParameters": { - "id": 6265, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:6" - }, - "scope": 6378, - "src": "18869:282:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6327, - "nodeType": "Block", - "src": "19243:241:6", - "statements": [ - { - "assignments": [ - 6302 - ], - "declarations": [ - { - "constant": false, - "id": 6302, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 6327, - "src": "19253:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6314, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6311, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6298, - "src": "19320:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 6312, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6306, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12231, - "src": "19300:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - ], - "id": 6305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6308, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6296, - "src": "19307:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6303, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6294, - "src": "19276:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 6051, - "src": "19276:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5758, - "src": "19276:43:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6316, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6294, - "src": "19400:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6319, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6294, - "src": "19430:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 6060, - "src": "19430:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6322, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6296, - "src": "19454:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6323, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6302, - "src": "19463:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6317, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "19407:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6315, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "19381:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6326, - "nodeType": "ExpressionStatement", - "src": "19381:96:6" - } - ] - }, - "documentation": null, - "id": 6328, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6299, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6294, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6328, - "src": "19188:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6293, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "19188:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6296, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6328, - "src": "19202:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6298, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6328, - "src": "19219:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6297, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:6" - }, - "returnParameters": { - "id": 6300, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:6" - }, - "scope": 6378, - "src": "19157:327:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6376, - "nodeType": "Block", - "src": "19936:1026:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6337, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6330, - "src": "20470:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - ], - "id": 6336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 6114, - "src": "20462:25:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 6340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 6341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 6335, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "20454:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6343, - "nodeType": "ExpressionStatement", - "src": "20454:71:6" - }, - { - "assignments": [ - 6345, - 6347 - ], - "declarations": [ - { - "constant": false, - "id": 6345, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 6376, - "src": "20596:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6344, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6347, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 6376, - "src": "20610:23:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6346, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6354, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6352, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6332, - "src": "20657:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6349, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6330, - "src": "20645:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - ], - "id": 6348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:6", - "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": 6353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6356, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6345, - "src": "20680:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 6357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 6355, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "20672:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6359, - "nodeType": "ExpressionStatement", - "src": "20672:52:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6360, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6347, - "src": "20739:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 6361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6375, - "nodeType": "IfStatement", - "src": "20735:221:6", - "trueBody": { - "id": 6374, - "nodeType": "Block", - "src": "20762:194:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6367, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6347, - "src": "20879:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 6368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 6369, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 6365, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12170, - "src": "20868:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 6370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 6371, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 6364, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "20860:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6373, - "nodeType": "ExpressionStatement", - "src": "20860:85:6" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 6377, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6333, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6330, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6377, - "src": "19895:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6329, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "19895:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6332, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6377, - "src": "19909:17:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6331, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:6" - }, - "returnParameters": { - "id": 6334, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:6" - }, - "scope": 6378, - "src": "19867:1095:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 6999, - "src": "17775:3189:6" - }, - { - "id": 6379, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6380, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6013, - "src": "21087:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$6013", - "typeString": "contract Ownable" - } - }, - "id": 6381, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:6" - } - ], - "contractDependencies": [ - 5901, - 6013 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 6413, - "linearizedBaseContracts": [ - 6413, - 6013, - 5901 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6383, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6413, - "src": "21101:26:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6382, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 6388, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6386, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6385, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6388, - "src": "21162:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:6" - }, - "returnParameters": { - "id": 6387, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:6" - }, - "scope": 6413, - "src": "21134:53:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6399, - "nodeType": "Block", - "src": "21227:108:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6391, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5889, - "src": "21245:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6393, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6383, - "src": "21261:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 6395, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 6390, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "21237:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6397, - "nodeType": "ExpressionStatement", - "src": "21237:80:6" - }, - { - "id": 6398, - "nodeType": "PlaceholderStatement", - "src": "21327:1:6" - } - ] - }, - "documentation": null, - "id": 6400, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6389, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:6" - }, - "src": "21193:142:6", - "visibility": "internal" - }, - { - "body": { - "id": 6411, - "nodeType": "Block", - "src": "21440:57:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6407, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6383, - "src": "21450:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6408, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6402, - "src": "21471:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6410, - "nodeType": "ExpressionStatement", - "src": "21450:40:6" - } - ] - }, - "documentation": null, - "id": 6412, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6405, - "modifierName": { - "argumentTypes": null, - "id": 6404, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5946, - "src": "21426:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:6" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6403, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6402, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6412, - "src": "21372:27:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6401, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:6" - }, - "returnParameters": { - "id": 6406, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:6" - }, - "scope": 6413, - "src": "21341:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6999, - "src": "21046:453:6" - }, - { - "id": 6414, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6523, - "linearizedBaseContracts": [ - 6523 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6417, - "libraryName": { - "contractScope": null, - "id": 6415, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5875, - "src": "21604:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5875", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:6", - "typeName": { - "id": 6416, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 6420, - "libraryName": { - "contractScope": null, - "id": 6418, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6378, - "src": "21636:9:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6378", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:6", - "typeName": { - "contractScope": null, - "id": 6419, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "21650:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 6425, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 6523, - "src": "21663:73:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6421, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "21663:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 6423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6422, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6088, - "src": "21686:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6088_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6427, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 6523, - "src": "21743:28:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 6431, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 6523, - "src": "21777:45:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6430, - "keyType": { - "id": 6428, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21785:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21777:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21796:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 6438, - "nodeType": "Block", - "src": "21882:36:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6436, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "21899:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6435, - "id": 6437, - "nodeType": "Return", - "src": "21892:19:6" - } - ] - }, - "documentation": null, - "id": 6439, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6432, - "nodeType": "ParameterList", - "parameters": [], - "src": "21849:2:6" - }, - "returnParameters": { - "id": 6435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6439, - "src": "21873:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21873:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21872:9:6" - }, - "scope": 6523, - "src": "21829:89:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6450, - "nodeType": "Block", - "src": "21990:42:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6446, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22007:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6448, - "indexExpression": { - "argumentTypes": null, - "id": 6447, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6441, - "src": "22017:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22007:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6445, - "id": 6449, - "nodeType": "Return", - "src": "22000:25:6" - } - ] - }, - "documentation": null, - "id": 6451, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6441, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6451, - "src": "21943:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6440, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21943:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21942:17:6" - }, - "returnParameters": { - "id": 6445, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6444, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6451, - "src": "21981:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6443, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21981:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21980:9:6" - }, - "scope": 6523, - "src": "21924:108:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6487, - "nodeType": "Block", - "src": "22076:191:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6456, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22086:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6459, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6453, - "src": "22118:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6457, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22101:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "22101:16:6", - "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": 6460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22101:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22086:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6462, - "nodeType": "ExpressionStatement", - "src": "22086:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6463, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22135:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6466, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6464, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22145:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22145:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22135:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6472, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6453, - "src": "22185:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6467, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22159:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6470, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6468, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22169:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22169:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22159:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "22159:25:6", - "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": 6473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22159:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22135:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6475, - "nodeType": "ExpressionStatement", - "src": "22135:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6479, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22226:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22226:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6482, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12235, - "src": "22246:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6523", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6523", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 6481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22238:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6484, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6453, - "src": "22253:6:6", - "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, - "id": 6476, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6425, - "src": "22202:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 6216, - "src": "22202:23:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$6088_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 6485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22202:58:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6486, - "nodeType": "ExpressionStatement", - "src": "22202:58:6" - } - ] - }, - "documentation": null, - "id": 6488, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6454, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6453, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6488, - "src": "22053:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6452, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22053:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22052:16:6" - }, - "returnParameters": { - "id": 6455, - "nodeType": "ParameterList", - "parameters": [], - "src": "22076:0:6" - }, - "scope": 6523, - "src": "22038:229:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6521, - "nodeType": "Block", - "src": "22314:172:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6493, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22324:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6496, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6490, - "src": "22356:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6494, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6427, - "src": "22339:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "22339:16:6", - "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": 6497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22339:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22324:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6499, - "nodeType": "ExpressionStatement", - "src": "22324:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6500, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22373:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6503, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6501, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22383:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22383:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22373:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6509, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6490, - "src": "22423:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6504, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6431, - "src": "22397:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6507, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6505, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22407:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22407:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22397:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "22397:25:6", - "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": 6510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22397:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22373:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6512, - "nodeType": "ExpressionStatement", - "src": "22373:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6516, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "22460:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22460:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6518, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6490, - "src": "22472:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6513, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6425, - "src": "22440:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6191, - "src": "22440:19:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$6088_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22440:39:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6520, - "nodeType": "ExpressionStatement", - "src": "22440:39:6" - } - ] - }, - "documentation": null, - "id": 6522, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6491, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6490, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6522, - "src": "22291:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6489, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22291:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22290:16:6" - }, - "returnParameters": { - "id": 6492, - "nodeType": "ParameterList", - "parameters": [], - "src": "22314:0:6" - }, - "scope": 6523, - "src": "22273:213:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 6999, - "src": "21568:920:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 6536, - "linearizedBaseContracts": [ - 6536 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 6528, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6524, - "nodeType": "ParameterList", - "parameters": [], - "src": "22536:2:6" - }, - "returnParameters": { - "id": 6527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6526, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6528, - "src": "22557:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6525, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22557:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22556:9:6" - }, - "scope": 6536, - "src": "22510:56:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 6535, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6533, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6530, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 6535, - "src": "22585:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22585:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6532, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6535, - "src": "22597:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6531, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22597:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22584:28:6" - }, - "returnParameters": { - "id": 6534, - "nodeType": "ParameterList", - "parameters": [], - "src": "22621:0:6" - }, - "scope": 6536, - "src": "22571:51:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6999, - "src": "22490:134:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6537, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6523, - "src": "22652:14:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6523", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 6538, - "nodeType": "InheritanceSpecifier", - "src": "22652:14:6" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6539, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6413, - "src": "22668:28:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$6413", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 6540, - "nodeType": "InheritanceSpecifier", - "src": "22668:28:6" - } - ], - "contractDependencies": [ - 5901, - 6013, - 6413, - 6523 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6998, - "linearizedBaseContracts": [ - 6998, - 6413, - 6013, - 5901, - 6523 - ], - "name": "YAMIncentives", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6545, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22703:70:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6541, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6088, - "src": "22703:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 6543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22730:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6542, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6088, - "src": "22723:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6088_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6544, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22723:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 6548, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22779:41:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22779:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "37", - "id": 6547, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22814:6:6", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_604800_by_1", - "typeString": "int_const 604800" - }, - "value": "7" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6559, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22827:46:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6549, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22827:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_2000000000000000000000000_by_1", - "typeString": "int_const 2000000000000000000000000" - }, - "id": 6558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_2000000_by_1", - "typeString": "int_const 2000000" - }, - "id": 6554, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22855:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000_by_1", - "typeString": "int_const 1000000" - }, - "id": 6553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22859:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "36", - "id": 6552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_6_by_1", - "typeString": "int_const 6" - }, - "value": "6" - }, - "src": "22859:5:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000_by_1", - "typeString": "int_const 1000000" - } - }, - "src": "22855:9:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_2000000_by_1", - "typeString": "int_const 2000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 6557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 6556, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22867:6:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22855:18:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_2000000000000000000000000_by_1", - "typeString": "int_const 2000000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6562, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22885:37:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6560, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22885:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353936393331323030", - "id": 6561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22912:10:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6565, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "22966:31:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6563, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22966:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6564, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22996:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6568, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23003:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23031:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6570, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23038:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6569, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23038:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6572, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23073:35:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23073:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6576, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23114:57:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6575, - "keyType": { - "id": 6573, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23122:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23114:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6574, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23133:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6580, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 6998, - "src": "23177:42:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6579, - "keyType": { - "id": 6577, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23185:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23177:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23196:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6584, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 6583, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6582, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6584, - "src": "23244:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6581, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23244:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23243:16:6" - }, - "src": "23226:34:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 6590, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 6589, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6586, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6590, - "src": "23278:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6585, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23278:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6588, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6590, - "src": "23300:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6587, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23300:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23277:38:6" - }, - "src": "23265:51:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 6596, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 6595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6592, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6596, - "src": "23337:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23337:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6594, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6596, - "src": "23359:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6593, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23359:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23336:38:6" - }, - "src": "23321:54:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 6602, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 6601, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6598, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6602, - "src": "23397:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6597, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23397:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6600, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6602, - "src": "23419:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23419:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23396:38:6" - }, - "src": "23380:55:6" - }, - { - "body": { - "id": 6638, - "nodeType": "Block", - "src": "23480:283:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6606, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "23490:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6607, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6685, - "src": "23513:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23513:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23490:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6610, - "nodeType": "ExpressionStatement", - "src": "23490:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6611, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6570, - "src": "23539:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6612, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6652, - "src": "23556:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23556:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23539:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6615, - "nodeType": "ExpressionStatement", - "src": "23539:43:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6616, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23596:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6618, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23615:1:6", - "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": 6617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23607:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23607:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23596:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6636, - "nodeType": "IfStatement", - "src": "23592:154:6", - "trueBody": { - "id": 6635, - "nodeType": "Block", - "src": "23619:127:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6621, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6580, - "src": "23633:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6623, - "indexExpression": { - "argumentTypes": null, - "id": 6622, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23641:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23633:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6625, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23659:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6624, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6714, - "src": "23652:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23652:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23633:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6628, - "nodeType": "ExpressionStatement", - "src": "23633:34:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6629, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6576, - "src": "23681:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6631, - "indexExpression": { - "argumentTypes": null, - "id": 6630, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6604, - "src": "23704:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23681:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6632, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "23715:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23681:54:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6634, - "nodeType": "ExpressionStatement", - "src": "23681:54:6" - } - ] - } - }, - { - "id": 6637, - "nodeType": "PlaceholderStatement", - "src": "23755:1:6" - } - ] - }, - "documentation": null, - "id": 6639, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6604, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6639, - "src": "23463:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23463:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23462:17:6" - }, - "src": "23441:322:6", - "visibility": "internal" - }, - { - "body": { - "id": 6651, - "nodeType": "Block", - "src": "23835:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "23861:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23861:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6648, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "23878:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6644, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5689, - "src": "23852:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$5689_$", - "typeString": "type(library Math)" - } - }, - "id": 6645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 5656, - "src": "23852:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 6649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23852:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6643, - "id": 6650, - "nodeType": "Return", - "src": "23845:46:6" - } - ] - }, - "documentation": null, - "id": 6652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6640, - "nodeType": "ParameterList", - "parameters": [], - "src": "23802:2:6" - }, - "returnParameters": { - "id": 6643, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6642, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6652, - "src": "23826:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6641, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23826:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23825:9:6" - }, - "scope": 6998, - "src": "23769:129:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6684, - "nodeType": "Block", - "src": "23960:352:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6657, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6439, - "src": "23974:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23974:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23991:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23974:18:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6664, - "nodeType": "IfStatement", - "src": "23970:76:6", - "trueBody": { - "id": 6663, - "nodeType": "Block", - "src": "23994:52:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6661, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "24015:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6656, - "id": 6662, - "nodeType": "Return", - "src": "24008:27:6" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6679, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6439, - "src": "24277:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24277:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24246:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6673, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "24209:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6670, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6570, - "src": "24168:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6667, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6652, - "src": "24116:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "24116:51:6", - "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": 6671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:67:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "24116:92:6", - "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": 6674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:104:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "24116:129:6", - "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": 6677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:135:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "24116:160:6", - "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": 6681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24116:175:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6665, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6572, - "src": "24074:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "24074:24:6", - "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": 6682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24074:231:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6656, - "id": 6683, - "nodeType": "Return", - "src": "24055:250:6" - } - ] - }, - "documentation": null, - "id": 6685, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6653, - "nodeType": "ParameterList", - "parameters": [], - "src": "23927:2:6" - }, - "returnParameters": { - "id": 6656, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6655, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6685, - "src": "23951:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6654, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23951:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23950:9:6" - }, - "scope": 6998, - "src": "23904:408:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6713, - "nodeType": "Block", - "src": "24381:196:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6708, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6580, - "src": "24553:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6710, - "indexExpression": { - "argumentTypes": null, - "id": 6709, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6687, - "src": "24561:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24553:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6705, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24526:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6699, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6576, - "src": "24471:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6701, - "indexExpression": { - "argumentTypes": null, - "id": 6700, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6687, - "src": "24494:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24471:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6696, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6685, - "src": "24450:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24450:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "24450:20:6", - "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": 6702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24450:53:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6693, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6687, - "src": "24420:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6692, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6451, - "src": "24410:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "24410:39:6", - "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": 6703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:94:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "24410:115:6", - "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": 6706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:121:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "24410:142:6", - "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": 6711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24410:160:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6691, - "id": 6712, - "nodeType": "Return", - "src": "24391:179:6" - } - ] - }, - "documentation": null, - "id": 6714, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6687, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6714, - "src": "24334:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24334:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24333:17:6" - }, - "returnParameters": { - "id": 6691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6690, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6714, - "src": "24372:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6689, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24372:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24371:9:6" - }, - "scope": 6998, - "src": "24318:259:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6746, - "nodeType": "Block", - "src": "24749:124:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6728, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6716, - "src": "24767:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6729, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24776:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24767:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 6731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24779:16:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 6727, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "24759:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24759:37:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6733, - "nodeType": "ExpressionStatement", - "src": "24759:37:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6737, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6716, - "src": "24818:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6734, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12240, - "src": "24806:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentives_$6998", - "typeString": "contract super YAMIncentives" - } - }, - "id": 6736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 6488, - "src": "24806:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24806:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6739, - "nodeType": "ExpressionStatement", - "src": "24806:19:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6741, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "24847:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24847:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6743, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6716, - "src": "24859:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6740, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6590, - "src": "24840:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24840:26:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6745, - "nodeType": "EmitStatement", - "src": "24835:31:6" - } - ] - }, - "documentation": null, - "id": 6747, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6719, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "24716:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24716:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6721, - "modifierName": { - "argumentTypes": null, - "id": 6718, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "24703:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24703:24:6" - }, - { - "arguments": null, - "id": 6723, - "modifierName": { - "argumentTypes": null, - "id": 6722, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6885, - "src": "24728:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24728:10:6" - }, - { - "arguments": null, - "id": 6725, - "modifierName": { - "argumentTypes": null, - "id": 6724, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6897, - "src": "24739:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24739:10:6" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6717, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6716, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6747, - "src": "24680:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6715, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24680:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24679:16:6" - }, - "returnParameters": { - "id": 6726, - "nodeType": "ParameterList", - "parameters": [], - "src": "24749:0:6" - }, - "scope": 6998, - "src": "24665:208:6", - "stateMutability": "nonpayable", - "superFunction": 6488, - "visibility": "public" - }, - { - "body": { - "id": 6777, - "nodeType": "Block", - "src": "24955:133:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6759, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6749, - "src": "24973:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6760, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24982:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24973:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 6762, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24985:19:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 6758, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "24965:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24965:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6764, - "nodeType": "ExpressionStatement", - "src": "24965:40:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6768, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6749, - "src": "25030:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6765, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12240, - "src": "25015:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentives_$6998", - "typeString": "contract super YAMIncentives" - } - }, - "id": 6767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 6522, - "src": "25015:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25015:22:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6770, - "nodeType": "ExpressionStatement", - "src": "25015:22:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6772, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25062:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25062:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6774, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6749, - "src": "25074:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6771, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6596, - "src": "25052:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25052:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6776, - "nodeType": "EmitStatement", - "src": "25047:34:6" - } - ] - }, - "documentation": null, - "id": 6778, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6752, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "24933:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24933:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6754, - "modifierName": { - "argumentTypes": null, - "id": 6751, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "24920:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24920:24:6" - }, - { - "arguments": null, - "id": 6756, - "modifierName": { - "argumentTypes": null, - "id": 6755, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6897, - "src": "24945:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24945:10:6" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6749, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6778, - "src": "24897:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24897:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24896:16:6" - }, - "returnParameters": { - "id": 6757, - "nodeType": "ParameterList", - "parameters": [], - "src": "24955:0:6" - }, - "scope": 6998, - "src": "24879:209:6", - "stateMutability": "nonpayable", - "superFunction": 6522, - "visibility": "public" - }, - { - "body": { - "id": 6791, - "nodeType": "Block", - "src": "25119:69:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6783, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25148:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25148:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6782, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6451, - "src": "25138:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25138:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6781, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6778 - ], - "referencedDeclaration": 6778, - "src": "25129:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25129:31:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6787, - "nodeType": "ExpressionStatement", - "src": "25129:31:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6788, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6837, - "src": "25170:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 6789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25170:11:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6790, - "nodeType": "ExpressionStatement", - "src": "25170:11:6" - } - ] - }, - "documentation": null, - "id": 6792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6779, - "nodeType": "ParameterList", - "parameters": [], - "src": "25107:2:6" - }, - "returnParameters": { - "id": 6780, - "nodeType": "ParameterList", - "parameters": [], - "src": "25119:0:6" - }, - "scope": 6998, - "src": "25094:94:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6836, - "nodeType": "Block", - "src": "25268:224:6", - "statements": [ - { - "assignments": [ - 6804 - ], - "declarations": [ - { - "constant": false, - "id": 6804, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6836, - "src": "25278:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6803, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25278:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6809, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6806, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25302:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25302:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6805, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6714, - "src": "25295:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25295:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25278:35:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6810, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6804, - "src": "25327:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6811, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25336:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25327:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6835, - "nodeType": "IfStatement", - "src": "25323:163:6", - "trueBody": { - "id": 6834, - "nodeType": "Block", - "src": "25339:147:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6813, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6580, - "src": "25353:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6816, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6814, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25361:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25361:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25353:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 6817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25375:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25353:23:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6819, - "nodeType": "ExpressionStatement", - "src": "25353:23:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6823, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25407:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25407:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6825, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6804, - "src": "25419:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6820, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "25390:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6191, - "src": "25390:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6088_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$6088_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25390:36:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6827, - "nodeType": "ExpressionStatement", - "src": "25390:36:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6829, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25456:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25456:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6831, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6804, - "src": "25468:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6828, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6602, - "src": "25445:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25445:30:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6833, - "nodeType": "EmitStatement", - "src": "25440:35:6" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6837, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6795, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12183, - "src": "25235:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25235:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6797, - "modifierName": { - "argumentTypes": null, - "id": 6794, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "25222:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25222:24:6" - }, - { - "arguments": null, - "id": 6799, - "modifierName": { - "argumentTypes": null, - "id": 6798, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6885, - "src": "25247:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25247:10:6" - }, - { - "arguments": null, - "id": 6801, - "modifierName": { - "argumentTypes": null, - "id": 6800, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6897, - "src": "25258:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25258:10:6" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6793, - "nodeType": "ParameterList", - "parameters": [], - "src": "25212:2:6" - }, - "returnParameters": { - "id": 6802, - "nodeType": "ParameterList", - "parameters": [], - "src": "25268:0:6" - }, - "scope": 6998, - "src": "25194:298:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6884, - "nodeType": "Block", - "src": "25519:330:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6839, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "25533:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25533:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6841, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "25552:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25533:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6882, - "nodeType": "IfStatement", - "src": "25529:303:6", - "trueBody": { - "id": 6881, - "nodeType": "Block", - "src": "25566:266:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6843, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25580:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 6849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25616:3:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 6846, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25608:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 6844, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25593:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "25593:14:6", - "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": 6847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25593:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "25593:22:6", - "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": 6850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25593:27:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25580:40:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6852, - "nodeType": "ExpressionStatement", - "src": "25580:40:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6857, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12239, - "src": "25651:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - ], - "id": 6856, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25643:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25643:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6859, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25658:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6853, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "25634:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 6042, - "src": "25634:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 6860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25634:35:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6861, - "nodeType": "ExpressionStatement", - "src": "25634:35:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6862, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "25684:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6865, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "25712:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6863, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25697:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "25697:14:6", - "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": 6866, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25697:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25684:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6868, - "nodeType": "ExpressionStatement", - "src": "25684:37:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6869, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "25735:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6873, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "25770:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6870, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "25750:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25750:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "25750:19:6", - "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": 6874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25750:29:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25735:44:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6876, - "nodeType": "ExpressionStatement", - "src": "25735:44:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6878, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6559, - "src": "25810:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6877, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6584, - "src": "25798:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25798:23:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6880, - "nodeType": "EmitStatement", - "src": "25793:28:6" - } - ] - } - }, - { - "id": 6883, - "nodeType": "PlaceholderStatement", - "src": "25841:1:6" - } - ] - }, - "documentation": null, - "id": 6885, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6838, - "nodeType": "ParameterList", - "parameters": [], - "src": "25517:2:6" - }, - "src": "25498:351:6", - "visibility": "internal" - }, - { - "body": { - "id": 6896, - "nodeType": "Block", - "src": "25875:76:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6888, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "25893:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25893:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 6890, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6562, - "src": "25911:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25893:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 6892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25921:11:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 6887, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12186, - 12187 - ], - "referencedDeclaration": 12187, - "src": "25885:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:48:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6894, - "nodeType": "ExpressionStatement", - "src": "25885:48:6" - }, - { - "id": 6895, - "nodeType": "PlaceholderStatement", - "src": "25943:1:6" - } - ] - }, - "documentation": null, - "id": 6897, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6886, - "nodeType": "ParameterList", - "parameters": [], - "src": "25873:2:6" - }, - "src": "25854:97:6", - "visibility": "internal" - }, - { - "body": { - "id": 6996, - "nodeType": "Block", - "src": "26086:628:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6912, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6909, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26100:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26100:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6911, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "26119:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 6946, - "nodeType": "Block", - "src": "26197:197:6", - "statements": [ - { - "assignments": [ - 6922 - ], - "declarations": [ - { - "constant": false, - "id": 6922, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 6946, - "src": "26211:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6921, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26211:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6928, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6925, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26248:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26248:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6923, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "26231:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5731, - "src": "26231:16:6", - "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": 6927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26231:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26211:53:6" - }, - { - "assignments": [ - 6930 - ], - "declarations": [ - { - "constant": false, - "id": 6930, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 6946, - "src": "26278:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6929, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26278:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6935, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6933, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "26311:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6931, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6922, - "src": "26297:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6932, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "26297:13:6", - "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": 6934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26297:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26278:44:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6936, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "26336:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6942, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "26374:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6939, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6930, - "src": "26360:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6937, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26349:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "26349:10:6", - "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": 6940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26349:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "26349:24:6", - "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": 6943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26349:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26336:47:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6945, - "nodeType": "ExpressionStatement", - "src": "26336:47:6" - } - ] - }, - "id": 6947, - "nodeType": "IfStatement", - "src": "26096:298:6", - "trueBody": { - "id": 6920, - "nodeType": "Block", - "src": "26133:58:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6913, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6568, - "src": "26147:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6916, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "26171:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6914, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26160:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "26160:10:6", - "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": 6917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26160:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26147:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6919, - "nodeType": "ExpressionStatement", - "src": "26147:33:6" - } - ] - } - }, - { - "assignments": [ - 6949 - ], - "declarations": [ - { - "constant": false, - "id": 6949, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 6996, - "src": "26403:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6948, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26403:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6957, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6952, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "26439:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - ], - "id": 6951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26431:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26431:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6950, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6536, - "src": "26427:3:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$6536_$", - "typeString": "type(contract YAM)" - } - }, - "id": 6954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26427:17:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$6536", - "typeString": "contract YAM" - } - }, - "id": 6955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 6528, - "src": "26427:35:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 6956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26427:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26403:61:6" - }, - { - "assignments": [ - 6959 - ], - "declarations": [ - { - "constant": false, - "id": 6959, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 6996, - "src": "26474:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6958, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26474:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 6967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26525:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 6966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26529:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "26525:6:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6962, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6949, - "src": "26506:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6960, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26495:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5792, - "src": "26495:10:6", - "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": 6963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26495:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5808, - "src": "26495:29:6", - "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": 6968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26495:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26474:58:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6974, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12239, - "src": "26559:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentives_$6998", - "typeString": "contract YAMIncentives" - } - ], - "id": 6973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26551:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26551:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6976, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6959, - "src": "26566:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6970, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6545, - "src": "26542:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6088", - "typeString": "contract IERC20" - } - }, - "id": 6972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 6042, - "src": "26542:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 6977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26542:35:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6978, - "nodeType": "ExpressionStatement", - "src": "26542:35:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6979, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6570, - "src": "26587:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6980, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26604:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26604:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26587:32:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6983, - "nodeType": "ExpressionStatement", - "src": "26587:32:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6984, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6565, - "src": "26629:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6988, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6548, - "src": "26664:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6985, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12173, - "src": "26644:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26644:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5715, - "src": "26644:19:6", - "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": 6989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26644:29:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26629:44:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6991, - "nodeType": "ExpressionStatement", - "src": "26629:44:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6993, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6899, - "src": "26700:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6992, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6584, - "src": "26688:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26688:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6995, - "nodeType": "EmitStatement", - "src": "26683:24:6" - } - ] - }, - "documentation": null, - "id": 6997, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6902, - "modifierName": { - "argumentTypes": null, - "id": 6901, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6400, - "src": "26026:22:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26026:22:6" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6905, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26078:1:6", - "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": 6904, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26070:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26070:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6907, - "modifierName": { - "argumentTypes": null, - "id": 6903, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6639, - "src": "26057:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26057:24:6" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6899, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6997, - "src": "25985:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25985:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25984:16:6" - }, - "returnParameters": { - "id": 6908, - "nodeType": "ParameterList", - "parameters": [], - "src": "26086:0:6" - }, - "scope": 6998, - "src": "25957:757:6", - "stateMutability": "nonpayable", - "superFunction": 6388, - "visibility": "external" - } - ], - "scope": 6999, - "src": "22626:4090:6" - } - ], - "src": "1627:25090:6" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-07T01:07:37.722Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMIncentivizer.json b/build/contracts/YAMIncentivizer.json deleted file mode 100644 index 9c32dc4..0000000 --- a/build/contracts/YAMIncentivizer.json +++ /dev/null @@ -1,40364 +0,0 @@ -{ - "contractName": "YAMIncentivizer", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initreward", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "uni_lp", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "governanceRecoverUnsupported", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"governanceRecoverUnsupported\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initreward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"uni_lp\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":\"YAMIncentivizer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol\":{\"keccak256\":\"0xa8918e83ad8afd1ce8589d00dce386d2ee6a380f1bdafdd583db6f5b990e24c5\",\"urls\":[\"bzz-raw://cb926895e76ea186de7c790e05578cef920c77f6f9258d41df8a844cec163c37\",\"dweb:/ipfs/QmVomvauEub1TiDCPgBS9CSuAhnafgFVWJCstYyCGH9SQK\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b031990811673e9b70db3e22324f962f53e5290cb1f4af72c9ebd17825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a1790556a013da329b6336471800000600655635f3fd040600755600881905560095561007b6001600160e01b036100cc16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100d0565b3390565b61207d806100df6000396000f3fe608060405234801561001057600080fd5b50600436106101b85760003560e01c806380faa57d116100f9578063a694fc3a11610097578063df136d6511610071578063df136d6514610417578063e9fad8ee1461041f578063ebe2b12b14610427578063f2fde38b1461042f576101b8565b8063a694fc3a146103ea578063c8f33c9114610407578063cd3daf9d1461040f576101b8565b80638da58897116100d35780638da58897146103b65780638da5cb5b146103be5780638f32d59b146103c65780639c907b58146103e2576101b8565b806380faa57d1461037357806383d0fdc11461037b5780638b87634714610383576101b8565b80632e1a7d4d1161016657806354575af41161014057806354575af4146102ed57806370a0823114610330578063715018a6146103635780637b0a47ee1461036b576101b8565b80632e1a7d4d146102ab5780633c6b16ab146102c85780633d18b912146102e5576101b8565b80630d68b761116101975780630d68b7611461026657806318160ddd1461029b5780631be05289146102a3576101b8565b80628cc262146101bd5780630700037d14610202578063071c033214610235575b600080fd5b6101f0600480360360208110156101d357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610462565b60408051918252519081900360200190f35b6101f06004803603602081101561021857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104f5565b61023d610507565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102996004803603602081101561027c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610523565b005b6101f06105dd565b6101f06105e4565b610299600480360360208110156102c157600080fd5b50356105eb565b610299600480360360208110156102de57600080fd5b5035610783565b610299610b63565b6102996004803603606081101561030357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359160409091013516610f6d565b6101f06004803603602081101561034657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661114e565b610299611176565b6101f0611258565b6101f061125e565b61023d611271565b6101f06004803603602081101561039957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661128d565b6101f061129f565b61023d6112a5565b6103ce6112c1565b604080519115158252519081900360200190f35b6101f0611301565b6102996004803603602081101561040057600080fd5b5035611307565b6101f0611681565b6101f0611687565b6101f06116db565b6102996116e1565b6101f06116fc565b6102996004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611702565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d6020908152604080832054600c9092528220546104ef91906104e390670de0b6b3a7640000906104d7906104c2906104b6611687565b9063ffffffff61178116565b6104cb8861114e565b9063ffffffff6117ca16565b9063ffffffff61183d16565b9063ffffffff61187f16565b92915050565b600d6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b61052b6112c1565b61059657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6001545b90565b6209896881565b336105f4611687565b600b556105ff61125e565b600a5573ffffffffffffffffffffffffffffffffffffffff8116156106605761062781610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6007544210156106d157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161074057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b610749826118f3565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107a4611961565b73ffffffffffffffffffffffffffffffffffffffff1614610810576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ffe6021913960400191505060405180910390fd5b600061081a611687565b600b5561082561125e565b600a5573ffffffffffffffffffffffffffffffffffffffff8116156108865761084d81610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6007544211156109565760085442106108b4576108ac826209896863ffffffff61183d16565b600955610902565b6008546000906108ca904263ffffffff61178116565b905060006108e3600954836117ca90919063ffffffff16565b90506108fc620989686104d7868463ffffffff61187f16565b60095550505b42600a81905561091b906209896863ffffffff61187f16565b6008556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1610b5f565b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156109c757600080fd5b505afa1580156109db573d6000803e3d6000fd5b505050506040513d60208110156109f157600080fd5b505115610a5f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b600554600654604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101929092525173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610adb57600080fd5b505af1158015610aef573d6000803e3d6000fd5b5050600654610b0a925090506209896863ffffffff61183d16565b600955600754600a819055610b28906209896863ffffffff61187f16565b6008556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610b6c611687565b600b55610b7761125e565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610bd857610b9f81610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6008544210610dba57610bfc60646104d760326006546117ca90919063ffffffff16565b600655600554604080517fb6fa8576000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163b6fa857691600480830192602092919082900301818787803b158015610c6b57600080fd5b505af1158015610c7f573d6000803e3d6000fd5b505050506040513d6020811015610c9557600080fd5b5051600654909150600090610cbe90670de0b6b3a7640000906104d7908563ffffffff6117ca16565b600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101849052905192935073ffffffffffffffffffffffffffffffffffffffff909116916340c10f199160448082019260009290919082900301818387803b158015610d3a57600080fd5b505af1158015610d4e573d6000803e3d6000fd5b5050600654610d69925090506209896863ffffffff61183d16565b600955610d7f426209896863ffffffff61187f16565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505b600754421015610e2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610e3633610462565b90508015610b5f57336000908152600d6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610eb857600080fd5b505af1158015610ecc573d6000803e3d6000fd5b505050506040513d6020811015610ee257600080fd5b505190506000610f04670de0b6b3a76400006104d7858563ffffffff6117ca16565b600554909150610f319073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff61196516565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b610f756112a5565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461100e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f21676f7665726e616e6365000000000000000000000000000000000000000000604482015290519081900360640190fd5b60005473ffffffffffffffffffffffffffffffffffffffff8481169116141561109857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f756e695f6c700000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60055473ffffffffffffffffffffffffffffffffffffffff8481169116141561112257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f79616d0000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b61114973ffffffffffffffffffffffffffffffffffffffff8416828463ffffffff61196516565b505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b61117e6112c1565b6111e957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60095481565b600061126c426008546119f2565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600c6020526000908152604090205481565b60075481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff166112e5611961565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60065481565b33611310611687565b600b5561131b61125e565b600a5573ffffffffffffffffffffffffffffffffffffffff81161561137c5761134381610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600854421061155e576113a060646104d760326006546117ca90919063ffffffff16565b600655600554604080517fb6fa8576000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163b6fa857691600480830192602092919082900301818787803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b505160065490915060009061146290670de0b6b3a7640000906104d7908563ffffffff6117ca16565b600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101849052905192935073ffffffffffffffffffffffffffffffffffffffff909116916340c10f199160448082019260009290919082900301818387803b1580156114de57600080fd5b505af11580156114f2573d6000803e3d6000fd5b505060065461150d925090506209896863ffffffff61183d16565b600955611523426209896863ffffffff61187f16565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505b6007544210156115cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161163e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b61164782611a08565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600a5481565b60006116916105dd565b61169e5750600b546105e1565b61126c6116cc6116ac6105dd565b6104d7670de0b6b3a76400006104cb6009546104cb600a546104b661125e565b600b549063ffffffff61187f16565b600b5481565b6116f26116ed3361114e565b6105eb565b6116fa610b63565b565b60085481565b61170a6112c1565b61177557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61177e81611a77565b50565b60006117c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b71565b9392505050565b6000826117d9575060006104ef565b828202828482816117e657fe5b04146117c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611fdd6021913960400191505060405180910390fd5b60006117c383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c22565b6000828201838110156117c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611906908263ffffffff61178116565b60015533600090815260026020526040902054611929908263ffffffff61178116565b33600081815260026020526040812092909255905461177e9173ffffffffffffffffffffffffffffffffffffffff9091169083611965565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611149908490611ca1565b6000818310611a0157816117c3565b5090919050565b600154611a1b908263ffffffff61187f16565b60015533600090815260026020526040902054611a3e908263ffffffff61187f16565b33600081815260026020526040812092909255905461177e9173ffffffffffffffffffffffffffffffffffffffff909116903084611ee5565b73ffffffffffffffffffffffffffffffffffffffff8116611ae3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611fb76026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008184841115611c1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611bdf578181015183820152602001611bc7565b50505050905090810190601f168015611c0c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611c8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611bdf578181015183820152602001611bc7565b506000838581611c9757fe5b0495945050505050565b611cc08273ffffffffffffffffffffffffffffffffffffffff16611f7a565b611d2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310611d9457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611d57565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611df6576040519150601f19603f3d011682016040523d82523d6000602084013e611dfb565b606091505b509150915081611e6c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611edf57808060200190516020811015611e8857600080fd5b5051611edf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061201f602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611edf908590611ca1565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611fae5750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820fd5b2765851ec801078f4532fad43d5649f3a0d4dd726b605de4065b53eb1cb264736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101b85760003560e01c806380faa57d116100f9578063a694fc3a11610097578063df136d6511610071578063df136d6514610417578063e9fad8ee1461041f578063ebe2b12b14610427578063f2fde38b1461042f576101b8565b8063a694fc3a146103ea578063c8f33c9114610407578063cd3daf9d1461040f576101b8565b80638da58897116100d35780638da58897146103b65780638da5cb5b146103be5780638f32d59b146103c65780639c907b58146103e2576101b8565b806380faa57d1461037357806383d0fdc11461037b5780638b87634714610383576101b8565b80632e1a7d4d1161016657806354575af41161014057806354575af4146102ed57806370a0823114610330578063715018a6146103635780637b0a47ee1461036b576101b8565b80632e1a7d4d146102ab5780633c6b16ab146102c85780633d18b912146102e5576101b8565b80630d68b761116101975780630d68b7611461026657806318160ddd1461029b5780631be05289146102a3576101b8565b80628cc262146101bd5780630700037d14610202578063071c033214610235575b600080fd5b6101f0600480360360208110156101d357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610462565b60408051918252519081900360200190f35b6101f06004803603602081101561021857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104f5565b61023d610507565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102996004803603602081101561027c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610523565b005b6101f06105dd565b6101f06105e4565b610299600480360360208110156102c157600080fd5b50356105eb565b610299600480360360208110156102de57600080fd5b5035610783565b610299610b63565b6102996004803603606081101561030357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359160409091013516610f6d565b6101f06004803603602081101561034657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661114e565b610299611176565b6101f0611258565b6101f061125e565b61023d611271565b6101f06004803603602081101561039957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661128d565b6101f061129f565b61023d6112a5565b6103ce6112c1565b604080519115158252519081900360200190f35b6101f0611301565b6102996004803603602081101561040057600080fd5b5035611307565b6101f0611681565b6101f0611687565b6101f06116db565b6102996116e1565b6101f06116fc565b6102996004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611702565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d6020908152604080832054600c9092528220546104ef91906104e390670de0b6b3a7640000906104d7906104c2906104b6611687565b9063ffffffff61178116565b6104cb8861114e565b9063ffffffff6117ca16565b9063ffffffff61183d16565b9063ffffffff61187f16565b92915050565b600d6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b61052b6112c1565b61059657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6001545b90565b6209896881565b336105f4611687565b600b556105ff61125e565b600a5573ffffffffffffffffffffffffffffffffffffffff8116156106605761062781610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6007544210156106d157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161074057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b610749826118f3565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107a4611961565b73ffffffffffffffffffffffffffffffffffffffff1614610810576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ffe6021913960400191505060405180910390fd5b600061081a611687565b600b5561082561125e565b600a5573ffffffffffffffffffffffffffffffffffffffff8116156108865761084d81610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6007544211156109565760085442106108b4576108ac826209896863ffffffff61183d16565b600955610902565b6008546000906108ca904263ffffffff61178116565b905060006108e3600954836117ca90919063ffffffff16565b90506108fc620989686104d7868463ffffffff61187f16565b60095550505b42600a81905561091b906209896863ffffffff61187f16565b6008556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1610b5f565b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156109c757600080fd5b505afa1580156109db573d6000803e3d6000fd5b505050506040513d60208110156109f157600080fd5b505115610a5f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b600554600654604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101929092525173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610adb57600080fd5b505af1158015610aef573d6000803e3d6000fd5b5050600654610b0a925090506209896863ffffffff61183d16565b600955600754600a819055610b28906209896863ffffffff61187f16565b6008556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610b6c611687565b600b55610b7761125e565b600a5573ffffffffffffffffffffffffffffffffffffffff811615610bd857610b9f81610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b6008544210610dba57610bfc60646104d760326006546117ca90919063ffffffff16565b600655600554604080517fb6fa8576000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163b6fa857691600480830192602092919082900301818787803b158015610c6b57600080fd5b505af1158015610c7f573d6000803e3d6000fd5b505050506040513d6020811015610c9557600080fd5b5051600654909150600090610cbe90670de0b6b3a7640000906104d7908563ffffffff6117ca16565b600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101849052905192935073ffffffffffffffffffffffffffffffffffffffff909116916340c10f199160448082019260009290919082900301818387803b158015610d3a57600080fd5b505af1158015610d4e573d6000803e3d6000fd5b5050600654610d69925090506209896863ffffffff61183d16565b600955610d7f426209896863ffffffff61187f16565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505b600754421015610e2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610e3633610462565b90508015610b5f57336000908152600d6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610eb857600080fd5b505af1158015610ecc573d6000803e3d6000fd5b505050506040513d6020811015610ee257600080fd5b505190506000610f04670de0b6b3a76400006104d7858563ffffffff6117ca16565b600554909150610f319073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff61196516565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b610f756112a5565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461100e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f21676f7665726e616e6365000000000000000000000000000000000000000000604482015290519081900360640190fd5b60005473ffffffffffffffffffffffffffffffffffffffff8481169116141561109857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f756e695f6c700000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60055473ffffffffffffffffffffffffffffffffffffffff8481169116141561112257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f79616d0000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b61114973ffffffffffffffffffffffffffffffffffffffff8416828463ffffffff61196516565b505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b61117e6112c1565b6111e957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60095481565b600061126c426008546119f2565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600c6020526000908152604090205481565b60075481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff166112e5611961565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60065481565b33611310611687565b600b5561131b61125e565b600a5573ffffffffffffffffffffffffffffffffffffffff81161561137c5761134381610462565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020908152604080832093909355600b54600c909152919020555b600854421061155e576113a060646104d760326006546117ca90919063ffffffff16565b600655600554604080517fb6fa8576000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163b6fa857691600480830192602092919082900301818787803b15801561140f57600080fd5b505af1158015611423573d6000803e3d6000fd5b505050506040513d602081101561143957600080fd5b505160065490915060009061146290670de0b6b3a7640000906104d7908563ffffffff6117ca16565b600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101849052905192935073ffffffffffffffffffffffffffffffffffffffff909116916340c10f199160448082019260009290919082900301818387803b1580156114de57600080fd5b505af11580156114f2573d6000803e3d6000fd5b505060065461150d925090506209896863ffffffff61183d16565b600955611523426209896863ffffffff61187f16565b60085560065460408051918252517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150505b6007544210156115cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161163e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b61164782611a08565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600a5481565b60006116916105dd565b61169e5750600b546105e1565b61126c6116cc6116ac6105dd565b6104d7670de0b6b3a76400006104cb6009546104cb600a546104b661125e565b600b549063ffffffff61187f16565b600b5481565b6116f26116ed3361114e565b6105eb565b6116fa610b63565b565b60085481565b61170a6112c1565b61177557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61177e81611a77565b50565b60006117c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b71565b9392505050565b6000826117d9575060006104ef565b828202828482816117e657fe5b04146117c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611fdd6021913960400191505060405180910390fd5b60006117c383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c22565b6000828201838110156117c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611906908263ffffffff61178116565b60015533600090815260026020526040902054611929908263ffffffff61178116565b33600081815260026020526040812092909255905461177e9173ffffffffffffffffffffffffffffffffffffffff9091169083611965565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611149908490611ca1565b6000818310611a0157816117c3565b5090919050565b600154611a1b908263ffffffff61187f16565b60015533600090815260026020526040902054611a3e908263ffffffff61187f16565b33600081815260026020526040812092909255905461177e9173ffffffffffffffffffffffffffffffffffffffff909116903084611ee5565b73ffffffffffffffffffffffffffffffffffffffff8116611ae3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611fb76026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008184841115611c1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611bdf578181015183820152602001611bc7565b50505050905090810190601f168015611c0c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611c8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611bdf578181015183820152602001611bc7565b506000838581611c9757fe5b0495945050505050565b611cc08273ffffffffffffffffffffffffffffffffffffffff16611f7a565b611d2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310611d9457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611d57565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611df6576040519150601f19603f3d011682016040523d82523d6000602084013e611dfb565b606091505b509150915081611e6c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611edf57808060200190516020811015611e8857600080fd5b5051611edf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061201f602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611edf908590611ca1565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611fae5750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820fd5b2765851ec801078f4532fad43d5649f3a0d4dd726b605de4065b53eb1cb264736f6c63430005110032", - "sourceMap": "22627:5381:11:-;;;21663:73;;;-1:-1:-1;;;;;;21663:73:11;;;21693:42;21663:73;;;22706:70;;;;;;22733:42;22706:70;;;22858:19;22830:47;;22918:21;22891:48;;22983:31;;;;23020:29;;9647:12;-1:-1:-1;;;;;9647:10:11;:12;:::i;:::-;9638:6;:21;;-1:-1:-1;;;;;;9638:21:11;-1:-1:-1;;;;;9638:21:11;;;;;;;;9674:40;;9707:6;;;-1:-1:-1;;9674:40:11;;-1:-1:-1;;9674:40:11;22627:5381;;8585:96;8664:10;8585:96;:::o;22627:5381::-;;;;;;;", - "deployedSourceMap": "22627:5381:11:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22627:5381:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24336:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24336:259:11;;;;:::i;:::-;;;;;;;;;;;;;;;;23194:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23194:42:11;;;;:::i;22706:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21341:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21341:156:11;;;;:::i;:::-;;21830:89;;;:::i;22782:41::-;;;:::i;24898:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24898:210:11;;:::i;26288:960::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26288:960:11;;:::i;25214:454::-;;;:::i;27605:401::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;27605:401:11;;;;;;;;;;;;;;;;;;:::i;21925:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21925:108:11;;;;:::i;10582:137::-;;;:::i;23020:29::-;;;:::i;23787:129::-;;;:::i;21663:73::-;;;:::i;23131:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23131:57:11;;;;:::i;22891:48::-;;;:::i;9797:77::-;;;:::i;10148:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;22830:47;;;:::i;24683:209::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24683:209:11;;:::i;23055:29::-;;;:::i;23922:408::-;;;:::i;23090:35::-;;;:::i;25114:94::-;;;:::i;22983:31::-;;;:::i;10868:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10868:107:11;;;;:::i;24336:259::-;24571:16;;;24390:7;24571:16;;;:7;:16;;;;;;;;;24489:22;:31;;;;;;24428:160;;24571:16;24428:121;;24544:4;;24428:94;;24468:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24428:18;24438:7;24428:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24409:179;24336:259;-1:-1:-1;;24336:259:11:o;23194:42::-;;;;;;;;;;;;;:::o;22706:70::-;;;;;;:::o;21341:156::-;10001:9;:7;:9::i;:::-;9993:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21450:18;:40;;;;;;;;;;;;;;;21341:156::o;21830:89::-;21900:12;;21830:89;;:::o;22782:41::-;22817:6;22782:41;:::o;24898:210::-;24952:10;23531:16;:14;:16::i;:::-;23508:20;:39;23574:26;:24;:26::i;:::-;23557:14;:43;23614:21;;;;23610:154;;23670:15;23677:7;23670:6;:15::i;:::-;23651:16;;;;;;;:7;:16;;;;;;;;:34;;;;23733:20;;23699:22;:31;;;;;;:54;23610:154;26241:9;;26222:15;:28;;26214:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25002:1;24993:6;:10;24985:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25035:22;25050:6;25035:14;:22::i;:::-;25072:29;;;;;;;;25082:10;;25072:29;;;;;;;;;;24898:210;;:::o;26288:960::-;21261:18;;;;21245:12;:10;:12::i;:::-;:34;;;21237:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26409:1;23531:16;:14;:16::i;:::-;23508:20;:39;23574:26;:24;:26::i;:::-;23557:14;:43;23614:21;;;;23610:154;;23670:15;23677:7;23670:6;:15::i;:::-;23651:16;;;;;;;:7;:16;;;;;;;;:34;;;;23733:20;;23699:22;:31;;;;;;:54;23610:154;26449:9;;26431:15;:27;26427:815;;;26495:12;;26476:15;:31;26472:310;;26538:20;:6;22817;26538:20;:10;:20;:::i;:::-;26525:10;:33;26472:310;;;26613:12;;26593:17;;26613:33;;26630:15;26613:33;:16;:33;:::i;:::-;26593:53;;26662:16;26681:25;26695:10;;26681:9;:13;;:25;;;;:::i;:::-;26662:44;-1:-1:-1;26735:34:11;22817:6;26735:20;:6;26662:44;26735:20;:10;:20;:::i;:34::-;26722:10;:47;-1:-1:-1;;26472:310:11;26810:15;26793:14;:32;;;26852:29;;22817:6;26852:29;:19;:29;:::i;:::-;26837:12;:44;26898:19;;;;;;;;;;;;;;;;;26427:815;;;26954:3;;:28;;;;;;26976:4;26954:28;;;;;;:3;;;;;:13;;:28;;;;;;;;;;;;;;;:3;:28;;;5:2:-1;;;;30:1;27;20:12;5:2;26954:28:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;26954:28:11;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26954:28:11;:33;26946:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27023:3;;27047:10;;27023:35;;;;;;27040:4;27023:35;;;;;;;;;;;;:3;;;;;:8;;:35;;;;;:3;;:35;;;;;;;;:3;;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;27023:35:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;27083:10:11;;:24;;-1:-1:-1;27083:10:11;-1:-1:-1;22817:6:11;27083:24;:14;:24;:::i;:::-;27070:10;:37;27136:9;;27119:14;:26;;;27172:23;;22817:6;27172:23;:13;:23;:::i;:::-;27157:12;:38;27212:19;;;;;;;;;;;;;;;;;26427:815;21327:1;26288:960;:::o;25214:454::-;25255:10;23531:16;:14;:16::i;:::-;23508:20;:39;23574:26;:24;:26::i;:::-;23557:14;:43;23614:21;;;;23610:154;;23670:15;23677:7;23670:6;:15::i;:::-;23651:16;;;;;;;:7;:16;;;;;;;;:34;;;;23733:20;;23699:22;:31;;;;;;:54;23610:154;25729:12;;25710:15;:31;25706:454;;25770:27;25793:3;25770:18;25785:2;25770:10;;:14;;:18;;;;:::i;:27::-;25757:10;:40;25847:3;;25835:37;;;;;;;;25811:21;;25847:3;;;25835:35;;:37;;;;;;;;;;;;;;25811:21;25847:3;25835:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25835:37:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25835:37:11;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25835:37:11;25907:10;;25835:37;;-1:-1:-1;25886:18:11;;25907:41;;25941:6;;25907:29;;25835:37;25907:29;:14;:29;:::i;:41::-;25962:3;;:35;;;;;;25979:4;25962:35;;;;;;;;;;;;25886:62;;-1:-1:-1;25962:3:11;;;;;:8;;:35;;;;;:3;;:35;;;;;;;;:3;;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;25962:35:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;26025:10:11;;:24;;-1:-1:-1;26025:10:11;-1:-1:-1;22817:6:11;26025:24;:14;:24;:::i;:::-;26012:10;:37;26078:29;:15;22817:6;26078:29;:19;:29;:::i;:::-;26063:12;:44;26138:10;;26126:23;;;;;;;;;;;;;;;;25706:454;;;26241:9;;26222:15;:28;;26214:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25299:14;25316:18;25323:10;25316:6;:18::i;:::-;25299:35;-1:-1:-1;25348:10:11;;25344:318;;25382:10;25396:1;25374:19;;;:7;:19;;;;;;;;:23;;;25447:3;;25435:37;;;;;;;25374:19;25447:3;;;;25435:35;;:37;;;;;;;;;;;25396:1;25447:3;25435:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25435:37:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25435:37:11;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25435:37:11;;-1:-1:-1;25486:18:11;25507:37;25537:6;25507:25;:6;25435:37;25507:25;:10;:25;:::i;:37::-;25558:3;;25486:58;;-1:-1:-1;25558:40:11;;:3;;25575:10;25486:58;25558:40;:16;:40;:::i;:::-;25617:34;;;;;;;;25628:10;;25617:34;;;;;;;;;;25344:318;;26273:1;25214:454;:::o;27605:401::-;27759:7;:5;:7::i;:::-;27745:21;;:10;:21;;;27737:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27844:6;;;27834:16;;;27844:6;;27834:16;;27826:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27923:3;;;27913:13;;;27923:3;;27913:13;;27905:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27968:31;:19;;;27988:2;27992:6;27968:31;:19;:31;:::i;:::-;27605:401;;;:::o;21925:108::-;22008:18;;21982:7;22008:18;;;:9;:18;;;;;;;21925:108::o;10582:137::-;10001:9;:7;:9::i;:::-;9993:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10664:6;;10643:40;;10680:1;;10643:40;10664:6;;10643:40;;10680:1;;10643:40;10693:6;:19;;;;;;10582:137::o;23020:29::-;;;;:::o;23787:129::-;23844:7;23870:39;23879:15;23896:12;;23870:8;:39::i;:::-;23863:46;;23787:129;:::o;21663:73::-;;;;;;:::o;23131:57::-;;;;;;;;;;;;;:::o;22891:48::-;;;;:::o;9797:77::-;9861:6;;;;9797:77;:::o;10148:92::-;10227:6;;10188:4;;10227:6;;10211:12;:10;:12::i;:::-;:22;;;10204:29;;10148:92;:::o;22830:47::-;;;;:::o;24683:209::-;24734:10;23531:16;:14;:16::i;:::-;23508:20;:39;23574:26;:24;:26::i;:::-;23557:14;:43;23614:21;;;;23610:154;;23670:15;23677:7;23670:6;:15::i;:::-;23651:16;;;;;;;:7;:16;;;;;;;;:34;;;;23733:20;;23699:22;:31;;;;;;:54;23610:154;25729:12;;25710:15;:31;25706:454;;25770:27;25793:3;25770:18;25785:2;25770:10;;:14;;:18;;;;:::i;:27::-;25757:10;:40;25847:3;;25835:37;;;;;;;;25811:21;;25847:3;;;25835:35;;:37;;;;;;;;;;;;;;25811:21;25847:3;25835:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25835:37:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25835:37:11;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25835:37:11;25907:10;;25835:37;;-1:-1:-1;25886:18:11;;25907:41;;25941:6;;25907:29;;25835:37;25907:29;:14;:29;:::i;:41::-;25962:3;;:35;;;;;;25979:4;25962:35;;;;;;;;;;;;25886:62;;-1:-1:-1;25962:3:11;;;;;:8;;:35;;;;;:3;;:35;;;;;;;;:3;;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;25962:35:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;26025:10:11;;:24;;-1:-1:-1;26025:10:11;-1:-1:-1;22817:6:11;26025:24;:14;:24;:::i;:::-;26012:10;:37;26078:29;:15;22817:6;26078:29;:19;:29;:::i;:::-;26063:12;:44;26138:10;;26126:23;;;;;;;;;;;;;;;;25706:454;;;26241:9;;26222:15;:28;;26214:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24795:1;24786:6;:10;24778:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24825:19;24837:6;24825:11;:19::i;:::-;24859:26;;;;;;;;24866:10;;24859:26;;;;;;;;;;24683:209;;:::o;23055:29::-;;;;:::o;23922:408::-;23969:7;23992:13;:11;:13::i;:::-;23988:76;;-1:-1:-1;24033:20:11;;24026:27;;23988:76;24092:231;24134:175;24295:13;:11;:13::i;:::-;24134:135;24264:4;24134:104;24227:10;;24134:67;24186:14;;24134:26;:24;:26::i;:175::-;24092:20;;;:231;:24;:231;:::i;23090:35::-;;;;:::o;25114:94::-;25149:31;25158:21;25168:10;25158:9;:21::i;:::-;25149:8;:31::i;:::-;25190:11;:9;:11::i;:::-;25114:94::o;22983:31::-;;;;:::o;10868:107::-;10001:9;:7;:9::i;:::-;9993:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10940:28;10959:8;10940:18;:28::i;:::-;10868:107;:::o;3722:134::-;3780:7;3806:43;3810:1;3813;3806:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3799:50;3722:134;-1:-1:-1;;;3722:134:11:o;4607:459::-;4665:7;4906:6;4902:45;;-1:-1:-1;4935:1:11;4928:8;;4902:45;4969:5;;;4973:1;4969;:5;:1;4992:5;;;;;:10;4984:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5521:130;5579:7;5605:39;5609:1;5612;5605:39;;;;;;;;;;;;;;;;;:3;:39::i;3282:176::-;3340:7;3371:5;;;3394:6;;;;3386:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22274:213;22340:12;;:24;;22357:6;22340:24;:16;:24;:::i;:::-;22325:12;:39;22408:10;22398:21;;;;:9;:21;;;;;;:33;;22424:6;22398:33;:25;:33;:::i;:::-;22384:10;22374:21;;;;:9;:21;;;;;:57;;;;22441:6;;:39;;22374:21;22441:6;;;;22473;22441:19;:39::i;8585:96::-;8664:10;8585:96;:::o;17863:174::-;17971:58;;;17994:14;17971:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17971:58:11;;;;;;;;25:18:-1;;61:17;;17971:58:11;182:15:-1;17994:23:11;179:29:-1;160:49;;17945:85:11;;17964:5;;17945:18;:85::i;1985:104::-;2043:7;2073:1;2069;:5;:13;;2081:1;2069:13;;;-1:-1:-1;2077:1:11;;1985:104;-1:-1:-1;1985:104:11:o;22039:229::-;22102:12;;:24;;22119:6;22102:24;:16;:24;:::i;:::-;22087:12;:39;22170:10;22160:21;;;;:9;:21;;;;;;:33;;22186:6;22160:33;:25;:33;:::i;:::-;22146:10;22136:21;;;;:9;:21;;;;;:57;;;;22203:6;;:58;;22136:21;22203:6;;;;22247:4;22254:6;22203:23;:58::i;11076:225::-;11149:22;;;11141:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11250:6;;11229:38;;;;;;;11250:6;;11229:38;;11250:6;;11229:38;11277:6;:17;;;;;;;;;;;;;;;11076:225::o;4180:187::-;4266:7;4301:12;4293:6;;;;4285:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4285:29:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4336:5:11;;;4180:187::o;6166:338::-;6252:7;6352:12;6345:5;6337:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6337:28:11;;6375:9;6391:1;6387;:5;;;;;;;6166:338;-1:-1:-1;;;;;6166:338:11:o;19867:1095::-;20462:27;20470:5;20462:25;;;:27::i;:::-;20454:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20596:12;20610:23;20645:5;20637:19;;20657:4;20637:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20637:25:11;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20595:67:11;;;;20680:7;20672:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20739:17;;:21;20735:221;;20879:10;20868:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20868:30:11;20860:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19867:1095;;;;:::o;18043:202::-;18169:68;;;18192:18;18169:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;18169:68:11;;;;;;;;25:18:-1;;61:17;;18169:68:11;182:15:-1;18192:27:11;179:29:-1;160:49;;18143:95:11;;18162:5;;18143:18;:95::i;14773:797::-;14833:4;15481:20;;15326:66;15520:15;;;;;:42;;;15551:11;15539:8;:23;;15520:42;15512:51;14773:797;-1:-1:-1;;;;14773:797:11:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-27\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-26\n*/\n\n/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMIncentives.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n function mint(address account, uint amount) external;\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni_lp = IERC20(0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd);\n\n uint256 private _totalSupply;\n\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni_lp.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni_lp.safeTransfer(msg.sender, amount);\n }\n}\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n function mint(address to, uint256 amount) external;\n}\n\ncontract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000;\n\n uint256 public initreward = 15 * 10**5 * 10**18; // 1.5m\n uint256 public starttime = 1597931200 + 24 hours; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkhalve checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n modifier checkhalve() {\n if (block.timestamp >= periodFinish) {\n initreward = initreward.mul(50).div(100);\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 newRewards = initreward.mul(scalingFactor).div(10**18);\n yam.mint(address(this), newRewards);\n\n rewardRate = initreward.div(DURATION);\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(initreward);\n }\n _;\n }\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n require(yam.balanceOf(address(this)) == 0, \"already initialized\");\n yam.mint(address(this), initreward);\n rewardRate = initreward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n\n\n // This function allows governance to take unsupported tokens out of the\n // contract, since this one exists longer than the other pools.\n // This is in an effort to make someone whole, should they seriously\n // mess up. There is no guarantee governance will vote to return these.\n // It also allows for removal of airdropped tokens.\n function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to)\n external\n {\n // only gov\n require(msg.sender == owner(), \"!governance\");\n // cant take staked asset\n require(_token != uni_lp, \"uni_lp\");\n // cant take reward asset\n require(_token != yam, \"yam\");\n\n // transfer to\n _token.safeTransfer(to, amount);\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/incentivizers/YAMIncentives.sol", - "exportedSymbols": { - "Address": [ - 12874 - ], - "Context": [ - 12613 - ], - "IERC20": [ - 12800 - ], - "IRewardDistributionRecipient": [ - 13125 - ], - "LPTokenWrapper": [ - 13235 - ], - "Math": [ - 12401 - ], - "Ownable": [ - 12725 - ], - "SafeERC20": [ - 13090 - ], - "SafeMath": [ - 12587 - ], - "YAM": [ - 13248 - ], - "YAMIncentivizer": [ - 13815 - ] - }, - "id": 13816, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 12334, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1627:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 12401, - "linearizedBaseContracts": [ - 12401 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12350, - "nodeType": "Block", - "src": "1876:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12343, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1893:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12344, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1898:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12338, - "src": "1906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1893:14:11", - "trueExpression": { - "argumentTypes": null, - "id": 12346, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12336, - "src": "1902:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12342, - "id": 12349, - "nodeType": "Return", - "src": "1886:21:11" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 12351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12336, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1822:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1822:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12338, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1833:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1833:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1821:22:11" - }, - "returnParameters": { - "id": 12342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12341, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12351, - "src": "1867:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1867:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1866:9:11" - }, - "scope": 12401, - "src": "1809:105:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12367, - "nodeType": "Block", - "src": "2052:37:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2069:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 12361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2073:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2069:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 12364, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12355, - "src": "2081:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "2069:13:11", - "trueExpression": { - "argumentTypes": null, - "id": 12363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12353, - "src": "2077:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12359, - "id": 12366, - "nodeType": "Return", - "src": "2062:20:11" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 12368, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12353, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "1998:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12355, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2009:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2009:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1997:22:11" - }, - "returnParameters": { - "id": 12359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12358, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12368, - "src": "2043:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2043:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2042:9:11" - }, - "scope": 12401, - "src": "1985:104:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12399, - "nodeType": "Block", - "src": "2273:119:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12377, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12380, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2344:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12381, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2355:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2359:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2355:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2354:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12386, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12370, - "src": "2366:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2370:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2366:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12372, - "src": "2374:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2374:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2366:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12393, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2365:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 12394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2383:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2365:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 12396, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2364:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2344:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12376, - "id": 12398, - "nodeType": "Return", - "src": "2337:48:11" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 12400, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12370, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2219:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12372, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2230:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2218:22:11" - }, - "returnParameters": { - "id": 12376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12400, - "src": "2264:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12374, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2264:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2263:9:11" - }, - "scope": 12401, - "src": "2202:190:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "1726:668:11" - }, - { - "id": 12402, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2448:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 12587, - "linearizedBaseContracts": [ - 12587 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12426, - "nodeType": "Block", - "src": "3349:109:11", - "statements": [ - { - "assignments": [ - 12412 - ], - "declarations": [ - { - "constant": false, - "id": 12412, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12426, - "src": "3359:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3359:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12416, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12413, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3371:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12414, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12406, - "src": "3375:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3371:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3359:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3394:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12419, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12404, - "src": "3399:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3394:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 12421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:29:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 12417, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "3386:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3386:46:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12423, - "nodeType": "ExpressionStatement", - "src": "3386:46:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12412, - "src": "3450:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12410, - "id": 12425, - "nodeType": "Return", - "src": "3443:8:11" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 12427, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12404, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3295:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3295:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12406, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3306:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12405, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3306:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3294:22:11" - }, - "returnParameters": { - "id": 12410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12409, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12427, - "src": "3340:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3340:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3339:9:11" - }, - "scope": 12587, - "src": "3282:176:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12442, - "nodeType": "Block", - "src": "3789:67:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12437, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12429, - "src": "3810:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12438, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12431, - "src": "3813:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 12439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3816:32:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 12436, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12443, - 12470 - ], - "referencedDeclaration": 12470, - "src": "3806:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3806:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12435, - "id": 12441, - "nodeType": "Return", - "src": "3799:50:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 12443, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12429, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3735:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12428, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3735:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12431, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3746:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3746:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3734:22:11" - }, - "returnParameters": { - "id": 12435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12434, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12443, - "src": "3780:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3780:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3779:9:11" - }, - "scope": 12587, - "src": "3722:134:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12469, - "nodeType": "Block", - "src": "4275:92:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12455, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4293:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12456, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4298:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4293:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12458, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12449, - "src": "4301:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12454, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4285:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4285:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12460, - "nodeType": "ExpressionStatement", - "src": "4285:29:11" - }, - { - "assignments": [ - 12462 - ], - "declarations": [ - { - "constant": false, - "id": 12462, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12469, - "src": "4324:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4324:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12466, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12463, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12445, - "src": "4336:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12464, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12447, - "src": "4340:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4336:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4324:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12467, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12462, - "src": "4359:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12453, - "id": 12468, - "nodeType": "Return", - "src": "4352:8:11" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 12470, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12445, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4193:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4193:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12447, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4204:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12449, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4215:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12448, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4215:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4192:50:11" - }, - "returnParameters": { - "id": 12453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12470, - "src": "4266:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12451, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4266:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4265:9:11" - }, - "scope": 12587, - "src": "4180:187:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12503, - "nodeType": "Block", - "src": "4674:392:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12479, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4906:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4911:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4906:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 12485, - "nodeType": "IfStatement", - "src": "4902:45:11", - "trueBody": { - "id": 12484, - "nodeType": "Block", - "src": "4914:33:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4935:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 12478, - "id": 12483, - "nodeType": "Return", - "src": "4928:8:11" - } - ] - } - }, - { - "assignments": [ - 12487 - ], - "declarations": [ - { - "constant": false, - "id": 12487, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12503, - "src": "4957:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12491, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12488, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4969:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 12489, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "4973:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4969:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4957:17:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12493, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "4992:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12494, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12472, - "src": "4996:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12496, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12474, - "src": "5001:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4992:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 12498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5004:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 12492, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "4984:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:56:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12500, - "nodeType": "ExpressionStatement", - "src": "4984:56:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12501, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12487, - "src": "5058:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12478, - "id": 12502, - "nodeType": "Return", - "src": "5051:8:11" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 12504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12475, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12472, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4620:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4620:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12474, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4631:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4631:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4619:22:11" - }, - "returnParameters": { - "id": 12478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12477, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12504, - "src": "4665:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4665:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4664:9:11" - }, - "scope": 12587, - "src": "4607:459:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12519, - "nodeType": "Block", - "src": "5588:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12514, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12506, - "src": "5609:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12515, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12508, - "src": "5612:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 12516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5615:28:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 12513, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12520, - 12547 - ], - "referencedDeclaration": 12547, - "src": "5605:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5605:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12512, - "id": 12518, - "nodeType": "Return", - "src": "5598:46:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12520, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12506, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5534:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5534:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12508, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5545:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5545:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5533:22:11" - }, - "returnParameters": { - "id": 12512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12511, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12520, - "src": "5579:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5578:9:11" - }, - "scope": 12587, - "src": "5521:130:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12546, - "nodeType": "Block", - "src": "6261:243:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12532, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6345:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6349:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6345:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12535, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12526, - "src": "6352:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12531, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6337:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6337:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12537, - "nodeType": "ExpressionStatement", - "src": "6337:28:11" - }, - { - "assignments": [ - 12539 - ], - "declarations": [ - { - "constant": false, - "id": 12539, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12546, - "src": "6375:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12543, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12540, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12522, - "src": "6387:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 12541, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12524, - "src": "6391:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6387:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6375:17:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12544, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12539, - "src": "6496:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12530, - "id": 12545, - "nodeType": "Return", - "src": "6489:8:11" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12547, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12527, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12522, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6179:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12521, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6179:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12524, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6190:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6190:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12526, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6201:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12525, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6201:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6178:50:11" - }, - "returnParameters": { - "id": 12530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12529, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12547, - "src": "6252:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12528, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6252:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6251:9:11" - }, - "scope": 12587, - "src": "6166:338:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12562, - "nodeType": "Block", - "src": "7015:61:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12557, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12549, - "src": "7036:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12558, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12551, - "src": "7039:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 12559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7042:26:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 12556, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 12563, - 12586 - ], - "referencedDeclaration": 12586, - "src": "7032:3:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 12560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7032:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12555, - "id": 12561, - "nodeType": "Return", - "src": "7025:44:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 12563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12549, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6961:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12548, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6961:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12551, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "6972:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12550, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6972:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6960:22:11" - }, - "returnParameters": { - "id": 12555, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12554, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12563, - "src": "7006:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7006:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7005:9:11" - }, - "scope": 12587, - "src": "6948:128:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12585, - "nodeType": "Block", - "src": "7675:68:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12575, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7693:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7698:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12578, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12569, - "src": "7701:12:11", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 12574, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7685:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7685:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12580, - "nodeType": "ExpressionStatement", - "src": "7685:29:11" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12581, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12565, - "src": "7731:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 12582, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12567, - "src": "7735:1:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7731:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12573, - "id": 12584, - "nodeType": "Return", - "src": "7724:12:11" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 12586, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12570, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12565, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7593:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12567, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7604:9:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12566, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7604:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12569, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7615:26:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12568, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7615:6:11", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7592:50:11" - }, - "returnParameters": { - "id": 12573, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12572, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12586, - "src": "7666:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12571, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7666:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7665:9:11" - }, - "scope": 12587, - "src": "7580:163:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "3037:4708:11" - }, - { - "id": 12588, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7797:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12613, - "linearizedBaseContracts": [ - 12613 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12591, - "nodeType": "Block", - "src": "8523:3:11", - "statements": [] - }, - "documentation": null, - "id": 12592, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12589, - "nodeType": "ParameterList", - "parameters": [], - "src": "8511:2:11" - }, - "returnParameters": { - "id": 12590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8523:0:11" - }, - "scope": 12613, - "src": "8499:27:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12600, - "nodeType": "Block", - "src": "8647:34:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8664:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8664:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12596, - "id": 12599, - "nodeType": "Return", - "src": "8657:17:11" - } - ] - }, - "documentation": null, - "id": 12601, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12593, - "nodeType": "ParameterList", - "parameters": [], - "src": "8604:2:11" - }, - "returnParameters": { - "id": 12596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12595, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12601, - "src": "8630:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8630:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8629:17:11" - }, - "scope": 12613, - "src": "8585:96:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12611, - "nodeType": "Block", - "src": "8744:165:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19294, - "src": "8754:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12607, - "nodeType": "ExpressionStatement", - "src": "8754:4:11" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12608, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8894:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8894:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 12605, - "id": 12610, - "nodeType": "Return", - "src": "8887:15:11" - } - ] - }, - "documentation": null, - "id": 12612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12602, - "nodeType": "ParameterList", - "parameters": [], - "src": "8704:2:11" - }, - "returnParameters": { - "id": 12605, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12604, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12612, - "src": "8730:12:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12603, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8730:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8729:14:11" - }, - "scope": 12613, - "src": "8687:222:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "8322:589:11" - }, - { - "id": 12614, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8969:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 12615, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12613, - "src": "9375:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$12613", - "typeString": "contract Context" - } - }, - "id": 12616, - "nodeType": "InheritanceSpecifier", - "src": "9375:7:11" - } - ], - "contractDependencies": [ - 12613 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 12725, - "linearizedBaseContracts": [ - 12725, - 12613 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 12618, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 12725, - "src": "9389:22:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9389:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 12624, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 12623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12620, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9445:29:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9445:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12622, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12624, - "src": "9476:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9476:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9444:57:11" - }, - "src": "9418:84:11" - }, - { - "body": { - "id": 12639, - "nodeType": "Block", - "src": "9628:93:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12627, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9638:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12628, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "9647:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9647:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9638:21:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12631, - "nodeType": "ExpressionStatement", - "src": "9638:21:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9703:1:11", - "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": 12633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9695:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 12636, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9707:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12632, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "9674:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12638, - "nodeType": "EmitStatement", - "src": "9669:45:11" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 12640, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12625, - "nodeType": "ParameterList", - "parameters": [], - "src": "9616:2:11" - }, - "returnParameters": { - "id": 12626, - "nodeType": "ParameterList", - "parameters": [], - "src": "9628:0:11" - }, - "scope": 12725, - "src": "9604:117:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12647, - "nodeType": "Block", - "src": "9844:30:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12645, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "9861:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 12644, - "id": 12646, - "nodeType": "Return", - "src": "9854:13:11" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 12648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12641, - "nodeType": "ParameterList", - "parameters": [], - "src": "9811:2:11" - }, - "returnParameters": { - "id": 12644, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12643, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12648, - "src": "9835:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9835:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9834:9:11" - }, - "scope": 12725, - "src": "9797:77:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12657, - "nodeType": "Block", - "src": "9983:82:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12651, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12669, - "src": "10001:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 12652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10001:9:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 12653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10012:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 12650, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9993:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9993:54:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12655, - "nodeType": "ExpressionStatement", - "src": "9993:54:11" - }, - { - "id": 12656, - "nodeType": "PlaceholderStatement", - "src": "10057:1:11" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 12658, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 12649, - "nodeType": "ParameterList", - "parameters": [], - "src": "9980:2:11" - }, - "src": "9962:103:11", - "visibility": "internal" - }, - { - "body": { - "id": 12668, - "nodeType": "Block", - "src": "10194:46:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 12663, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "10211:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 12664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10211:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12665, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10227:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10211:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12662, - "id": 12667, - "nodeType": "Return", - "src": "10204:29:11" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 12669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12659, - "nodeType": "ParameterList", - "parameters": [], - "src": "10164:2:11" - }, - "returnParameters": { - "id": 12662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12661, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12669, - "src": "10188:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10188:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10187:6:11" - }, - "scope": 12725, - "src": "10148:92:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12687, - "nodeType": "Block", - "src": "10628:91:11", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12675, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10664:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10680:1:11", - "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": 12676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10672:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 12674, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "10643:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10643:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12680, - "nodeType": "EmitStatement", - "src": "10638:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12681, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "10693:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10710:1:11", - "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": 12682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10702:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10702:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10693:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12686, - "nodeType": "ExpressionStatement", - "src": "10693:19:11" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 12688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12672, - "modifierName": { - "argumentTypes": null, - "id": 12671, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10618:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10618:9:11" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12670, - "nodeType": "ParameterList", - "parameters": [], - "src": "10608:2:11" - }, - "returnParameters": { - "id": 12673, - "nodeType": "ParameterList", - "parameters": [], - "src": "10628:0:11" - }, - "scope": 12725, - "src": "10582:137:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12699, - "nodeType": "Block", - "src": "10930:45:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12696, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12690, - "src": "10959:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12695, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12724, - "src": "10940:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 12697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10940:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12698, - "nodeType": "ExpressionStatement", - "src": "10940:28:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 12700, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 12693, - "modifierName": { - "argumentTypes": null, - "id": 12692, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "10920:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10920:9:11" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12700, - "src": "10895:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10895:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10894:18:11" - }, - "returnParameters": { - "id": 12694, - "nodeType": "ParameterList", - "parameters": [], - "src": "10930:0:11" - }, - "scope": 12725, - "src": "10868:107:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12723, - "nodeType": "Block", - "src": "11131:170:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12706, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:11", - "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": 12707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11161:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11161:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11149:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 12711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11173:40:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 12705, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11141:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12713, - "nodeType": "ExpressionStatement", - "src": "11141:73:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12715, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11250:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12716, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11258:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12714, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12624, - "src": "11229:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 12717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11229:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12718, - "nodeType": "EmitStatement", - "src": "11224:43:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 12721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12719, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12618, - "src": "11277:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12720, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12702, - "src": "11286:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11277:17:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12722, - "nodeType": "ExpressionStatement", - "src": "11277:17:11" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 12724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12702, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 12724, - "src": "11104:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11104:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11103:18:11" - }, - "returnParameters": { - "id": 12704, - "nodeType": "ParameterList", - "parameters": [], - "src": "11131:0:11" - }, - "scope": 12725, - "src": "11076:225:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "9355:1948:11" - }, - { - "id": 12726, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11362:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 12800, - "linearizedBaseContracts": [ - 12800 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 12731, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12727, - "nodeType": "ParameterList", - "parameters": [], - "src": "11652:2:11" - }, - "returnParameters": { - "id": 12730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12729, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12731, - "src": "11678:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11678:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11677:9:11" - }, - "scope": 12800, - "src": "11632:55:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 12738, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12733, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11789:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12732, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11789:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11788:17:11" - }, - "returnParameters": { - "id": 12737, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12738, - "src": "11829:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12735, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11829:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11828:9:11" - }, - "scope": 12800, - "src": "11770:68:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12747, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12740, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12076:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12076:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12742, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12095:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12095:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12075:35:11" - }, - "returnParameters": { - "id": 12746, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12745, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12747, - "src": "12129:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12744, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12129:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12128:6:11" - }, - "scope": 12800, - "src": "12058:77:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12749, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12154:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12748, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12154:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12751, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12754, - "src": "12171:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12750, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12171:4:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12153:30:11" - }, - "returnParameters": { - "id": 12753, - "nodeType": "ParameterList", - "parameters": [], - "src": "12192:0:11" - }, - "scope": 12800, - "src": "12140:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 12763, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12756, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12487:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12487:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12758, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12502:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12502:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12486:32:11" - }, - "returnParameters": { - "id": 12762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12763, - "src": "12542:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12542:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12541:9:11" - }, - "scope": 12800, - "src": "12468:83:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 12772, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12765, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13221:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12764, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13221:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12767, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13238:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13238:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13220:33:11" - }, - "returnParameters": { - "id": 12771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12770, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12772, - "src": "13272:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12769, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13272:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13271:6:11" - }, - "scope": 12800, - "src": "13204:74:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 12783, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12774, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13607:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13607:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12776, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13623:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13623:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13642:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13642:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13606:51:11" - }, - "returnParameters": { - "id": 12782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12781, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12783, - "src": "13676:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12780, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13676:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13675:6:11" - }, - "scope": 12800, - "src": "13585:97:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 12791, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 12790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12785, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13866:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13866:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12787, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13888:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12786, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13888:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12789, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12791, - "src": "13908:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13908:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13865:57:11" - }, - "src": "13851:72:11" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 12799, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 12798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12793, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14097:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12792, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12795, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14120:23:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12794, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14120:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12797, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12799, - "src": "14145:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12796, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14145:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14096:63:11" - }, - "src": "14082:78:11" - } - ], - "scope": 13816, - "src": "11538:2624:11" - }, - { - "id": 12801, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14216:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 12874, - "linearizedBaseContracts": [ - 12874 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 12825, - "nodeType": "Block", - "src": "14839:731:11", - "statements": [ - { - "assignments": [ - 12809 - ], - "declarations": [ - { - "constant": false, - "id": 12809, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15278:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12808, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15278:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12810, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15278:16:11" - }, - { - "assignments": [ - 12812 - ], - "declarations": [ - { - "constant": false, - "id": 12812, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 12825, - "src": "15304:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12811, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15304:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12814, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 12813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15326:66:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15304:88:11" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 12809, - "isOffset": false, - "isSlot": false, - "src": "15469:8:11", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 12803, - "isOffset": false, - "isSlot": false, - "src": "15493:7:11", - "valueSize": 1 - } - } - ], - "id": 12815, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15458:45:11" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12816, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15520:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 12817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15532:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15520:15:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 12821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12819, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12809, - "src": "15539:8:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 12820, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12812, - "src": "15551:11:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15539:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15520:42:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12823, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15519:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 12807, - "id": 12824, - "nodeType": "Return", - "src": "15512:51:11" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 12826, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12803, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14793:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14793:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14792:17:11" - }, - "returnParameters": { - "id": 12807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12826, - "src": "14833:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14833:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14832:6:11" - }, - "scope": 12874, - "src": "14773:797:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12839, - "nodeType": "Block", - "src": "15855:49:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12835, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12828, - "src": "15888:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 12834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15880:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 12836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15880:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 12833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15872:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15872:25:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 12832, - "id": 12838, - "nodeType": "Return", - "src": "15865:32:11" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 12840, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12829, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12828, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15798:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15798:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15797:17:11" - }, - "returnParameters": { - "id": 12832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12831, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12840, - "src": "15838:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12830, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15838:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15837:17:11" - }, - "scope": 12874, - "src": "15779:125:11", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12872, - "nodeType": "Block", - "src": "16932:294:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12849, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19300, - "src": "16958:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - ], - "id": 12848, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16950:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16950:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16950:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12852, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "16975:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16950:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 12854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16983:31:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 12847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16942:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16942:73:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12856, - "nodeType": "ExpressionStatement", - "src": "16942:73:11" - }, - { - "assignments": [ - 12858, - null - ], - "declarations": [ - { - "constant": false, - "id": 12858, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 12872, - "src": "17081:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12857, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17081:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 12866, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 12864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17128:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 12862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12844, - "src": "17120:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12859, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12842, - "src": "17099:9:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 12860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:14:11", - "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": 12861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17099:20:11", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 12863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:28:11", - "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": 12865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17099:32:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17080:51:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12868, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12858, - "src": "17149:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 12869, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17158:60:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 12867, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "17141:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:78:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12871, - "nodeType": "ExpressionStatement", - "src": "17141:78:11" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 12873, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12842, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16880:25:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 12841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:15:11", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12844, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 12873, - "src": "16907:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16907:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16879:43:11" - }, - "returnParameters": { - "id": 12846, - "nodeType": "ParameterList", - "parameters": [], - "src": "16932:0:11" - }, - "scope": 12874, - "src": "16861:365:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 13816, - "src": "14309:2919:11" - }, - { - "id": 12875, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17290:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 13090, - "linearizedBaseContracts": [ - 13090 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12878, - "libraryName": { - "contractScope": null, - "id": 12876, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "17805:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17799:27:11", - "typeName": { - "id": 12877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 12881, - "libraryName": { - "contractScope": null, - "id": 12879, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12874, - "src": "17837:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$12874", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17831:26:11", - "typeName": { - "id": 12880, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17849:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 12902, - "nodeType": "Block", - "src": "17935:102:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12891, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17964:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12894, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12883, - "src": "17994:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12747, - "src": "17994:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17994:23:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12897, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12885, - "src": "18019:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12898, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12887, - "src": "18023:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12892, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "17971:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17971:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17971:58:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12890, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "17945:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17945:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12901, - "nodeType": "ExpressionStatement", - "src": "17945:85:11" - } - ] - }, - "documentation": null, - "id": 12903, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12888, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12883, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17885:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12882, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "17885:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12885, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17899:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17899:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12887, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12903, - "src": "17911:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17911:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17884:41:11" - }, - "returnParameters": { - "id": 12889, - "nodeType": "ParameterList", - "parameters": [], - "src": "17935:0:11" - }, - "scope": 13090, - "src": "17863:174:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12927, - "nodeType": "Block", - "src": "18133:112:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12915, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18162:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12918, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12905, - "src": "18192:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12783, - "src": "18192:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 12920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18192:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12921, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12907, - "src": "18221:4:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12922, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12909, - "src": "18227:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12923, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12911, - "src": "18231:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12916, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18169:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18169:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18169:68:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12914, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18143:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18143:95:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12926, - "nodeType": "ExpressionStatement", - "src": "18143:95:11" - } - ] - }, - "documentation": null, - "id": 12928, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12905, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18069:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12904, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18069:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12907, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18083:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12906, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18083:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12909, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18097:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18097:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12911, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12928, - "src": "18109:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18109:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18068:55:11" - }, - "returnParameters": { - "id": 12913, - "nodeType": "ParameterList", - "parameters": [], - "src": "18133:0:11" - }, - "scope": 13090, - "src": "18043:202:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12968, - "nodeType": "Block", - "src": "18327:536:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12938, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18616:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18625:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18616:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12941, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18615:12:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12945, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "18656:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18648:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18648:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12947, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18663:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12942, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18632:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18632:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18632:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 12949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18675:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18632:44:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 12951, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18631:46:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18615:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 12953, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18691:56:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 12937, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18607:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18607:150:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12955, - "nodeType": "ExpressionStatement", - "src": "18607:150:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12957, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18786:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12960, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12930, - "src": "18816:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "18816:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12963, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12932, - "src": "18840:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12964, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12934, - "src": "18849:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12958, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "18793:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12959, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18793:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 12965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:62:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12956, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "18767:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 12966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18767:89:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12967, - "nodeType": "ExpressionStatement", - "src": "18767:89:11" - } - ] - }, - "documentation": null, - "id": 12969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12935, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12930, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18272:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12929, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18272:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12932, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18286:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18286:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12934, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12969, - "src": "18303:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18303:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18271:46:11" - }, - "returnParameters": { - "id": 12936, - "nodeType": "ParameterList", - "parameters": [], - "src": "18327:0:11" - }, - "scope": 13090, - "src": "18251:612:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13003, - "nodeType": "Block", - "src": "18955:196:11", - "statements": [ - { - "assignments": [ - 12979 - ], - "declarations": [ - { - "constant": false, - "id": 12979, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13003, - "src": "18965:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18965:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12990, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12988, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12975, - "src": "19032:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12983, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19012:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 12982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19004:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19004:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12985, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19019:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12980, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "18988:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "18988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 12986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "18988:43:11", - "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": 12989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18988:50:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18965:73:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12992, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19067:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12995, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12971, - "src": "19097:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 12996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19097:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 12997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19097:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 12998, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12973, - "src": "19121:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12999, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12979, - "src": "19130:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12993, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19074:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19074:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19074:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 12991, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19048:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19048:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13002, - "nodeType": "ExpressionStatement", - "src": "19048:96:11" - } - ] - }, - "documentation": null, - "id": 13004, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12976, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12971, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18900:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 12970, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "18900:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12973, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18914:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18914:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12975, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13004, - "src": "18931:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12974, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18931:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18899:46:11" - }, - "returnParameters": { - "id": 12977, - "nodeType": "ParameterList", - "parameters": [], - "src": "18955:0:11" - }, - "scope": 13090, - "src": "18869:282:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13039, - "nodeType": "Block", - "src": "19243:241:11", - "statements": [ - { - "assignments": [ - 13014 - ], - "declarations": [ - { - "constant": false, - "id": 13014, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 13039, - "src": "19253:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13013, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19253:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13026, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13023, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13010, - "src": "19320:5:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 13024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19327:43:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13018, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19302, - "src": "19300:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - ], - "id": 13017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19292:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13020, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19307:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13015, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19276:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 12763, - "src": "19276:15:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 13021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12470, - "src": "19276:43:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 13025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19276:95:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19253:118:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13028, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19400:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13031, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13006, - "src": "19430:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 12772, - "src": "19430:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 13033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19430:22:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 13034, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13008, - "src": "19454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13035, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13014, - "src": "19463:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13029, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "19407:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19407:22:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 13036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19407:69:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 13027, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13089, - "src": "19381:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 13037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19381:96:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13038, - "nodeType": "ExpressionStatement", - "src": "19381:96:11" - } - ] - }, - "documentation": null, - "id": 13040, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13006, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19188:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13005, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19188:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13008, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19202:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19202:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13010, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 13040, - "src": "19219:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13009, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19219:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19187:46:11" - }, - "returnParameters": { - "id": 13012, - "nodeType": "ParameterList", - "parameters": [], - "src": "19243:0:11" - }, - "scope": 13090, - "src": "19157:327:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 13088, - "nodeType": "Block", - "src": "19936:1026:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13049, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20470:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20462:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 12826, - "src": "20462:25:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 13052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20462:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 13053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20491:33:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 13047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20454:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20454:71:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13055, - "nodeType": "ExpressionStatement", - "src": "20454:71:11" - }, - { - "assignments": [ - 13057, - 13059 - ], - "declarations": [ - { - "constant": false, - "id": 13057, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20596:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 13056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20596:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13059, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 13088, - "src": "20610:23:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13058, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20610:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13066, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13064, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13044, - "src": "20657:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13061, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13042, - "src": "20645:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20637:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:14:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20637:19:11", - "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": 13065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20637:25:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20595:67:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13068, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13057, - "src": "20680:7:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 13069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20689:34:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 13067, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20672:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20672:52:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13071, - "nodeType": "ExpressionStatement", - "src": "20672:52:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13072, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20739:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 13073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20739:17:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13074, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20759:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20739:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13087, - "nodeType": "IfStatement", - "src": "20735:221:11", - "trueBody": { - "id": 13086, - "nodeType": "Block", - "src": "20762:194:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13079, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13059, - "src": "20879:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 13080, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20892:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 13081, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20891:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 13077, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "20868:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 13078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20868:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 13082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20868:30:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 13083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20900:44:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 13076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "20860:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20860:85:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13085, - "nodeType": "ExpressionStatement", - "src": "20860:85:11" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 13089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13042, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19895:12:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13041, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "19895:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13044, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 13089, - "src": "19909:17:11", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 13043, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19909:5:11", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19894:33:11" - }, - "returnParameters": { - "id": 13046, - "nodeType": "ParameterList", - "parameters": [], - "src": "19936:0:11" - }, - "scope": 13090, - "src": "19867:1095:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 13816, - "src": "17775:3189:11" - }, - { - "id": 13091, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21019:23:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13092, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12725, - "src": "21087:7:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$12725", - "typeString": "contract Ownable" - } - }, - "id": 13093, - "nodeType": "InheritanceSpecifier", - "src": "21087:7:11" - } - ], - "contractDependencies": [ - 12613, - 12725 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 13125, - "linearizedBaseContracts": [ - 13125, - 12725, - 12613 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13095, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13125, - "src": "21101:26:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21101:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": null, - "documentation": null, - "id": 13100, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13097, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13100, - "src": "21162:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21162:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21161:16:11" - }, - "returnParameters": { - "id": 13099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21186:0:11" - }, - "scope": 13125, - "src": "21134:53:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13111, - "nodeType": "Block", - "src": "21227:108:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13103, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12601, - "src": "21245:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 13104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21245:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 13105, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21261:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21245:34:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 13107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21281:35:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 13102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "21237:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21237:80:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13109, - "nodeType": "ExpressionStatement", - "src": "21237:80:11" - }, - { - "id": 13110, - "nodeType": "PlaceholderStatement", - "src": "21327:1:11" - } - ] - }, - "documentation": null, - "id": 13112, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13101, - "nodeType": "ParameterList", - "parameters": [], - "src": "21224:2:11" - }, - "src": "21193:142:11", - "visibility": "internal" - }, - { - "body": { - "id": 13123, - "nodeType": "Block", - "src": "21440:57:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13119, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13095, - "src": "21450:18:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13120, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13114, - "src": "21471:19:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21450:40:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 13122, - "nodeType": "ExpressionStatement", - "src": "21450:40:11" - } - ] - }, - "documentation": null, - "id": 13124, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13117, - "modifierName": { - "argumentTypes": null, - "id": 13116, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12658, - "src": "21426:9:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21426:9:11" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13114, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 13124, - "src": "21372:27:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21372:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21371:29:11" - }, - "returnParameters": { - "id": 13118, - "nodeType": "ParameterList", - "parameters": [], - "src": "21440:0:11" - }, - "scope": 13125, - "src": "21341:156:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "21046:453:11" - }, - { - "id": 13126, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21538:23:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13235, - "linearizedBaseContracts": [ - 13235 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 13129, - "libraryName": { - "contractScope": null, - "id": 13127, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12587, - "src": "21604:8:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$12587", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21598:27:11", - "typeName": { - "id": 13128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21617:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 13132, - "libraryName": { - "contractScope": null, - "id": 13130, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13090, - "src": "21636:9:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$13090", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21630:27:11", - "typeName": { - "contractScope": null, - "id": 13131, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21650:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 13137, - "name": "uni_lp", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21663:73:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13133, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "21663:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307845396237306462334532323332344639363246353365353239304362314634614637326339456264", - "id": 13135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21693:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xE9b70db3E22324F962F53e5290Cb1F4aF72c9Ebd" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13134, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "21686:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21686:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13139, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21743:28:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21743:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 13143, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 13235, - "src": "21778:45:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13142, - "keyType": { - "id": 13140, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21786:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21778:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21797:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 13150, - "nodeType": "Block", - "src": "21883:36:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13148, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "21900:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13147, - "id": 13149, - "nodeType": "Return", - "src": "21893:19:11" - } - ] - }, - "documentation": null, - "id": 13151, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13144, - "nodeType": "ParameterList", - "parameters": [], - "src": "21850:2:11" - }, - "returnParameters": { - "id": 13147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13146, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13151, - "src": "21874:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21874:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21873:9:11" - }, - "scope": 13235, - "src": "21830:89:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13162, - "nodeType": "Block", - "src": "21991:42:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13158, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22008:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13160, - "indexExpression": { - "argumentTypes": null, - "id": 13159, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13153, - "src": "22018:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22008:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13157, - "id": 13161, - "nodeType": "Return", - "src": "22001:25:11" - } - ] - }, - "documentation": null, - "id": 13163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13153, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21944:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21944:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21943:17:11" - }, - "returnParameters": { - "id": 13157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13163, - "src": "21982:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21982:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21981:9:11" - }, - "scope": 13235, - "src": "21925:108:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13199, - "nodeType": "Block", - "src": "22077:191:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13168, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22087:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22119:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13169, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22102:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22102:16:11", - "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": 13172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22102:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22087:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13174, - "nodeType": "ExpressionStatement", - "src": "22087:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13175, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22146:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22146:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22136:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13184, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22186:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13179, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22160:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13182, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13180, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22170:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22170:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22160:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "22160:25:11", - "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": 13185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22160:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22136:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13187, - "nodeType": "ExpressionStatement", - "src": "22136:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13191, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22227:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13194, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19306, - "src": "22247:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 13193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22239:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22239:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13196, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13165, - "src": "22254:6:11", - "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, - "id": 13188, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22203:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 12928, - "src": "22203:23:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 13197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22203:58:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13198, - "nodeType": "ExpressionStatement", - "src": "22203:58:11" - } - ] - }, - "documentation": null, - "id": 13200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13165, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13200, - "src": "22054:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22054:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22053:16:11" - }, - "returnParameters": { - "id": 13167, - "nodeType": "ParameterList", - "parameters": [], - "src": "22077:0:11" - }, - "scope": 13235, - "src": "22039:229:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13233, - "nodeType": "Block", - "src": "22315:172:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13205, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22325:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22357:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13206, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13139, - "src": "22340:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22340:16:11", - "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": 13209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22340:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22325:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13211, - "nodeType": "ExpressionStatement", - "src": "22325:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13212, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22374:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13215, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22384:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22384:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22374:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13221, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22424:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13216, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13143, - "src": "22398:9:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13219, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22408:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22408:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22398:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "22398:25:11", - "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": 13222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22398:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22374:57:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13224, - "nodeType": "ExpressionStatement", - "src": "22374:57:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "22461:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22461:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13230, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13202, - "src": "22473:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13225, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "22441:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "22441:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22441:39:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13232, - "nodeType": "ExpressionStatement", - "src": "22441:39:11" - } - ] - }, - "documentation": null, - "id": 13234, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13202, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13234, - "src": "22292:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22292:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22291:16:11" - }, - "returnParameters": { - "id": 13204, - "nodeType": "ParameterList", - "parameters": [], - "src": "22315:0:11" - }, - "scope": 13235, - "src": "22274:213:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 13816, - "src": "21568:921:11" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 13248, - "linearizedBaseContracts": [ - 13248 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 13240, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13236, - "nodeType": "ParameterList", - "parameters": [], - "src": "22537:2:11" - }, - "returnParameters": { - "id": 13239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13238, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13240, - "src": "22558:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22558:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22557:9:11" - }, - "scope": 13248, - "src": "22511:56:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 13247, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13245, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13242, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22586:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13241, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22586:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13244, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13247, - "src": "22598:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22598:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22585:28:11" - }, - "returnParameters": { - "id": 13246, - "nodeType": "ParameterList", - "parameters": [], - "src": "22622:0:11" - }, - "scope": 13248, - "src": "22572:51:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22491:134:11" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13249, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13235, - "src": "22655:14:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$13235", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 13250, - "nodeType": "InheritanceSpecifier", - "src": "22655:14:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 13251, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 13125, - "src": "22671:28:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$13125", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 13252, - "nodeType": "InheritanceSpecifier", - "src": "22671:28:11" - } - ], - "contractDependencies": [ - 12613, - 12725, - 13125, - 13235 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 13815, - "linearizedBaseContracts": [ - 13815, - 13125, - 12725, - 12613, - 13235 - ], - "name": "YAMIncentivizer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13257, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22706:70:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13253, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "22706:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 13255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22733:42:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13254, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12800, - "src": "22726:6:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$12800_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 13256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22726:50:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 13260, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22782:41:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13258, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22782:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 13259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22817:6:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13271, - "name": "initreward", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22830:47:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13261, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22830:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - }, - "id": 13270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - }, - "id": 13266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 13262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22858:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - }, - "id": 13265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22863:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 13264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22867:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "22863:5:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000_by_1", - "typeString": "int_const 100000" - } - }, - "src": "22858:10:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000_by_1", - "typeString": "int_const 1500000" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22871:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22875:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "22871:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "22858:19:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1500000000000000000000000_by_1", - "typeString": "int_const 1500000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13276, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22891:48:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13272, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22891:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - }, - "id": 13275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 13273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22918:10:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 13274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22931:8:11", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "24" - }, - "src": "22918:21:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1598017600_by_1", - "typeString": "int_const 1598017600" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13279, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "22983:31:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13277, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22983:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23013:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13282, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23020:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23020:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 13281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23048:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 13284, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23055:29:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13283, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23055:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13286, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23090:35:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13285, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23090:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13290, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23131:57:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13289, - "keyType": { - "id": 13287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23139:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23131:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23150:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13294, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 13815, - "src": "23194:42:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 13293, - "keyType": { - "id": 13291, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23202:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "23194:27:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 13292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23213:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 13298, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 13297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13296, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13298, - "src": "23262:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13295, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23262:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23261:16:11" - }, - "src": "23244:34:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13304, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 13303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13300, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23296:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23296:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13302, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13304, - "src": "23318:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23318:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23295:38:11" - }, - "src": "23283:51:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13310, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 13309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13306, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23355:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13305, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23355:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13308, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13310, - "src": "23377:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23377:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23354:38:11" - }, - "src": "23339:54:11" - }, - { - "anonymous": false, - "documentation": null, - "id": 13316, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 13315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13312, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23415:20:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13311, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23415:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13314, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13316, - "src": "23437:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23437:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23414:38:11" - }, - "src": "23398:55:11" - }, - { - "body": { - "id": 13352, - "nodeType": "Block", - "src": "23498:283:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13320, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23508:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13321, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "23531:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23531:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23508:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13324, - "nodeType": "ExpressionStatement", - "src": "23508:39:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13325, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "23557:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13326, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "23574:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23574:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23557:43:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13329, - "nodeType": "ExpressionStatement", - "src": "23557:43:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13330, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23614:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23633:1:11", - "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": 13331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23625:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23625:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23614:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13350, - "nodeType": "IfStatement", - "src": "23610:154:11", - "trueBody": { - "id": 13349, - "nodeType": "Block", - "src": "23637:127:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13335, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "23651:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13337, - "indexExpression": { - "argumentTypes": null, - "id": 13336, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23659:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23651:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13339, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23677:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13338, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "23670:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23670:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23651:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13342, - "nodeType": "ExpressionStatement", - "src": "23651:34:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13343, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "23699:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13345, - "indexExpression": { - "argumentTypes": null, - "id": 13344, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13318, - "src": "23722:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23699:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13346, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "23733:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23699:54:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13348, - "nodeType": "ExpressionStatement", - "src": "23699:54:11" - } - ] - } - }, - { - "id": 13351, - "nodeType": "PlaceholderStatement", - "src": "23773:1:11" - } - ] - }, - "documentation": null, - "id": 13353, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13318, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13353, - "src": "23481:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23481:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23480:17:11" - }, - "src": "23459:322:11", - "visibility": "internal" - }, - { - "body": { - "id": 13365, - "nodeType": "Block", - "src": "23853:63:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13360, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "23879:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23879:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 13362, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "23896:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13358, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12401, - "src": "23870:4:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$12401_$", - "typeString": "type(library Math)" - } - }, - "id": 13359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 12368, - "src": "23870:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 13363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23870:39:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13357, - "id": 13364, - "nodeType": "Return", - "src": "23863:46:11" - } - ] - }, - "documentation": null, - "id": 13366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13354, - "nodeType": "ParameterList", - "parameters": [], - "src": "23820:2:11" - }, - "returnParameters": { - "id": 13357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13356, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13366, - "src": "23844:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13355, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23844:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23843:9:11" - }, - "scope": 13815, - "src": "23787:129:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13398, - "nodeType": "Block", - "src": "23978:352:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13371, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "23992:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23992:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24009:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23992:18:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13378, - "nodeType": "IfStatement", - "src": "23988:76:11", - "trueBody": { - "id": 13377, - "nodeType": "Block", - "src": "24012:52:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13375, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24033:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13376, - "nodeType": "Return", - "src": "24026:27:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13393, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13151, - "src": "24295:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24295:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24264:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13387, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "24227:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13384, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "24186:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13381, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13366, - "src": "24134:24:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24134:51:11", - "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": 13385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:92:11", - "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": 13388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:104:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24134:129:11", - "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": 13391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:135:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24134:160:11", - "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": 13395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24134:175:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13379, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13286, - "src": "24092:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24092:24:11", - "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": 13396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24092:231:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13370, - "id": 13397, - "nodeType": "Return", - "src": "24073:250:11" - } - ] - }, - "documentation": null, - "id": 13399, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13367, - "nodeType": "ParameterList", - "parameters": [], - "src": "23945:2:11" - }, - "returnParameters": { - "id": 13370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13369, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13399, - "src": "23969:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13368, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23969:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23968:9:11" - }, - "scope": 13815, - "src": "23922:408:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13427, - "nodeType": "Block", - "src": "24399:196:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13422, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "24571:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13424, - "indexExpression": { - "argumentTypes": null, - "id": 13423, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24579:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24571:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 13419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24544:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13413, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13290, - "src": "24489:22:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13415, - "indexExpression": { - "argumentTypes": null, - "id": 13414, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24512:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24489:31:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13410, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13399, - "src": "24468:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 13411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "24468:20:11", - "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": 13416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24468:53:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13407, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13401, - "src": "24438:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13406, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "24428:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "24428:39:11", - "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": 13417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:94:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "24428:115:11", - "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": 13420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:121:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "24428:142:11", - "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": 13425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24428:160:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 13405, - "id": 13426, - "nodeType": "Return", - "src": "24409:179:11" - } - ] - }, - "documentation": null, - "id": 13428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13401, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24352:15:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24352:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24351:17:11" - }, - "returnParameters": { - "id": 13405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 13428, - "src": "24390:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24390:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24389:9:11" - }, - "scope": 13815, - "src": "24336:259:11", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13460, - "nodeType": "Block", - "src": "24768:124:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13442, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24786:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24795:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24786:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 13445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24798:16:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 13441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24778:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24778:37:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13447, - "nodeType": "ExpressionStatement", - "src": "24778:37:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13451, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24837:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13448, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "24825:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 13200, - "src": "24825:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24825:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13453, - "nodeType": "ExpressionStatement", - "src": "24825:19:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24866:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24866:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13457, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13430, - "src": "24878:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13454, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13304, - "src": "24859:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24859:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13459, - "nodeType": "EmitStatement", - "src": "24854:31:11" - } - ] - }, - "documentation": null, - "id": 13461, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13433, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24734:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24734:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13435, - "modifierName": { - "argumentTypes": null, - "id": 13432, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24721:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24721:24:11" - }, - { - "arguments": null, - "id": 13437, - "modifierName": { - "argumentTypes": null, - "id": 13436, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "24746:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24746:10:11" - }, - { - "arguments": null, - "id": 13439, - "modifierName": { - "argumentTypes": null, - "id": 13438, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24757:10:11" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13430, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13461, - "src": "24698:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24698:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24697:16:11" - }, - "returnParameters": { - "id": 13440, - "nodeType": "ParameterList", - "parameters": [], - "src": "24768:0:11" - }, - "scope": 13815, - "src": "24683:209:11", - "stateMutability": "nonpayable", - "superFunction": 13200, - "visibility": "public" - }, - { - "body": { - "id": 13491, - "nodeType": "Block", - "src": "24975:133:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13473, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "24993:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25002:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24993:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 13476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25005:19:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 13472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "24985:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24985:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13478, - "nodeType": "ExpressionStatement", - "src": "24985:40:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13482, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25050:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13479, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19311, - "src": "25035:5:11", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMIncentivizer_$13815", - "typeString": "contract super YAMIncentivizer" - } - }, - "id": 13481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 13234, - "src": "25035:14:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25035:22:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13484, - "nodeType": "ExpressionStatement", - "src": "25035:22:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13486, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25082:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25082:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13488, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13463, - "src": "25094:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13485, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13310, - "src": "25072:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25072:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13490, - "nodeType": "EmitStatement", - "src": "25067:34:11" - } - ] - }, - "documentation": null, - "id": 13492, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13466, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "24952:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13468, - "modifierName": { - "argumentTypes": null, - "id": 13465, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "24939:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24939:24:11" - }, - { - "arguments": null, - "id": 13470, - "modifierName": { - "argumentTypes": null, - "id": 13469, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "24964:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24964:10:11" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13463, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13492, - "src": "24916:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24916:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24915:16:11" - }, - "returnParameters": { - "id": 13471, - "nodeType": "ParameterList", - "parameters": [], - "src": "24975:0:11" - }, - "scope": 13815, - "src": "24898:210:11", - "stateMutability": "nonpayable", - "superFunction": 13234, - "visibility": "public" - }, - { - "body": { - "id": 13505, - "nodeType": "Block", - "src": "25139:69:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25168:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25168:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13496, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13163, - "src": "25158:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25158:21:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13495, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13492 - ], - "referencedDeclaration": 13492, - "src": "25149:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25149:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13501, - "nodeType": "ExpressionStatement", - "src": "25149:31:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13502, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13573, - "src": "25190:9:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 13503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25190:11:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13504, - "nodeType": "ExpressionStatement", - "src": "25190:11:11" - } - ] - }, - "documentation": null, - "id": 13506, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13493, - "nodeType": "ParameterList", - "parameters": [], - "src": "25127:2:11" - }, - "returnParameters": { - "id": 13494, - "nodeType": "ParameterList", - "parameters": [], - "src": "25139:0:11" - }, - "scope": 13815, - "src": "25114:94:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 13572, - "nodeType": "Block", - "src": "25289:379:11", - "statements": [ - { - "assignments": [ - 13518 - ], - "declarations": [ - { - "constant": false, - "id": 13518, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13572, - "src": "25299:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25299:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13523, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13520, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25323:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25323:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 13519, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13428, - "src": "25316:6:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 13522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25316:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25299:35:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13524, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25348:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25357:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25348:10:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13571, - "nodeType": "IfStatement", - "src": "25344:318:11", - "trueBody": { - "id": 13570, - "nodeType": "Block", - "src": "25360:302:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 13527, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13294, - "src": "25374:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 13530, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25382:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25382:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25374:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 13531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25396:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25374:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13533, - "nodeType": "ExpressionStatement", - "src": "25374:23:11" - }, - { - "assignments": [ - 13535 - ], - "declarations": [ - { - "constant": false, - "id": 13535, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25411:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25411:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13543, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13538, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25447:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13537, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25439:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25439:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13536, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25435:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25435:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25435:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25411:61:11" - }, - { - "assignments": [ - 13545 - ], - "declarations": [ - { - "constant": false, - "id": 13545, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 13570, - "src": "25486:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13544, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25486:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13555, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25537:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25541:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25537:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13548, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13535, - "src": "25518:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13546, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13518, - "src": "25507:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25507:10:11", - "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": 13549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25507:29:11", - "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": 13554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25507:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25486:58:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25575:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25575:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13561, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25587:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13556, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25558:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "25558:16:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25558:40:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13563, - "nodeType": "ExpressionStatement", - "src": "25558:40:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13565, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25628:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25628:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 13567, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13545, - "src": "25640:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13564, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13316, - "src": "25617:10:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 13568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25617:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13569, - "nodeType": "EmitStatement", - "src": "25612:39:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13573, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13509, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "25255:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25255:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13511, - "modifierName": { - "argumentTypes": null, - "id": 13508, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "25242:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25242:24:11" - }, - { - "arguments": null, - "id": 13513, - "modifierName": { - "argumentTypes": null, - "id": 13512, - "name": "checkhalve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13643, - "src": "25267:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25267:10:11" - }, - { - "arguments": null, - "id": 13515, - "modifierName": { - "argumentTypes": null, - "id": 13514, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13655, - "src": "25278:10:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25278:10:11" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13507, - "nodeType": "ParameterList", - "parameters": [], - "src": "25232:2:11" - }, - "returnParameters": { - "id": 13516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25289:0:11" - }, - "scope": 13815, - "src": "25214:454:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 13642, - "nodeType": "Block", - "src": "25696:481:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13575, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "25710:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25710:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13577, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "25729:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25710:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 13640, - "nodeType": "IfStatement", - "src": "25706:454:11", - "trueBody": { - "id": 13639, - "nodeType": "Block", - "src": "25743:417:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13579, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25757:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "313030", - "id": 13585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25793:3:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "3530", - "id": 13582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25785:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - } - ], - "expression": { - "argumentTypes": null, - "id": 13580, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25770:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25770:14:11", - "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": 13583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:18:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25770:22:11", - "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": 13586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25770:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25757:40:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13588, - "nodeType": "ExpressionStatement", - "src": "25757:40:11" - }, - { - "assignments": [ - 13590 - ], - "declarations": [ - { - "constant": false, - "id": 13590, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25811:21:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25811:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13598, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13593, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25847:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - ], - "id": 13592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25839:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25839:12:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 13591, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13248, - "src": "25835:3:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$13248_$", - "typeString": "type(contract YAM)" - } - }, - "id": 13595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:17:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$13248", - "typeString": "contract YAM" - } - }, - "id": 13596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 13240, - "src": "25835:35:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 13597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25811:61:11" - }, - { - "assignments": [ - 13600 - ], - "declarations": [ - { - "constant": false, - "id": 13600, - "name": "newRewards", - "nodeType": "VariableDeclaration", - "scope": 13639, - "src": "25886:18:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13599, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13610, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 13608, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 13606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25941:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25945:2:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25941:6:11", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13603, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13590, - "src": "25922:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13601, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "25907:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "25907:14:11", - "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": 13604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "25907:33:11", - "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": 13609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25907:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25886:62:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13615, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "25979:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13614, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25971:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25971:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13617, - "name": "newRewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13600, - "src": "25986:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13611, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "25962:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "25962:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25962:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13619, - "nodeType": "ExpressionStatement", - "src": "25962:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13620, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26012:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13623, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26040:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13621, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26025:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26025:14:11", - "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": 13624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26025:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26012:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13626, - "nodeType": "ExpressionStatement", - "src": "26012:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13627, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26063:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13631, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13628, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26078:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26078:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26078:19:11", - "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": 13632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26078:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26063:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13634, - "nodeType": "ExpressionStatement", - "src": "26063:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13636, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "26138:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13635, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26126:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26126:23:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13638, - "nodeType": "EmitStatement", - "src": "26121:28:11" - } - ] - } - }, - { - "id": 13641, - "nodeType": "PlaceholderStatement", - "src": "26169:1:11" - } - ] - }, - "documentation": null, - "id": 13643, - "name": "checkhalve", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13574, - "nodeType": "ParameterList", - "parameters": [], - "src": "25693:2:11" - }, - "src": "25674:503:11", - "visibility": "internal" - }, - { - "body": { - "id": 13654, - "nodeType": "Block", - "src": "26204:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13646, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26222:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26222:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13648, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26241:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26222:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 13650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26251:11:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 13645, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26214:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26214:49:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13652, - "nodeType": "ExpressionStatement", - "src": "26214:49:11" - }, - { - "id": 13653, - "nodeType": "PlaceholderStatement", - "src": "26273:1:11" - } - ] - }, - "documentation": null, - "id": 13655, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 13644, - "nodeType": "ParameterList", - "parameters": [], - "src": "26202:2:11" - }, - "src": "26183:98:11", - "visibility": "internal" - }, - { - "body": { - "id": 13773, - "nodeType": "Block", - "src": "26417:831:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13667, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26431:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26431:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 13669, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "26449:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26431:27:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13771, - "nodeType": "Block", - "src": "26934:308:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13732, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "26976:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26968:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26968:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 13729, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "26954:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 12738, - "src": "26954:13:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 13734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26954:28:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 13735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26986:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26954:33:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 13737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26989:21:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 13728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26946:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26946:65:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13739, - "nodeType": "ExpressionStatement", - "src": "26946:65:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13744, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19310, - "src": "27040:4:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMIncentivizer_$13815", - "typeString": "contract YAMIncentivizer" - } - ], - "id": 13743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "27032:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27032:13:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13746, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27047:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13740, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27023:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 12754, - "src": "27023:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" - } - }, - "id": 13747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27023:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13748, - "nodeType": "ExpressionStatement", - "src": "27023:35:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13749, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "27070:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13752, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27098:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13750, - "name": "initreward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13271, - "src": "27083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "27083:14:11", - "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": 13753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27083:24:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27070:37:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13755, - "nodeType": "ExpressionStatement", - "src": "27070:37:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13756, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "27119:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 13757, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27136:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27119:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13759, - "nodeType": "ExpressionStatement", - "src": "27119:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13760, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "27157:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13763, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "27186:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13761, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13276, - "src": "27172:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "27172:13:11", - "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": 13764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27172:23:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27157:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13766, - "nodeType": "ExpressionStatement", - "src": "27157:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13768, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "27224:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13767, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "27212:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27212:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13770, - "nodeType": "EmitStatement", - "src": "27207:24:11" - } - ] - }, - "id": 13772, - "nodeType": "IfStatement", - "src": "26427:815:11", - "trueBody": { - "id": 13727, - "nodeType": "Block", - "src": "26460:468:11", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13671, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26476:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26476:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 13673, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26495:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26476:31:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 13708, - "nodeType": "Block", - "src": "26577:205:11", - "statements": [ - { - "assignments": [ - 13684 - ], - "declarations": [ - { - "constant": false, - "id": 13684, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26593:17:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26593:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13690, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26630:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26630:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13685, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26613:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 12443, - "src": "26613:16:11", - "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": 13689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26613:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26593:53:11" - }, - { - "assignments": [ - 13692 - ], - "declarations": [ - { - "constant": false, - "id": 13692, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 13708, - "src": "26662:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13691, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26662:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 13697, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13695, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26695:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13693, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13684, - "src": "26681:9:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 12504, - "src": "26681:13:11", - "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": 13696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26681:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "26662:44:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13698, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26722:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13704, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26760:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13701, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13692, - "src": "26746:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13699, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26735:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26735:10:11", - "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": 13702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26735:24:11", - "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": 13705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26735:34:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26722:47:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13707, - "nodeType": "ExpressionStatement", - "src": "26722:47:11" - } - ] - }, - "id": 13709, - "nodeType": "IfStatement", - "src": "26472:310:11", - "trueBody": { - "id": 13682, - "nodeType": "Block", - "src": "26509:62:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 13680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13675, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13282, - "src": "26525:10:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13678, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26549:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13676, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26538:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 12520, - "src": "26538:10:11", - "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": 13679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26538:20:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26525:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13681, - "nodeType": "ExpressionStatement", - "src": "26525:33:11" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 13713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13710, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13284, - "src": "26793:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13711, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26810:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26810:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26793:32:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13714, - "nodeType": "ExpressionStatement", - "src": "26793:32:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 13721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 13715, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13279, - "src": "26837:12:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13719, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13260, - "src": "26872:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13716, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "26852:5:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 13717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26852:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 12427, - "src": "26852:19:11", - "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": 13720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26852:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26837:44:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 13722, - "nodeType": "ExpressionStatement", - "src": "26837:44:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13724, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13657, - "src": "26910:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 13723, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13298, - "src": "26898:11:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 13725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26898:19:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13726, - "nodeType": "EmitStatement", - "src": "26893:24:11" - } - ] - } - } - ] - }, - "documentation": null, - "id": 13774, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13660, - "modifierName": { - "argumentTypes": null, - "id": 13659, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13112, - "src": "26357:22:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26357:22:11" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 13663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26409:1:11", - "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": 13662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26401:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 13664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26401:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 13665, - "modifierName": { - "argumentTypes": null, - "id": 13661, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13353, - "src": "26388:12:11", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "26388:24:11" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13657, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 13774, - "src": "26316:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "26316:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26315:16:11" - }, - "returnParameters": { - "id": 13666, - "nodeType": "ParameterList", - "parameters": [], - "src": "26417:0:11" - }, - "scope": 13815, - "src": "26288:960:11", - "stateMutability": "nonpayable", - "superFunction": 13100, - "visibility": "external" - }, - { - "body": { - "id": 13813, - "nodeType": "Block", - "src": "27707:299:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 13788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 13784, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "27745:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27745:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 13786, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12648, - "src": "27759:5:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 13787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27759:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "27745:21:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21676f7665726e616e6365", - "id": 13789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27768:13:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - }, - "value": "!governance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f73661b4d145377a2dec6f2054dd3fa962e4f6aa4f53299d299497514d5311f", - "typeString": "literal_string \"!governance\"" - } - ], - "id": 13783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27737:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27737:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13791, - "nodeType": "ExpressionStatement", - "src": "27737:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13793, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27834:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13794, - "name": "uni_lp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13137, - "src": "27844:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27834:16:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "756e695f6c70", - "id": 13796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27852:8:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - }, - "value": "uni_lp" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3f7c1013f5e048e9cc9a45c9a729d91cdc44a26de0e908d6ebb912622035bfab", - "typeString": "literal_string \"uni_lp\"" - } - ], - "id": 13792, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27826:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27826:35:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13798, - "nodeType": "ExpressionStatement", - "src": "27826:35:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "id": 13802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 13800, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27913:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 13801, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13257, - "src": "27923:3:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "src": "27913:13:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "79616d", - "id": 13803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27928:5:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - }, - "value": "yam" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5fcbaa9ed3d30a52ad40fb344f3a6df60089c137e017321a941f7f846fd016d", - "typeString": "literal_string \"yam\"" - } - ], - "id": 13799, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27905:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 13804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27905:29:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13805, - "nodeType": "ExpressionStatement", - "src": "27905:29:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 13809, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13780, - "src": "27988:2:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 13810, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13778, - "src": "27992:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 13806, - "name": "_token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13776, - "src": "27968:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "id": 13808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 12903, - "src": "27968:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12800_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$12800_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 13811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27968:31:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 13812, - "nodeType": "ExpressionStatement", - "src": "27968:31:11" - } - ] - }, - "documentation": null, - "id": 13814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "governanceRecoverUnsupported", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13781, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 13776, - "name": "_token", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27643:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 13775, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12800, - "src": "27643:6:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$12800", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13778, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27658:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "27658:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13780, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 13814, - "src": "27674:10:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 13779, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27674:7:11", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27642:43:11" - }, - "returnParameters": { - "id": 13782, - "nodeType": "ParameterList", - "parameters": [], - "src": "27707:0:11" - }, - "scope": 13815, - "src": "27605:401:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 13816, - "src": "22627:5381:11" - } - ], - "src": "1627:26382:11" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0xdD625adC58bA19cffCeF55cF41459F4564454133", - "transactionHash": "0x02ef473f880a630c3cfcd8611f9a1aa13bd137ceb0b399931aec93f982c12cf1" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.741Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMInterface.json b/build/contracts/YAMInterface.json deleted file mode 100644 index 26664c4..0000000 --- a/build/contracts/YAMInterface.json +++ /dev/null @@ -1,34291 +0,0 @@ -{ - "contractName": "YAMInterface", - "abi": [ - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol\":\"YAMInterface\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol\":{\"keccak256\":\"0xe33570626516b9d9723cdbf39fb280fbcb93e2bab6ef12c50caff7b83b6e5cba\",\"urls\":[\"bzz-raw://28ce1776967b85b9a12e2aaaf272f956ed88f0ea720f9b91090ee0b2ffb8b7a4\",\"dweb:/ipfs/QmRbswdZGcxpfpy26K8KEdnoPDTVzBwDEDHULgdTbqopRF\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity ^0.5.17;\npragma experimental ABIEncoderV2;\n\n// Original work from Compound: https://github.com/yamound-finance/yamound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol\n// Modified to work in the YAM system\n\n// all votes work on underlying _yamBalances[address], not balanceOf(address)\n\n// Original audit: https://blog.openzeppelin.com/compound-alpha-governance-system-audit/\n// Overview:\n// No Critical\n// High:\n// Issue:\n// Approved proposal may be impossible to queue, cancel or execute\n// Fixed with `proposalMaxOperations`\n// Issue:\n// Queued proposal with repeated actions cannot be executed\n// Fixed by explicitly disallow proposals with repeated actions to be queued in the Timelock contract.\n//\n// Changes made by YAM after audit:\n// Formatting, naming, & uint256 instead of uint\n// Since YAM supply changes, updated quorum & proposal requirements\n// If any uint96, changed to uint256 to match YAM as opposed to comp\n\n\nimport \"../lib/SafeMath.sol\";\n\ncontract GovernorAlpha {\n /// @notice The name of this contract\n string public constant name = \"YAM Governor Alpha\";\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n function quorumVotes() public view returns (uint256) { return SafeMath.div(SafeMath.mul(yam.initSupply(), 4), 100); } // 4% of YAM\n\n /// @notice The number of votes required in order for a voter to become a proposer\n function proposalThreshold() public view returns (uint256) { return SafeMath.div(yam.initSupply(), 100); } // 1% of YAM\n\n /// @notice The maximum number of actions that can be included in a proposal\n function proposalMaxOperations() public pure returns (uint256) { return 10; } // 10 actions\n\n /// @notice The delay before voting on a proposal may take place, once proposed\n function votingDelay() public pure returns (uint256) { return 1; } // 1 block\n\n /// @notice The duration of voting on a proposal, in blocks\n function votingPeriod() public pure returns (uint256) { return 17280; } // ~3 days in blocks (assuming 15s blocks)\n\n /// @notice The address of the Compound Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Compound governance token\n YAMInterface public yam;\n\n /// @notice The address of the Governor Guardian\n address public guardian;\n\n /// @notice The total number of proposals\n uint256 public proposalCount;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint256 id;\n\n /// @notice Creator of the proposal\n address proposer;\n\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint256 eta;\n\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint256 startBlock;\n\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint256 endBlock;\n\n /// @notice Current number of votes in favor of this proposal\n uint256 forVotes;\n\n /// @notice Current number of votes in opposition to this proposal\n uint256 againstVotes;\n\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n\n /// @notice Receipts of ballots for the entire set of voters\n mapping (address => Receipt) receipts;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n\n /// @notice Whether or not the voter supports the proposal\n bool support;\n\n /// @notice The number of votes the voter had, which were cast\n uint256 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The official record of all proposals ever proposed\n mapping (uint256 => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping (address => uint256) public latestProposalIds;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,bool support)\");\n\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(uint256 id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description);\n\n /// @notice An event emitted when a vote has been cast on a proposal\n event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint256 id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint256 id, uint256 eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint256 id);\n\n constructor(address timelock_, address yam_) public {\n timelock = TimelockInterface(timelock_);\n yam = YAMInterface(yam_);\n guardian = msg.sender;\n }\n\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description\n )\n public\n returns (uint256)\n {\n require(yam.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), \"GovernorAlpha::propose: proposer votes below proposal threshold\");\n require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, \"GovernorAlpha::propose: proposal function information arity mismatch\");\n require(targets.length != 0, \"GovernorAlpha::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations(), \"GovernorAlpha::propose: too many actions\");\n\n uint256 latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(proposersLatestProposalState != ProposalState.Active, \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\");\n require(proposersLatestProposalState != ProposalState.Pending, \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\");\n }\n\n uint256 startBlock = add256(block.number, votingDelay());\n uint256 endBlock = add256(startBlock, votingPeriod());\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n canceled: false,\n executed: false\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description\n );\n return newProposal.id;\n }\n\n function queue(uint256 proposalId)\n public\n {\n require(state(proposalId) == ProposalState.Succeeded, \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\");\n Proposal storage proposal = proposals[proposalId];\n uint256 eta = add256(block.timestamp, timelock.delay());\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n _queueOrRevert(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function _queueOrRevert(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n )\n internal\n {\n require(!timelock.queuedTransactions(\n keccak256(\n abi.encode(\n target,\n value,\n signature,\n data,\n eta\n )\n )\n ),\n \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"\n );\n\n timelock.queueTransaction(target, value, signature, data, eta);\n }\n\n function execute(uint256 proposalId)\n public\n payable\n {\n require(state(proposalId) == ProposalState.Queued, \"GovernorAlpha::execute: proposal can only be executed if it is queued\");\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n emit ProposalExecuted(proposalId);\n }\n\n function cancel(uint256 proposalId)\n public\n {\n ProposalState state = state(proposalId);\n require(state != ProposalState.Executed, \"GovernorAlpha::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(msg.sender == guardian || yam.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), \"GovernorAlpha::cancel: proposer above threshold\");\n\n proposal.canceled = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n function getActions(uint256 proposalId)\n public\n view\n returns (\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas\n )\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n function getReceipt(uint256 proposalId, address voter)\n public\n view\n returns (Receipt memory)\n {\n return proposals[proposalId].receipts[voter];\n }\n\n function state(uint256 proposalId)\n public\n view\n returns (ProposalState)\n {\n require(proposalCount >= proposalId && proposalId > 0, \"GovernorAlpha::state: invalid proposal id\");\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n function castVote(uint256 proposalId, bool support)\n public\n {\n return _castVote(msg.sender, proposalId, support);\n }\n\n function castVoteBySig(\n uint256 proposalId,\n bool support,\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n public\n {\n bytes32 domainSeparator = keccak256(\n abi.encode(\n DOMAIN_TYPEHASH,\n keccak256(bytes(name)),\n getChainId(),\n address(this)\n )\n );\n\n bytes32 structHash = keccak256(\n abi.encode(\n BALLOT_TYPEHASH,\n proposalId,\n support\n )\n );\n\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n domainSeparator,\n structHash\n )\n );\n\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorAlpha::castVoteBySig: invalid signature\");\n return _castVote(signatory, proposalId, support);\n }\n\n function _castVote(\n address voter,\n uint256 proposalId,\n bool support\n )\n internal\n {\n require(state(proposalId) == ProposalState.Active, \"GovernorAlpha::_castVote: voting is closed\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorAlpha::_castVote: voter already voted\");\n uint256 votes = yam.getPriorVotes(voter, proposal.startBlock);\n\n if (support) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n emit VoteCast(voter, proposalId, support, votes);\n }\n\n function __acceptAdmin()\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\");\n timelock.acceptAdmin();\n }\n\n function __abdicate()\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__abdicate: sender must be gov guardian\");\n guardian = address(0);\n }\n\n function __queueSetTimelockPendingAdmin(\n address newPendingAdmin,\n uint256 eta\n )\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.queueTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function __executeSetTimelockPendingAdmin(\n address newPendingAdmin,\n uint256 eta\n )\n public\n {\n require(msg.sender == guardian, \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.executeTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainId() internal pure returns (uint256) {\n uint256 chainId;\n assembly { chainId := chainid() }\n return chainId;\n }\n}\n\ninterface TimelockInterface {\n function delay() external view returns (uint256);\n function GRACE_PERIOD() external view returns (uint256);\n function acceptAdmin() external;\n function queuedTransactions(bytes32 hash) external view returns (bool);\n function queueTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external returns (bytes32);\n function cancelTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external;\n function executeTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external payable returns (bytes memory);\n}\n\ninterface YAMInterface {\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256);\n function initSupply() external view returns (uint256);\n function _acceptGov() external;\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "exportedSymbols": { - "GovernorAlpha": [ - 12250 - ], - "TimelockInterface": [ - 12314 - ], - "YAMInterface": [ - 12332 - ] - }, - "id": 12333, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 11066, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "id": 11067, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:10" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 11068, - "nodeType": "ImportDirective", - "scope": 12333, - "sourceUnit": 14993, - "src": "1007:29:10", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12250, - "linearizedBaseContracts": [ - 12250 - ], - "name": "GovernorAlpha", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 11071, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "1109:50:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 11069, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1109:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "59414d20476f7665726e6f7220416c706861", - "id": 11070, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1139:20:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9", - "typeString": "literal_string \"YAM Governor Alpha\"" - }, - "value": "YAM Governor Alpha" - }, - "visibility": "public" - }, - { - "body": { - "id": 11088, - "nodeType": "Block", - "src": "1351:64:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11080, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1386:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1386:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1386:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "34", - "id": 11083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1404:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 11078, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1373:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:33:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11076, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1360:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1360:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11075, - "id": 11087, - "nodeType": "Return", - "src": "1353:59:10" - } - ] - }, - "documentation": "@notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed", - "id": 11089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "quorumVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11072, - "nodeType": "ParameterList", - "parameters": [], - "src": "1318:2:10" - }, - "returnParameters": { - "id": 11075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11074, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11089, - "src": "1342:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1342:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1341:9:10" - }, - "scope": 12250, - "src": "1298:117:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11102, - "nodeType": "Block", - "src": "1580:47:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11096, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1602:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1602:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1602:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1620:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11094, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1589:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1589:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11093, - "id": 11101, - "nodeType": "Return", - "src": "1582:42:10" - } - ] - }, - "documentation": "@notice The number of votes required in order for a voter to become a proposer", - "id": 11103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11090, - "nodeType": "ParameterList", - "parameters": [], - "src": "1547:2:10" - }, - "returnParameters": { - "id": 11093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11092, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11103, - "src": "1571:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1571:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1570:9:10" - }, - "scope": 12250, - "src": "1521:106:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11110, - "nodeType": "Block", - "src": "1790:14:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 11108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:2:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "functionReturnParameters": 11107, - "id": 11109, - "nodeType": "Return", - "src": "1792:9:10" - } - ] - }, - "documentation": "@notice The maximum number of actions that can be included in a proposal", - "id": 11111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalMaxOperations", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1757:2:10" - }, - "returnParameters": { - "id": 11107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11111, - "src": "1781:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1781:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:9:10" - }, - "scope": 12250, - "src": "1727:77:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11118, - "nodeType": "Block", - "src": "1961:13:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "31", - "id": 11116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1970:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "functionReturnParameters": 11115, - "id": 11117, - "nodeType": "Return", - "src": "1963:8:10" - } - ] - }, - "documentation": "@notice The delay before voting on a proposal may take place, once proposed", - "id": 11119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11112, - "nodeType": "ParameterList", - "parameters": [], - "src": "1928:2:10" - }, - "returnParameters": { - "id": 11115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11114, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11119, - "src": "1952:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1952:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1951:9:10" - }, - "scope": 12250, - "src": "1908:66:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11126, - "nodeType": "Block", - "src": "2109:17:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3137323830", - "id": 11124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2118:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17280_by_1", - "typeString": "int_const 17280" - }, - "value": "17280" - }, - "functionReturnParameters": 11123, - "id": 11125, - "nodeType": "Return", - "src": "2111:12:10" - } - ] - }, - "documentation": "@notice The duration of voting on a proposal, in blocks", - "id": 11127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11120, - "nodeType": "ParameterList", - "parameters": [], - "src": "2076:2:10" - }, - "returnParameters": { - "id": 11123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11122, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11127, - "src": "2100:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2100:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2099:9:10" - }, - "scope": 12250, - "src": "2055:71:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11129, - "name": "timelock", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2237:33:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - }, - "typeName": { - "contractScope": null, - "id": 11128, - "name": "TimelockInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12314, - "src": "2237:17:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11131, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2338:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - }, - "typeName": { - "contractScope": null, - "id": 11130, - "name": "YAMInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12332, - "src": "2338:12:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11133, - "name": "guardian", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2421:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2421:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11135, - "name": "proposalCount", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2497:28:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2497:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Proposal", - "id": 11170, - "members": [ - { - "constant": false, - "id": 11137, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2614:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11136, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11139, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2679:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11138, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2679:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11141, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2818:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2818:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11144, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2918:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2918:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11143, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2918:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11147, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3047:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11145, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3047:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3047:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11150, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3144:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11148, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3144:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11149, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3144:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11153, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3249:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3249:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11152, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11155, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3385:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11154, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3385:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11157, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3505:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3505:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11159, - "name": "forVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3602:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3602:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11161, - "name": "againstVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3704:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3704:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11163, - "name": "canceled", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3807:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11162, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3807:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11165, - "name": "executed", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3903:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11164, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3903:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11169, - "name": "receipts", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3996:37:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "typeName": { - "id": 11168, - "keyType": { - "id": 11166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3996:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "valueType": { - "contractScope": null, - "id": 11167, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "4016:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Proposal", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "2532:1508:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Receipt", - "id": 11177, - "members": [ - { - "constant": false, - "id": 11172, - "name": "hasVoted", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4177:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4177:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11174, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4268:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11173, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4268:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11176, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4362:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4362:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Receipt", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "4096:286:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.ProposalState", - "id": 11186, - "members": [ - { - "id": 11178, - "name": "Pending", - "nodeType": "EnumValue", - "src": "4475:7:10" - }, - { - "id": 11179, - "name": "Active", - "nodeType": "EnumValue", - "src": "4492:6:10" - }, - { - "id": 11180, - "name": "Canceled", - "nodeType": "EnumValue", - "src": "4508:8:10" - }, - { - "id": 11181, - "name": "Defeated", - "nodeType": "EnumValue", - "src": "4526:8:10" - }, - { - "id": 11182, - "name": "Succeeded", - "nodeType": "EnumValue", - "src": "4544:9:10" - }, - { - "id": 11183, - "name": "Queued", - "nodeType": "EnumValue", - "src": "4563:6:10" - }, - { - "id": 11184, - "name": "Expired", - "nodeType": "EnumValue", - "src": "4579:7:10" - }, - { - "id": 11185, - "name": "Executed", - "nodeType": "EnumValue", - "src": "4596:8:10" - } - ], - "name": "ProposalState", - "nodeType": "EnumDefinition", - "src": "4446:164:10" - }, - { - "constant": false, - "id": 11190, - "name": "proposals", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4683:46:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "typeName": { - "id": 11189, - "keyType": { - "id": 11187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4692:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "4683:29:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "valueType": { - "contractScope": null, - "id": 11188, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "4703:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11194, - "name": "latestProposalIds", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4790:53:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 11193, - "keyType": { - "id": 11191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "4790:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 11192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4810:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 11199, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4913:122:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11195, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4913:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 11197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4965:69:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 11196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4955:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4955:80:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 11204, - "name": "BALLOT_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "5122:94:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11200, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5122:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20737570706f727429", - "id": 11202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5174:41:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - }, - "value": "Ballot(uint256 proposalId,bool support)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - } - ], - "id": 11201, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5164:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a new proposal is created", - "id": 11228, - "name": "ProposalCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 11227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11206, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5309:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5309:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11208, - "indexed": false, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5321:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5321:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11211, - "indexed": false, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5339:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5339:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11210, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5339:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11214, - "indexed": false, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5358:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11212, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5358:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11213, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5358:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11217, - "indexed": false, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5373:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5373:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11216, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11220, - "indexed": false, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5394:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11218, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11219, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5394:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11222, - "indexed": false, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5413:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5413:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11224, - "indexed": false, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5433:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5433:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11226, - "indexed": false, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5451:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11225, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5451:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5308:162:10" - }, - "src": "5287:184:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a vote has been cast on a proposal", - "id": 11238, - "name": "VoteCast", - "nodeType": "EventDefinition", - "parameters": { - "id": 11237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11230, - "indexed": false, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5565:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5565:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11232, - "indexed": false, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5580:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5580:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11234, - "indexed": false, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5600:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11233, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5600:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11236, - "indexed": false, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5614:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5564:64:10" - }, - "src": "5550:79:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been canceled", - "id": 11242, - "name": "ProposalCanceled", - "nodeType": "EventDefinition", - "parameters": { - "id": 11241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11240, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11242, - "src": "5725:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5725:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5724:12:10" - }, - "src": "5702:35:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been queued in the Timelock", - "id": 11248, - "name": "ProposalQueued", - "nodeType": "EventDefinition", - "parameters": { - "id": 11247, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11244, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5845:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5845:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11246, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5857:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5857:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5844:25:10" - }, - "src": "5824:46:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been executed in the Timelock", - "id": 11252, - "name": "ProposalExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 11251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11250, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11252, - "src": "5982:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5982:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5981:12:10" - }, - "src": "5959:35:10" - }, - { - "body": { - "id": 11276, - "nodeType": "Block", - "src": "6052:121:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11259, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "6062:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11261, - "name": "timelock_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11254, - "src": "6091:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11260, - "name": "TimelockInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12314, - "src": "6073:17:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_TimelockInterface_$12314_$", - "typeString": "type(contract TimelockInterface)" - } - }, - "id": 11262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6073:28:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "src": "6062:39:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11264, - "nodeType": "ExpressionStatement", - "src": "6062:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11265, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6111:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11267, - "name": "yam_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11256, - "src": "6130:4:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11266, - "name": "YAMInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12332, - "src": "6117:12:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMInterface_$12332_$", - "typeString": "type(contract YAMInterface)" - } - }, - "id": 11268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6117:18:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "src": "6111:24:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11270, - "nodeType": "ExpressionStatement", - "src": "6111:24:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11271, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "6145:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11272, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6156:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6145:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11275, - "nodeType": "ExpressionStatement", - "src": "6145:21:10" - } - ] - }, - "documentation": null, - "id": 11277, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11257, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11254, - "name": "timelock_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6012:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6012:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11256, - "name": "yam_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6031:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11255, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6031:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6011:33:10" - }, - "returnParameters": { - "id": 11258, - "nodeType": "ParameterList", - "parameters": [], - "src": "6052:0:10" - }, - "scope": 12250, - "src": "6000:173:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11456, - "nodeType": "Block", - "src": "6416:2092:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11299, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6452:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6452:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11302, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6471:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6471:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6485:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11301, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "6464:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6464:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11297, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6434:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "6434:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6434:54:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11307, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "6491:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6491:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6434:76:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657220766f7465732062656c6f772070726f706f73616c207468726573686f6c64", - "id": 11310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6512:65:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - }, - "value": "GovernorAlpha::propose: proposer votes below proposal threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - } - ], - "id": 11296, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6426:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6426:152:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11312, - "nodeType": "ExpressionStatement", - "src": "6426:152:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11314, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6596:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6596:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11316, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "6614:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 11317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6614:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6596:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11319, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6631:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6631:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11321, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "6649:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 11322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6649:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6631:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:70:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11325, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6670:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6670:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11327, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "6688:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 11328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6688:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6670:34:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:108:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368", - "id": 11331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6706:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - }, - "value": "GovernorAlpha::propose: proposal function information arity mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - } - ], - "id": 11313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6588:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6588:189:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11333, - "nodeType": "ExpressionStatement", - "src": "6588:189:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11335, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6795:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6795:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6813:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6795:19:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f7669646520616374696f6e73", - "id": 11339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6816:46:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - }, - "value": "GovernorAlpha::propose: must provide actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - } - ], - "id": 11334, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6787:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6787:76:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11341, - "nodeType": "ExpressionStatement", - "src": "6787:76:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11343, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6881:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6881:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11345, - "name": "proposalMaxOperations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11111, - "src": "6899:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6899:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6881:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7920616374696f6e73", - "id": 11348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:42:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - }, - "value": "GovernorAlpha::propose: too many actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - } - ], - "id": 11342, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6873:94:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11350, - "nodeType": "ExpressionStatement", - "src": "6873:94:10" - }, - { - "assignments": [ - 11352 - ], - "declarations": [ - { - "constant": false, - "id": 11352, - "name": "latestProposalId", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "6978:24:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6978:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11357, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11353, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "7005:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11356, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7023:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7023:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7005:29:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6978:56:10" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11358, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7048:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7068:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7048:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 11384, - "nodeType": "IfStatement", - "src": "7044:450:10", - "trueBody": { - "id": 11383, - "nodeType": "Block", - "src": "7071:423:10", - "statements": [ - { - "assignments": [ - 11362 - ], - "declarations": [ - { - "constant": false, - "id": 11362, - "name": "proposersLatestProposalState", - "nodeType": "VariableDeclaration", - "scope": 11383, - "src": "7083:42:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11361, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "7083:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11364, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7134:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11363, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "7128:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7083:68:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11368, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11369, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7203:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7203:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7171:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c7265616479206163746976652070726f706f73616c", - "id": 11372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7225:90:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - } - ], - "id": 11367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7163:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7163:153:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11374, - "nodeType": "ExpressionStatement", - "src": "7163:153:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11376, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7336:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11377, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7368:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7368:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7336:53:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c72656164792070656e64696e672070726f706f73616c", - "id": 11380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7391:91:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - } - ], - "id": 11375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7328:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7328:155:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11382, - "nodeType": "ExpressionStatement", - "src": "7328:155:10" - } - ] - } - }, - { - "assignments": [ - 11386 - ], - "declarations": [ - { - "constant": false, - "id": 11386, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7504:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11385, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7504:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11393, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11388, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "7532:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7532:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11390, - "name": "votingDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11119, - "src": "7546:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7546:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11387, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7525:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7525:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7504:56:10" - }, - { - "assignments": [ - 11395 - ], - "declarations": [ - { - "constant": false, - "id": 11395, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7570:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7570:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11401, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11397, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7596:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11398, - "name": "votingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11127, - "src": "7608:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7608:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11396, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7589:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7589:34:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7570:53:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7634:15:10", - "subExpression": { - "argumentTypes": null, - "id": 11402, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7634:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11404, - "nodeType": "ExpressionStatement", - "src": "7634:15:10" - }, - { - "assignments": [ - 11406 - ], - "declarations": [ - { - "constant": false, - "id": 11406, - "name": "newProposal", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7659:27:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11405, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "7659:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11423, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11408, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7716:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11409, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7753:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7753:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7782:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 11412, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "7806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11413, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "7835:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11414, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "7867:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11415, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "7902:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11416, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7937:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11417, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "7971:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8003:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8032:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8057:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8086:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11407, - "name": "Proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11170, - "src": "7689:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Proposal_$11170_storage_ptr_$", - "typeString": "type(struct GovernorAlpha.Proposal storage pointer)" - } - }, - "id": 11422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "id", - "proposer", - "eta", - "targets", - "values", - "signatures", - "calldatas", - "startBlock", - "endBlock", - "forVotes", - "againstVotes", - "canceled", - "executed" - ], - "nodeType": "FunctionCall", - "src": "7689:413:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7659:443:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11424, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8113:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11427, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11425, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8123:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8123:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8113:25:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11428, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8141:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "src": "8113:39:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11430, - "nodeType": "ExpressionStatement", - "src": "8113:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11431, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "8162:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11434, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11432, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8180:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11433, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "8180:20:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8162:39:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11435, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8204:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11436, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8204:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8162:56:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11438, - "nodeType": "ExpressionStatement", - "src": "8162:56:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11440, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8263:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8263:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11442, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8291:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8291:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11444, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "8315:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11445, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "8336:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11446, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "8356:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11447, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "8380:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11448, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "8403:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11449, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "8427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11450, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11291, - "src": "8449:11:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11439, - "name": "ProposalCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11228, - "src": "8234:15:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,address[] memory,uint256[] memory,string memory[] memory,bytes memory[] memory,uint256,uint256,string memory)" - } - }, - "id": 11451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8234:236:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11452, - "nodeType": "EmitStatement", - "src": "8229:241:10" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11453, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8487:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8487:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11295, - "id": 11455, - "nodeType": "Return", - "src": "8480:21:10" - } - ] - }, - "documentation": null, - "id": 11457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "propose", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11280, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6205:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11278, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6205:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11279, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6205:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11283, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6239:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11281, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6239:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6239:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11286, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6269:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11284, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6269:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11285, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6269:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11289, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6305:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11287, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6305:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11288, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11291, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6339:25:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6339:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6195:175:10" - }, - "returnParameters": { - "id": 11295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6403:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6403:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6402:9:10" - }, - "scope": 12250, - "src": "6179:2329:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11533, - "nodeType": "Block", - "src": "8568:629:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11464, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8592:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11463, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "8586:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8586:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11466, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "8607:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8607:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "8586:44:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c2063616e206f6e6c792062652071756575656420696620697420697320737563636565646564", - "id": 11469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8632:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - }, - "value": "GovernorAlpha::queue: proposal can only be queued if it is succeeded" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - } - ], - "id": 11462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8578:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8578:125:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11471, - "nodeType": "ExpressionStatement", - "src": "8578:125:10" - }, - { - "assignments": [ - 11473 - ], - "declarations": [ - { - "constant": false, - "id": 11473, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8713:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11472, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "8713:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11477, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11474, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8741:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11476, - "indexExpression": { - "argumentTypes": null, - "id": 11475, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8751:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8741:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8713:49:10" - }, - { - "assignments": [ - 11479 - ], - "declarations": [ - { - "constant": false, - "id": 11479, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8772:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11478, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8772:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11481, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "8793:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8793:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11483, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "8810:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delay", - "nodeType": "MemberAccess", - "referencedDeclaration": 12255, - "src": "8810:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11480, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "8786:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8786:41:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8772:55:10" - }, - { - "body": { - "id": 11520, - "nodeType": "Block", - "src": "8891:226:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11501, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8937:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11502, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8937:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11504, - "indexExpression": { - "argumentTypes": null, - "id": 11503, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8954:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8937:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11505, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8974:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "8974:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11508, - "indexExpression": { - "argumentTypes": null, - "id": 11507, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8990:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8974:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11509, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9010:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11510, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "9010:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11512, - "indexExpression": { - "argumentTypes": null, - "id": 11511, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9030:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9010:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11513, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9050:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "9050:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11516, - "indexExpression": { - "argumentTypes": null, - "id": 11515, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9069:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9050:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "id": 11517, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9089:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11500, - "name": "_queueOrRevert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11576, - "src": "8905:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8905:201:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11519, - "nodeType": "ExpressionStatement", - "src": "8905:201:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11492, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8857:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11493, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8861:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11494, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8861:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8861:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8857:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11521, - "initializationExpression": { - "assignments": [ - 11489 - ], - "declarations": [ - { - "constant": false, - "id": 11489, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11521, - "src": "8842:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11488, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8842:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11491, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8842:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8886:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11497, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8886:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11499, - "nodeType": "ExpressionStatement", - "src": "8886:3:10" - }, - "nodeType": "ForStatement", - "src": "8837:280:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11522, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9126:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "9126:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11525, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9141:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9126:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11527, - "nodeType": "ExpressionStatement", - "src": "9126:18:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11529, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "9174:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11530, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9186:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11528, - "name": "ProposalQueued", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11248, - "src": "9159:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 11531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9159:31:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11532, - "nodeType": "EmitStatement", - "src": "9154:36:10" - } - ] - }, - "documentation": null, - "id": 11534, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11459, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11534, - "src": "8529:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8529:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8528:20:10" - }, - "returnParameters": { - "id": 11461, - "nodeType": "ParameterList", - "parameters": [], - "src": "8568:0:10" - }, - "scope": 12250, - "src": "8514:683:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11575, - "nodeType": "Block", - "src": "9382:468:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9400:278:10", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11553, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9507:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11554, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9537:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11555, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11556, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9599:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11557, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9627:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9473:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9473:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9473:177:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "9444:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9444:222:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11548, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9401:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queuedTransactions", - "nodeType": "MemberAccess", - "referencedDeclaration": 12270, - "src": "9401:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 11560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9401:277:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a2070726f706f73616c20616374696f6e20616c72656164792071756575656420617420657461", - "id": 11562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9690:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - }, - "value": "GovernorAlpha::_queueOrRevert: proposal action already queued at eta" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - } - ], - "id": 11547, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9392:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9392:378:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11564, - "nodeType": "ExpressionStatement", - "src": "9392:378:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11568, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9807:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11569, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9815:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11570, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9822:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11571, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9833:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11572, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9839:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11565, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9781:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "9781:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 11573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9781:62:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 11574, - "nodeType": "ExpressionStatement", - "src": "9781:62:10" - } - ] - }, - "documentation": null, - "id": 11576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_queueOrRevert", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11536, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9236:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11535, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9236:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11538, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9260:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9260:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11540, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9283:23:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11539, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9283:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11542, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9316:17:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11541, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9316:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11544, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9343:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9343:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9226:134:10" - }, - "returnParameters": { - "id": 11546, - "nodeType": "ParameterList", - "parameters": [], - "src": "9382:0:10" - }, - "scope": 12250, - "src": "9203:647:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 11651, - "nodeType": "Block", - "src": "9928:519:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11583, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "9952:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11582, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "9946:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9946:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11585, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "9967:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9967:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "9946:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637574656420696620697420697320717565756564", - "id": 11588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9989:71:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - }, - "value": "GovernorAlpha::execute: proposal can only be executed if it is queued" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - } - ], - "id": 11581, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9938:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9938:123:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11590, - "nodeType": "ExpressionStatement", - "src": "9938:123:10" - }, - { - "assignments": [ - 11592 - ], - "declarations": [ - { - "constant": false, - "id": 11592, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11651, - "src": "10071:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11591, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10071:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11596, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11593, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10099:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11595, - "indexExpression": { - "argumentTypes": null, - "id": 11594, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10109:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10099:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10071:49:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11597, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10130:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "10130:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10150:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10130:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11602, - "nodeType": "ExpressionStatement", - "src": "10130:24:10" - }, - { - "body": { - "id": 11645, - "nodeType": "Block", - "src": "10218:180:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11625, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10286:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11626, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10286:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11628, - "indexExpression": { - "argumentTypes": null, - "id": 11627, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10303:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10286:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11629, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10307:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11630, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10307:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11632, - "indexExpression": { - "argumentTypes": null, - "id": 11631, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10323:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10307:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11633, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10327:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "10327:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11636, - "indexExpression": { - "argumentTypes": null, - "id": 11635, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10347:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10327:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11637, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10351:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11638, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "10351:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11640, - "indexExpression": { - "argumentTypes": null, - "id": 11639, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10370:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10351:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11641, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10374:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11642, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "10374:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11620, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10266:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11621, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10266:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11623, - "indexExpression": { - "argumentTypes": null, - "id": 11622, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10282:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10266:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11615, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "10232:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "10232:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10232:33:10", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory))" - } - }, - "id": 11624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:53:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:155:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11644, - "nodeType": "ExpressionStatement", - "src": "10232:155:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11607, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10184:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11608, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10188:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10188:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10188:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10184:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11646, - "initializationExpression": { - "assignments": [ - 11604 - ], - "declarations": [ - { - "constant": false, - "id": 11604, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11646, - "src": "10169:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11603, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10169:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11606, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10181:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10169:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10213:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11612, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10213:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11614, - "nodeType": "ExpressionStatement", - "src": "10213:3:10" - }, - "nodeType": "ForStatement", - "src": "10164:234:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11648, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10429:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11647, - "name": "ProposalExecuted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11252, - "src": "10412:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10412:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11650, - "nodeType": "EmitStatement", - "src": "10407:33:10" - } - ] - }, - "documentation": null, - "id": 11652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "execute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11578, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11652, - "src": "9873:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9872:20:10" - }, - "returnParameters": { - "id": 11580, - "nodeType": "ParameterList", - "parameters": [], - "src": "9928:0:10" - }, - "scope": 12250, - "src": "9856:591:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11746, - "nodeType": "Block", - "src": "10508:698:10", - "statements": [ - { - "assignments": [ - 11658 - ], - "declarations": [ - { - "constant": false, - "id": 11658, - "name": "state", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10518:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11657, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "10518:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11662, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11660, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10546:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11659, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "10540:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10540:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10518:39:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11664, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11658, - "src": "10575:5:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11665, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "10584:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10584:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "10575:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616e63656c2065786563757465642070726f706f73616c", - "id": 11668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10608:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - }, - "value": "GovernorAlpha::cancel: cannot cancel executed proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - } - ], - "id": 11663, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10567:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10567:98:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11670, - "nodeType": "ExpressionStatement", - "src": "10567:98:10" - }, - { - "assignments": [ - 11672 - ], - "declarations": [ - { - "constant": false, - "id": 11672, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10676:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11671, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10676:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11676, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11673, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10704:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11675, - "indexExpression": { - "argumentTypes": null, - "id": 11674, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10714:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10704:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10676:49:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11678, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10743:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10743:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 11680, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "10757:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10743:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11684, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10787:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "10787:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "10813:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10813:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10827:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11686, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "10806:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10806:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11682, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "10769:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "10769:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10769:61:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11692, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "10833:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10833:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10769:83:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10743:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722061626f7665207468726573686f6c64", - "id": 11696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10854:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - }, - "value": "GovernorAlpha::cancel: proposer above threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - } - ], - "id": 11677, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10735:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10735:169:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11698, - "nodeType": "ExpressionStatement", - "src": "10735:169:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11699, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10915:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11701, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "10915:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10935:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10915:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11704, - "nodeType": "ExpressionStatement", - "src": "10915:24:10" - }, - { - "body": { - "id": 11740, - "nodeType": "Block", - "src": "11003:153:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11720, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11044:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11044:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11723, - "indexExpression": { - "argumentTypes": null, - "id": 11722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11061:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11044:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11724, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11065:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11065:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11727, - "indexExpression": { - "argumentTypes": null, - "id": 11726, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11081:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11065:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11728, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11085:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11729, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11085:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11731, - "indexExpression": { - "argumentTypes": null, - "id": 11730, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11105:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11085:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11732, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11109:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11733, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11109:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11735, - "indexExpression": { - "argumentTypes": null, - "id": 11734, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11128:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11109:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11736, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11132:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11737, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "11132:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11717, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "11017:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12298, - "src": "11017:26:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external" - } - }, - "id": 11738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11017:128:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11739, - "nodeType": "ExpressionStatement", - "src": "11017:128:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10969:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11710, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10973:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11711, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10973:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10973:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10969:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11741, - "initializationExpression": { - "assignments": [ - 11706 - ], - "declarations": [ - { - "constant": false, - "id": 11706, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11741, - "src": "10954:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10954:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11708, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10966:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10954:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10998:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10998:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11716, - "nodeType": "ExpressionStatement", - "src": "10998:3:10" - }, - "nodeType": "ForStatement", - "src": "10949:207:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11743, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "11188:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11742, - "name": "ProposalCanceled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11242, - "src": "11171:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11745, - "nodeType": "EmitStatement", - "src": "11166:33:10" - } - ] - }, - "documentation": null, - "id": 11747, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancel", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11655, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11654, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11747, - "src": "10469:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11653, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10469:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10468:20:10" - }, - "returnParameters": { - "id": 11656, - "nodeType": "ParameterList", - "parameters": [], - "src": "10508:0:10" - }, - "scope": 12250, - "src": "10453:753:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11780, - "nodeType": "Block", - "src": "11461:124:10", - "statements": [ - { - "assignments": [ - 11765 - ], - "declarations": [ - { - "constant": false, - "id": 11765, - "name": "p", - "nodeType": "VariableDeclaration", - "scope": 11780, - "src": "11471:18:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11764, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11471:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11769, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11766, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11492:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11768, - "indexExpression": { - "argumentTypes": null, - "id": 11767, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11749, - "src": "11502:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11492:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11471:42:10" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11770, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11531:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11771, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11531:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11772, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11542:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11773, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11542:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11774, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11552:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11552:12:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11776, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11566:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11566:11:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - } - ], - "id": 11778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11530:48:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_storage_$_t_array$_t_uint256_$dyn_storage_$_t_array$_t_string_storage_$dyn_storage_$_t_array$_t_bytes_storage_$dyn_storage_$", - "typeString": "tuple(address[] storage ref,uint256[] storage ref,string storage ref[] storage ref,bytes storage ref[] storage ref)" - } - }, - "functionReturnParameters": 11763, - "id": 11779, - "nodeType": "Return", - "src": "11523:55:10" - } - ] - }, - "documentation": null, - "id": 11781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getActions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11749, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11232:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11232:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11231:20:10" - }, - "returnParameters": { - "id": 11763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11753, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11310:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11310:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11752, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11310:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11756, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11348:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11754, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11348:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11755, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11348:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11759, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11382:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11382:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11758, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11382:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11762, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11422:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11422:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11422:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11296:160:10" - }, - "scope": 12250, - "src": "11212:373:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11797, - "nodeType": "Block", - "src": "11711:61:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11790, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11728:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11792, - "indexExpression": { - "argumentTypes": null, - "id": 11791, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11783, - "src": "11738:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11793, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "11728:30:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 11795, - "indexExpression": { - "argumentTypes": null, - "id": 11794, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11785, - "src": "11759:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:37:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "functionReturnParameters": 11789, - "id": 11796, - "nodeType": "Return", - "src": "11721:44:10" - } - ] - }, - "documentation": null, - "id": 11798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11783, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11611:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11611:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11785, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11631:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11631:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11610:35:10" - }, - "returnParameters": { - "id": 11789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11691:14:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_memory_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 11787, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "11691:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11690:16:10" - }, - "scope": 12250, - "src": "11591:181:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11900, - "nodeType": "Block", - "src": "11877:957:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11806, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "11895:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 11807, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11912:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11895:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11809, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11926:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11926:14:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11895:45:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726f706f73616c206964", - "id": 11813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11942:43:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - }, - "value": "GovernorAlpha::state: invalid proposal id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - } - ], - "id": 11805, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11887:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11887:99:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11815, - "nodeType": "ExpressionStatement", - "src": "11887:99:10" - }, - { - "assignments": [ - 11817 - ], - "declarations": [ - { - "constant": false, - "id": 11817, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11900, - "src": "11996:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11816, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11996:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11821, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11818, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "12024:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11820, - "indexExpression": { - "argumentTypes": null, - "id": 11819, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "12034:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12024:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11996:49:10" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11822, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12059:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11823, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "12059:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11828, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12142:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12142:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11830, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12158:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11831, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "12158:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12142:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11837, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12242:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11839, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12258:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11157, - "src": "12258:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12242:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11846, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12339:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12339:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11848, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "12360:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12339:42:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11851, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12385:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12385:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11853, - "name": "quorumVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11089, - "src": "12405:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12405:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12385:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12339:79:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11861, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12484:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11862, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12484:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12500:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12484:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11869, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11870, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "12568:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12651:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11878, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12677:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12677:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11880, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "12691:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "GRACE_PERIOD", - "nodeType": "MemberAccess", - "referencedDeclaration": 12260, - "src": "12691:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12691:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11877, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "12670:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12670:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12651:64:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11892, - "nodeType": "Block", - "src": "12776:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11889, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12797:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12797:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11891, - "nodeType": "Return", - "src": "12790:27:10" - } - ] - }, - "id": 11893, - "nodeType": "IfStatement", - "src": "12647:181:10", - "trueBody": { - "id": 11888, - "nodeType": "Block", - "src": "12717:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11885, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12738:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11886, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Expired", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12738:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11887, - "nodeType": "Return", - "src": "12731:28:10" - } - ] - } - }, - "id": 11894, - "nodeType": "IfStatement", - "src": "12564:264:10", - "trueBody": { - "id": 11874, - "nodeType": "Block", - "src": "12587:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11871, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12608:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12608:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11873, - "nodeType": "Return", - "src": "12601:29:10" - } - ] - } - }, - "id": 11895, - "nodeType": "IfStatement", - "src": "12480:348:10", - "trueBody": { - "id": 11868, - "nodeType": "Block", - "src": "12503:55:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11865, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12524:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12524:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11867, - "nodeType": "Return", - "src": "12517:30:10" - } - ] - } - }, - "id": 11896, - "nodeType": "IfStatement", - "src": "12335:493:10", - "trueBody": { - "id": 11860, - "nodeType": "Block", - "src": "12420:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11857, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12441:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Defeated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12441:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11859, - "nodeType": "Return", - "src": "12434:29:10" - } - ] - } - }, - "id": 11897, - "nodeType": "IfStatement", - "src": "12238:590:10", - "trueBody": { - "id": 11845, - "nodeType": "Block", - "src": "12277:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11842, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12298:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12298:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11844, - "nodeType": "Return", - "src": "12291:27:10" - } - ] - } - }, - "id": 11898, - "nodeType": "IfStatement", - "src": "12138:690:10", - "trueBody": { - "id": 11836, - "nodeType": "Block", - "src": "12179:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11833, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12200:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12200:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11835, - "nodeType": "Return", - "src": "12193:28:10" - } - ] - } - }, - "id": 11899, - "nodeType": "IfStatement", - "src": "12055:773:10", - "trueBody": { - "id": 11827, - "nodeType": "Block", - "src": "12078:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11824, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12099:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12099:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11826, - "nodeType": "Return", - "src": "12092:29:10" - } - ] - } - } - ] - }, - "documentation": null, - "id": 11901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11800, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11793:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11793:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11792:20:10" - }, - "returnParameters": { - "id": 11804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11858:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11802, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "11858:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11857:15:10" - }, - "scope": 12250, - "src": "11778:1056:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11915, - "nodeType": "Block", - "src": "12911:66:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "12938:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12938:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11911, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11903, - "src": "12950:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11912, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11905, - "src": "12962:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11908, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "12928:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12928:42:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11907, - "id": 11914, - "nodeType": "Return", - "src": "12921:49:10" - } - ] - }, - "documentation": null, - "id": 11916, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11903, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12858:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12858:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11905, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12878:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12878:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12857:34:10" - }, - "returnParameters": { - "id": 11907, - "nodeType": "ParameterList", - "parameters": [], - "src": "12911:0:10" - }, - "scope": 12250, - "src": "12840:137:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11994, - "nodeType": "Block", - "src": "13136:797:10", - "statements": [ - { - "assignments": [ - 11930 - ], - "declarations": [ - { - "constant": false, - "id": 11930, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13146:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11929, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13146:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11947, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11199, - "src": "13223:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11937, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11071, - "src": "13272:4:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - ], - "id": 11936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13266:5:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13266:11:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11935, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13256:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13256:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11940, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12249, - "src": "13296:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11943, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19284, - "src": "13334:4:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - ], - "id": 11942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13326:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13326:13:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 11932, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13195:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13195:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13195:158:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13172:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:191:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13146:217:10" - }, - { - "assignments": [ - 11949 - ], - "declarations": [ - { - "constant": false, - "id": 11949, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13374:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11958, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11953, - "name": "BALLOT_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11204, - "src": "13446:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11954, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13479:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11955, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13507:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 11951, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13418:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13418:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13418:110:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11950, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13395:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13395:143:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13374:164:10" - }, - { - "assignments": [ - 11960 - ], - "declarations": [ - { - "constant": false, - "id": 11960, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13549:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13549:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 11964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13623:10:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 11965, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11930, - "src": "13651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11966, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11949, - "src": "13684:10:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13589:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13589:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13589:119:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13566:152:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13549:169:10" - }, - { - "assignments": [ - 11971 - ], - "declarations": [ - { - "constant": false, - "id": 11971, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13729:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11970, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13729:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11978, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11973, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11960, - "src": "13759:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11974, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11922, - "src": "13767:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 11975, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11924, - "src": "13770:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11976, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11926, - "src": "13773:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11972, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "13749:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 11977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13749:26:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13729:46:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11980, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13793:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 11982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13814:1:10", - "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": 11981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13806:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13793:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e76616c6964207369676e6174757265", - "id": 11985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13818:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - }, - "value": "GovernorAlpha::castVoteBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - } - ], - "id": 11979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "13785:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13785:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11987, - "nodeType": "ExpressionStatement", - "src": "13785:83:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11989, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13895:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11990, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13906:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11991, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13918:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11988, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "13885:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13885:41:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11928, - "id": 11993, - "nodeType": "Return", - "src": "13878:48:10" - } - ] - }, - "documentation": null, - "id": 11995, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVoteBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11927, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11918, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13015:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13015:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11920, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13043:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11919, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13043:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11922, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13065:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 11921, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "13065:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11924, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13082:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11923, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13082:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11926, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13101:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13101:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13005:111:10" - }, - "returnParameters": { - "id": 11928, - "nodeType": "ParameterList", - "parameters": [], - "src": "13136:0:10" - }, - "scope": 12250, - "src": "12983:950:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12093, - "nodeType": "Block", - "src": "14058:746:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 12010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12006, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14082:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12005, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "14076:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 12007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14076:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12008, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "14097:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 12009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14097:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "14076:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6720697320636c6f736564", - "id": 12011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14119:44:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - }, - "value": "GovernorAlpha::_castVote: voting is closed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - } - ], - "id": 12004, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14068:96:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12013, - "nodeType": "ExpressionStatement", - "src": "14068:96:10" - }, - { - "assignments": [ - 12015 - ], - "declarations": [ - { - "constant": false, - "id": 12015, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14174:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 12014, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "14174:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12019, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 12016, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "14202:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 12018, - "indexExpression": { - "argumentTypes": null, - "id": 12017, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14212:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14202:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14174:49:10" - }, - { - "assignments": [ - 12021 - ], - "declarations": [ - { - "constant": false, - "id": 12021, - "name": "receipt", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14233:23:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 12020, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "14233:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12026, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12022, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14259:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "14259:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 12025, - "indexExpression": { - "argumentTypes": null, - "id": 12024, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14277:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14259:24:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14233:50:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12028, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14301:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12029, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14301:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 12030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14321:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14301:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74657220616c726561647920766f746564", - "id": 12032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14328:47:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - }, - "value": "GovernorAlpha::_castVote: voter already voted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - } - ], - "id": 12027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14293:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14293:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12034, - "nodeType": "ExpressionStatement", - "src": "14293:83:10" - }, - { - "assignments": [ - 12036 - ], - "declarations": [ - { - "constant": false, - "id": 12036, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14386:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14386:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12043, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12039, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14420:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12040, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "14427:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12037, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "14402:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 12038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "14402:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 12042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14402:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14386:61:10" - }, - { - "condition": { - "argumentTypes": null, - "id": 12044, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14462:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 12066, - "nodeType": "Block", - "src": "14554:85:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12056, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12058, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14568:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12060, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14599:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12061, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14599:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12062, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14622:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12059, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14592:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14592:36:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14568:60:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12065, - "nodeType": "ExpressionStatement", - "src": "14568:60:10" - } - ] - }, - "id": 12067, - "nodeType": "IfStatement", - "src": "14458:181:10", - "trueBody": { - "id": 12055, - "nodeType": "Block", - "src": "14471:77:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12045, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14485:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14485:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12049, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14512:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12050, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14512:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12051, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14531:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12048, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14505:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14505:32:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14485:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12054, - "nodeType": "ExpressionStatement", - "src": "14485:52:10" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 12072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12068, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14649:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12070, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14649:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 12071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14668:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14649:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12073, - "nodeType": "ExpressionStatement", - "src": "14649:23:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12074, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14682:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "support", - "nodeType": "MemberAccess", - "referencedDeclaration": 11174, - "src": "14682:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12077, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14700:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14682:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12079, - "nodeType": "ExpressionStatement", - "src": "14682:25:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12080, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14717:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12082, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11176, - "src": "14717:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12083, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14733:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14717:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12085, - "nodeType": "ExpressionStatement", - "src": "14717:21:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12087, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14763:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12088, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14770:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12089, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14782:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12090, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14791:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12086, - "name": "VoteCast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11238, - "src": "14754:8:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bool,uint256)" - } - }, - "id": 12091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14754:43:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12092, - "nodeType": "EmitStatement", - "src": "14749:48:10" - } - ] - }, - "documentation": null, - "id": 12094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11997, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13967:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13967:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11999, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13990:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13990:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12001, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "14018:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14018:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13957:79:10" - }, - "returnParameters": { - "id": 12003, - "nodeType": "ParameterList", - "parameters": [], - "src": "14058:0:10" - }, - "scope": 12250, - "src": "13939:865:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12110, - "nodeType": "Block", - "src": "14854:141:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12098, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "14872:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14872:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12100, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "14886:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14872:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14896:59:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__acceptAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - } - ], - "id": 12097, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14864:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14864:92:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12104, - "nodeType": "ExpressionStatement", - "src": "14864:92:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 12105, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "14966:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "acceptAdmin", - "nodeType": "MemberAccess", - "referencedDeclaration": 12263, - "src": "14966:20:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 12108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14966:22:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12109, - "nodeType": "ExpressionStatement", - "src": "14966:22:10" - } - ] - }, - "documentation": null, - "id": 12111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12095, - "nodeType": "ParameterList", - "parameters": [], - "src": "14832:2:10" - }, - "returnParameters": { - "id": 12096, - "nodeType": "ParameterList", - "parameters": [], - "src": "14854:0:10" - }, - "scope": 12250, - "src": "14810:185:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12128, - "nodeType": "Block", - "src": "15042:137:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15060:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15060:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12117, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15074:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15060:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15084:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__abdicate: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - } - ], - "id": 12114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15052:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15052:89:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12121, - "nodeType": "ExpressionStatement", - "src": "15052:89:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12122, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15151:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15170:1:10", - "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": 12123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15162:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15162:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15151:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12127, - "nodeType": "ExpressionStatement", - "src": "15151:21:10" - } - ] - }, - "documentation": null, - "id": 12129, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__abdicate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12112, - "nodeType": "ParameterList", - "parameters": [], - "src": "15020:2:10" - }, - "returnParameters": { - "id": 12113, - "nodeType": "ParameterList", - "parameters": [], - "src": "15042:0:10" - }, - "scope": 12250, - "src": "15001:178:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12159, - "nodeType": "Block", - "src": "15304:245:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12137, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15322:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15322:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12139, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15336:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15322:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15346:76:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12136, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15314:109:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12143, - "nodeType": "ExpressionStatement", - "src": "15314:109:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12148, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15467:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15459:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15459:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15478:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15481:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12154, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12131, - "src": "15520:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15509:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15509:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15509:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12156, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12133, - "src": "15538:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12144, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15433:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "15433:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 12157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15433:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 12158, - "nodeType": "ExpressionStatement", - "src": "15433:109:10" - } - ] - }, - "documentation": null, - "id": 12160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__queueSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12131, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15234:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15234:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12133, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15267:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15267:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15224:60:10" - }, - "returnParameters": { - "id": 12135, - "nodeType": "ParameterList", - "parameters": [], - "src": "15304:0:10" - }, - "scope": 12250, - "src": "15185:364:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12190, - "nodeType": "Block", - "src": "15676:249:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15694:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15694:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12170, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15708:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15694:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15718:78:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12167, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15686:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15686:111:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12174, - "nodeType": "ExpressionStatement", - "src": "15686:111:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12179, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15843:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15835:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15835:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15857:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12185, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12162, - "src": "15896:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12183, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15885:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15885:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15885:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12187, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12164, - "src": "15914:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12175, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15807:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "15807:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 12188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15807:111:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 12189, - "nodeType": "ExpressionStatement", - "src": "15807:111:10" - } - ] - }, - "documentation": null, - "id": 12191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__executeSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12165, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12162, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15606:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15606:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12164, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15639:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12163, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15639:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15596:60:10" - }, - "returnParameters": { - "id": 12166, - "nodeType": "ParameterList", - "parameters": [], - "src": "15676:0:10" - }, - "scope": 12250, - "src": "15555:370:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12215, - "nodeType": "Block", - "src": "16001:98:10", - "statements": [ - { - "assignments": [ - 12201 - ], - "declarations": [ - { - "constant": false, - "id": 12201, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12215, - "src": "16011:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12200, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16011:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12205, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12202, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16023:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12203, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12195, - "src": "16027:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16023:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16011:17:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12207, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16046:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12208, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16051:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16046:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6164646974696f6e206f766572666c6f77", - "id": 12210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16054:19:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - }, - "value": "addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - } - ], - "id": 12206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16038:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16038:36:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12212, - "nodeType": "ExpressionStatement", - "src": "16038:36:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12213, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16091:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12199, - "id": 12214, - "nodeType": "Return", - "src": "16084:8:10" - } - ] - }, - "documentation": null, - "id": 12216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15947:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15947:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15958:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15958:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15946:22:10" - }, - "returnParameters": { - "id": 12199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15992:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15992:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15991:9:10" - }, - "scope": 12250, - "src": "15931:168:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12236, - "nodeType": "Block", - "src": "16175:79:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12226, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16193:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12227, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16198:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16193:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7375627472616374696f6e20756e646572666c6f77", - "id": 12229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16201:23:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - }, - "value": "subtraction underflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - } - ], - "id": 12225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16185:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16185:40:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12231, - "nodeType": "ExpressionStatement", - "src": "16185:40:10" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12232, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16242:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12233, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16246:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12224, - "id": 12235, - "nodeType": "Return", - "src": "16235:12:10" - } - ] - }, - "documentation": null, - "id": 12237, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12218, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16121:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16121:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12220, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16132:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16132:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16120:22:10" - }, - "returnParameters": { - "id": 12224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12223, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16166:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16166:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16165:9:10" - }, - "scope": 12250, - "src": "16105:149:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12248, - "nodeType": "Block", - "src": "16314:98:10", - "statements": [ - { - "assignments": [ - 12243 - ], - "declarations": [ - { - "constant": false, - "id": 12243, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 12248, - "src": "16324:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16324:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16324:15:10" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 12243, - "isOffset": false, - "isSlot": false, - "src": "16360:7:10", - "valueSize": 1 - } - } - ], - "id": 12245, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "16349:33:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12246, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12243, - "src": "16398:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12241, - "id": 12247, - "nodeType": "Return", - "src": "16391:14:10" - } - ] - }, - "documentation": null, - "id": 12249, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12238, - "nodeType": "ParameterList", - "parameters": [], - "src": "16279:2:10" - }, - "returnParameters": { - "id": 12241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12240, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12249, - "src": "16305:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16304:9:10" - }, - "scope": 12250, - "src": "16260:152:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 12333, - "src": "1038:15376:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12314, - "linearizedBaseContracts": [ - 12314 - ], - "name": "TimelockInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12255, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12251, - "nodeType": "ParameterList", - "parameters": [], - "src": "16464:2:10" - }, - "returnParameters": { - "id": 12254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12253, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12255, - "src": "16490:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16490:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:9:10" - }, - "scope": 12314, - "src": "16450:49:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12260, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "GRACE_PERIOD", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12256, - "nodeType": "ParameterList", - "parameters": [], - "src": "16525:2:10" - }, - "returnParameters": { - "id": 12259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12260, - "src": "16551:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16551:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16550:9:10" - }, - "scope": 12314, - "src": "16504:56:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12263, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12261, - "nodeType": "ParameterList", - "parameters": [], - "src": "16585:2:10" - }, - "returnParameters": { - "id": 12262, - "nodeType": "ParameterList", - "parameters": [], - "src": "16596:0:10" - }, - "scope": 12314, - "src": "16565:32:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12270, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queuedTransactions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12265, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16630:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12264, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16630:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16629:14:10" - }, - "returnParameters": { - "id": 12269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12268, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16667:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16667:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16666:6:10" - }, - "scope": 12314, - "src": "16602:71:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12285, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12272, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16704:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12271, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16704:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12274, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16720:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12273, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16720:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12276, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16735:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12275, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16735:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12278, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16762:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12277, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16762:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12280, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16783:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16783:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16703:92:10" - }, - "returnParameters": { - "id": 12284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16814:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12282, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16814:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16813:9:10" - }, - "scope": 12314, - "src": "16678:145:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12298, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12296, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12287, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16855:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16855:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12289, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16871:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16871:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12291, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16886:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16886:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16913:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16913:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12295, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16934:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16934:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16854:92:10" - }, - "returnParameters": { - "id": 12297, - "nodeType": "ParameterList", - "parameters": [], - "src": "16955:0:10" - }, - "scope": 12314, - "src": "16828:128:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12313, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12300, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "16989:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16989:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12302, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17005:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12304, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17020:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12303, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17020:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12306, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17047:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17047:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12308, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17068:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16988:92:10" - }, - "returnParameters": { - "id": 12312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17107:12:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17107:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17106:14:10" - }, - "scope": 12314, - "src": "16961:160:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "16416:707:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12332, - "linearizedBaseContracts": [ - 12332 - ], - "name": "YAMInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12323, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12316, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17177:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17177:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12318, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17194:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17194:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17176:38:10" - }, - "returnParameters": { - "id": 12322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17238:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17238:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17237:9:10" - }, - "scope": 12332, - "src": "17154:93:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12328, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12324, - "nodeType": "ParameterList", - "parameters": [], - "src": "17271:2:10" - }, - "returnParameters": { - "id": 12327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12328, - "src": "17297:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17297:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17296:9:10" - }, - "scope": 12332, - "src": "17252:54:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12331, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12329, - "nodeType": "ParameterList", - "parameters": [], - "src": "17330:2:10" - }, - "returnParameters": { - "id": 12330, - "nodeType": "ParameterList", - "parameters": [], - "src": "17341:0:10" - }, - "scope": 12332, - "src": "17311:31:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "17125:219:10" - } - ], - "src": "0:17345:10" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/governance/YAMGovernorAlpha.sol", - "exportedSymbols": { - "GovernorAlpha": [ - 12250 - ], - "TimelockInterface": [ - 12314 - ], - "YAMInterface": [ - 12332 - ] - }, - "id": 12333, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 11066, - "literals": [ - "solidity", - "^", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "id": 11067, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:10" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 11068, - "nodeType": "ImportDirective", - "scope": 12333, - "sourceUnit": 14993, - "src": "1007:29:10", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 12250, - "linearizedBaseContracts": [ - 12250 - ], - "name": "GovernorAlpha", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 11071, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "1109:50:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 11069, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1109:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "59414d20476f7665726e6f7220416c706861", - "id": 11070, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1139:20:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_63e44b07eb663d132f3b867c12624d91b2a07d728ab5358df3bb5d0d12341eb9", - "typeString": "literal_string \"YAM Governor Alpha\"" - }, - "value": "YAM Governor Alpha" - }, - "visibility": "public" - }, - { - "body": { - "id": 11088, - "nodeType": "Block", - "src": "1351:64:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11080, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1386:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1386:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1386:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "34", - "id": 11083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1404:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "expression": { - "argumentTypes": null, - "id": 11078, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1373:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1373:33:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11076, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1360:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1360:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11075, - "id": 11087, - "nodeType": "Return", - "src": "1353:59:10" - } - ] - }, - "documentation": "@notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed", - "id": 11089, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "quorumVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11072, - "nodeType": "ParameterList", - "parameters": [], - "src": "1318:2:10" - }, - "returnParameters": { - "id": 11075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11074, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11089, - "src": "1342:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11073, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1342:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1341:9:10" - }, - "scope": 12250, - "src": "1298:117:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11102, - "nodeType": "Block", - "src": "1580:47:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11096, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "1602:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 12328, - "src": "1602:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1602:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "313030", - "id": 11099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1620:3:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - }, - "value": "100" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_100_by_1", - "typeString": "int_const 100" - } - ], - "expression": { - "argumentTypes": null, - "id": 11094, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14992, - "src": "1589:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$14992_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 11095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1589:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11093, - "id": 11101, - "nodeType": "Return", - "src": "1582:42:10" - } - ] - }, - "documentation": "@notice The number of votes required in order for a voter to become a proposer", - "id": 11103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11090, - "nodeType": "ParameterList", - "parameters": [], - "src": "1547:2:10" - }, - "returnParameters": { - "id": 11093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11092, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11103, - "src": "1571:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1571:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1570:9:10" - }, - "scope": 12250, - "src": "1521:106:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11110, - "nodeType": "Block", - "src": "1790:14:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 11108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:2:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "functionReturnParameters": 11107, - "id": 11109, - "nodeType": "Return", - "src": "1792:9:10" - } - ] - }, - "documentation": "@notice The maximum number of actions that can be included in a proposal", - "id": 11111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalMaxOperations", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1757:2:10" - }, - "returnParameters": { - "id": 11107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11111, - "src": "1781:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1781:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1780:9:10" - }, - "scope": 12250, - "src": "1727:77:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11118, - "nodeType": "Block", - "src": "1961:13:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "31", - "id": 11116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1970:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "functionReturnParameters": 11115, - "id": 11117, - "nodeType": "Return", - "src": "1963:8:10" - } - ] - }, - "documentation": "@notice The delay before voting on a proposal may take place, once proposed", - "id": 11119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingDelay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11112, - "nodeType": "ParameterList", - "parameters": [], - "src": "1928:2:10" - }, - "returnParameters": { - "id": 11115, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11114, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11119, - "src": "1952:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1952:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1951:9:10" - }, - "scope": 12250, - "src": "1908:66:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11126, - "nodeType": "Block", - "src": "2109:17:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3137323830", - "id": 11124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2118:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17280_by_1", - "typeString": "int_const 17280" - }, - "value": "17280" - }, - "functionReturnParameters": 11123, - "id": 11125, - "nodeType": "Return", - "src": "2111:12:10" - } - ] - }, - "documentation": "@notice The duration of voting on a proposal, in blocks", - "id": 11127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingPeriod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11120, - "nodeType": "ParameterList", - "parameters": [], - "src": "2076:2:10" - }, - "returnParameters": { - "id": 11123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11122, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11127, - "src": "2100:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2100:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2099:9:10" - }, - "scope": 12250, - "src": "2055:71:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11129, - "name": "timelock", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2237:33:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - }, - "typeName": { - "contractScope": null, - "id": 11128, - "name": "TimelockInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12314, - "src": "2237:17:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11131, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2338:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - }, - "typeName": { - "contractScope": null, - "id": 11130, - "name": "YAMInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 12332, - "src": "2338:12:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11133, - "name": "guardian", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2421:23:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2421:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11135, - "name": "proposalCount", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "2497:28:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2497:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Proposal", - "id": 11170, - "members": [ - { - "constant": false, - "id": 11137, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2614:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11136, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11139, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2679:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11138, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2679:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11141, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2818:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2818:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11144, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "2918:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2918:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11143, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2918:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11147, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3047:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11145, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3047:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3047:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11150, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3144:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11148, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3144:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11149, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3144:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11153, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3249:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11151, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3249:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11152, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11155, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3385:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11154, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3385:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11157, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3505:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3505:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11159, - "name": "forVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3602:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3602:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11161, - "name": "againstVotes", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3704:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3704:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11163, - "name": "canceled", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3807:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11162, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3807:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11165, - "name": "executed", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3903:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11164, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3903:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11169, - "name": "receipts", - "nodeType": "VariableDeclaration", - "scope": 11170, - "src": "3996:37:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "typeName": { - "id": 11168, - "keyType": { - "id": 11166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3996:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt)" - }, - "valueType": { - "contractScope": null, - "id": 11167, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "4016:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Proposal", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "2532:1508:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.Receipt", - "id": 11177, - "members": [ - { - "constant": false, - "id": 11172, - "name": "hasVoted", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4177:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4177:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11174, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4268:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11173, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4268:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11176, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11177, - "src": "4362:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4362:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Receipt", - "nodeType": "StructDefinition", - "scope": 12250, - "src": "4096:286:10", - "visibility": "public" - }, - { - "canonicalName": "GovernorAlpha.ProposalState", - "id": 11186, - "members": [ - { - "id": 11178, - "name": "Pending", - "nodeType": "EnumValue", - "src": "4475:7:10" - }, - { - "id": 11179, - "name": "Active", - "nodeType": "EnumValue", - "src": "4492:6:10" - }, - { - "id": 11180, - "name": "Canceled", - "nodeType": "EnumValue", - "src": "4508:8:10" - }, - { - "id": 11181, - "name": "Defeated", - "nodeType": "EnumValue", - "src": "4526:8:10" - }, - { - "id": 11182, - "name": "Succeeded", - "nodeType": "EnumValue", - "src": "4544:9:10" - }, - { - "id": 11183, - "name": "Queued", - "nodeType": "EnumValue", - "src": "4563:6:10" - }, - { - "id": 11184, - "name": "Expired", - "nodeType": "EnumValue", - "src": "4579:7:10" - }, - { - "id": 11185, - "name": "Executed", - "nodeType": "EnumValue", - "src": "4596:8:10" - } - ], - "name": "ProposalState", - "nodeType": "EnumDefinition", - "src": "4446:164:10" - }, - { - "constant": false, - "id": 11190, - "name": "proposals", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4683:46:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "typeName": { - "id": 11189, - "keyType": { - "id": 11187, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4692:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "4683:29:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal)" - }, - "valueType": { - "contractScope": null, - "id": 11188, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "4703:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 11194, - "name": "latestProposalIds", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4790:53:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 11193, - "keyType": { - "id": 11191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "4790:28:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 11192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4810:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 11199, - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "4913:122:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11195, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4913:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 11197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4965:69:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 11196, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "4955:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11198, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4955:80:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 11204, - "name": "BALLOT_TYPEHASH", - "nodeType": "VariableDeclaration", - "scope": 12250, - "src": "5122:94:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11200, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5122:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20737570706f727429", - "id": 11202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5174:41:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - }, - "value": "Ballot(uint256 proposalId,bool support)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - } - ], - "id": 11201, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "5164:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a new proposal is created", - "id": 11228, - "name": "ProposalCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 11227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11206, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5309:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5309:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11208, - "indexed": false, - "name": "proposer", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5321:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5321:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11211, - "indexed": false, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5339:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5339:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11210, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5339:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11214, - "indexed": false, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5358:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11212, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5358:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11213, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5358:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11217, - "indexed": false, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5373:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5373:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11216, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5373:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11220, - "indexed": false, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5394:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11218, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11219, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5394:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11222, - "indexed": false, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5413:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5413:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11224, - "indexed": false, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5433:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5433:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11226, - "indexed": false, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11228, - "src": "5451:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11225, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5451:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5308:162:10" - }, - "src": "5287:184:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a vote has been cast on a proposal", - "id": 11238, - "name": "VoteCast", - "nodeType": "EventDefinition", - "parameters": { - "id": 11237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11230, - "indexed": false, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5565:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5565:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11232, - "indexed": false, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5580:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5580:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11234, - "indexed": false, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5600:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11233, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5600:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11236, - "indexed": false, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 11238, - "src": "5614:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5614:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5564:64:10" - }, - "src": "5550:79:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been canceled", - "id": 11242, - "name": "ProposalCanceled", - "nodeType": "EventDefinition", - "parameters": { - "id": 11241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11240, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11242, - "src": "5725:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5725:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5724:12:10" - }, - "src": "5702:35:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been queued in the Timelock", - "id": 11248, - "name": "ProposalQueued", - "nodeType": "EventDefinition", - "parameters": { - "id": 11247, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11244, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5845:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11243, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5845:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11246, - "indexed": false, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11248, - "src": "5857:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5857:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5844:25:10" - }, - "src": "5824:46:10" - }, - { - "anonymous": false, - "documentation": "@notice An event emitted when a proposal has been executed in the Timelock", - "id": 11252, - "name": "ProposalExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 11251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11250, - "indexed": false, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 11252, - "src": "5982:10:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5982:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5981:12:10" - }, - "src": "5959:35:10" - }, - { - "body": { - "id": 11276, - "nodeType": "Block", - "src": "6052:121:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 11263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11259, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "6062:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11261, - "name": "timelock_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11254, - "src": "6091:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11260, - "name": "TimelockInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12314, - "src": "6073:17:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_TimelockInterface_$12314_$", - "typeString": "type(contract TimelockInterface)" - } - }, - "id": 11262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6073:28:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "src": "6062:39:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11264, - "nodeType": "ExpressionStatement", - "src": "6062:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11265, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6111:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11267, - "name": "yam_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11256, - "src": "6130:4:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11266, - "name": "YAMInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12332, - "src": "6117:12:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMInterface_$12332_$", - "typeString": "type(contract YAMInterface)" - } - }, - "id": 11268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6117:18:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "src": "6111:24:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11270, - "nodeType": "ExpressionStatement", - "src": "6111:24:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 11271, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "6145:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11272, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6156:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6145:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11275, - "nodeType": "ExpressionStatement", - "src": "6145:21:10" - } - ] - }, - "documentation": null, - "id": 11277, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11257, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11254, - "name": "timelock_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6012:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6012:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11256, - "name": "yam_", - "nodeType": "VariableDeclaration", - "scope": 11277, - "src": "6031:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11255, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6031:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6011:33:10" - }, - "returnParameters": { - "id": 11258, - "nodeType": "ParameterList", - "parameters": [], - "src": "6052:0:10" - }, - "scope": 12250, - "src": "6000:173:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11456, - "nodeType": "Block", - "src": "6416:2092:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11299, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6452:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6452:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11302, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "6471:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6471:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6485:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11301, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "6464:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6464:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11297, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "6434:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "6434:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6434:54:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11307, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "6491:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6491:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6434:76:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657220766f7465732062656c6f772070726f706f73616c207468726573686f6c64", - "id": 11310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6512:65:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - }, - "value": "GovernorAlpha::propose: proposer votes below proposal threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bfd39a706899c667e0394e5691bba7fd459524eeb85474b380cee160c3526ad7", - "typeString": "literal_string \"GovernorAlpha::propose: proposer votes below proposal threshold\"" - } - ], - "id": 11296, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6426:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6426:152:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11312, - "nodeType": "ExpressionStatement", - "src": "6426:152:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11314, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6596:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6596:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11316, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "6614:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 11317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6614:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6596:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11319, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6631:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6631:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11321, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "6649:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 11322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6649:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6631:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:70:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11325, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6670:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6670:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11327, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "6688:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 11328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6688:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6670:34:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6596:108:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368", - "id": 11331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6706:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - }, - "value": "GovernorAlpha::propose: proposal function information arity mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8f65dd3b1b279a725bb780739a9eb5d267c38175f941e38ce802e63e3e8b6fea", - "typeString": "literal_string \"GovernorAlpha::propose: proposal function information arity mismatch\"" - } - ], - "id": 11313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6588:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6588:189:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11333, - "nodeType": "ExpressionStatement", - "src": "6588:189:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11335, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6795:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6795:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6813:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6795:19:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f7669646520616374696f6e73", - "id": 11339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6816:46:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - }, - "value": "GovernorAlpha::propose: must provide actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad28c98e0c3f5f095d64a889b8cb7fef3f5dce1da50271bc4d958131808bd4c3", - "typeString": "literal_string \"GovernorAlpha::propose: must provide actions\"" - } - ], - "id": 11334, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6787:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6787:76:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11341, - "nodeType": "ExpressionStatement", - "src": "6787:76:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11343, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "6881:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 11344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6881:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11345, - "name": "proposalMaxOperations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11111, - "src": "6899:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6899:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6881:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7920616374696f6e73", - "id": 11348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:42:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - }, - "value": "GovernorAlpha::propose: too many actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7be08c0beae18091615fa69523ea231e3fec34367b86b38f90cf56bf50e90496", - "typeString": "literal_string \"GovernorAlpha::propose: too many actions\"" - } - ], - "id": 11342, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "6873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6873:94:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11350, - "nodeType": "ExpressionStatement", - "src": "6873:94:10" - }, - { - "assignments": [ - 11352 - ], - "declarations": [ - { - "constant": false, - "id": 11352, - "name": "latestProposalId", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "6978:24:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6978:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11357, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11353, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "7005:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11356, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7023:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7023:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7005:29:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6978:56:10" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11358, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7048:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7068:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7048:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 11384, - "nodeType": "IfStatement", - "src": "7044:450:10", - "trueBody": { - "id": 11383, - "nodeType": "Block", - "src": "7071:423:10", - "statements": [ - { - "assignments": [ - 11362 - ], - "declarations": [ - { - "constant": false, - "id": 11362, - "name": "proposersLatestProposalState", - "nodeType": "VariableDeclaration", - "scope": 11383, - "src": "7083:42:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11361, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "7083:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11366, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11364, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11352, - "src": "7134:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11363, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "7128:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7083:68:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11368, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11369, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7203:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7203:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7171:52:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c7265616479206163746976652070726f706f73616c", - "id": 11372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7225:90:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87f670040507c478977f847e6bd1f7a027d18f70440fe56056d87e43baea226", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already active proposal\"" - } - ], - "id": 11367, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7163:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7163:153:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11374, - "nodeType": "ExpressionStatement", - "src": "7163:153:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11376, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11362, - "src": "7336:28:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11377, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "7368:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7368:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "7336:53:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c72656164792070656e64696e672070726f706f73616c", - "id": 11380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7391:91:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - }, - "value": "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6ba5b9d71ffd376990d8fe5d0e3e5e56e38371f2ae53f3613e7df4450ff470e6", - "typeString": "literal_string \"GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal\"" - } - ], - "id": 11375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7328:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7328:155:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11382, - "nodeType": "ExpressionStatement", - "src": "7328:155:10" - } - ] - } - }, - { - "assignments": [ - 11386 - ], - "declarations": [ - { - "constant": false, - "id": 11386, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7504:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11385, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7504:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11393, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11388, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "7532:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7532:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11390, - "name": "votingDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11119, - "src": "7546:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7546:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11387, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7525:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7525:35:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7504:56:10" - }, - { - "assignments": [ - 11395 - ], - "declarations": [ - { - "constant": false, - "id": 11395, - "name": "endBlock", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7570:16:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11394, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7570:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11401, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11397, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7596:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11398, - "name": "votingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11127, - "src": "7608:12:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7608:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11396, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "7589:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7589:34:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7570:53:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7634:15:10", - "subExpression": { - "argumentTypes": null, - "id": 11402, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7634:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11404, - "nodeType": "ExpressionStatement", - "src": "7634:15:10" - }, - { - "assignments": [ - 11406 - ], - "declarations": [ - { - "constant": false, - "id": 11406, - "name": "newProposal", - "nodeType": "VariableDeclaration", - "scope": 11456, - "src": "7659:27:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11405, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "7659:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11423, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11408, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "7716:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11409, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7753:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7753:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7782:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 11412, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "7806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11413, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "7835:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11414, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "7867:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11415, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "7902:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11416, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "7937:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11417, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "7971:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8003:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 11419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8032:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8057:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 11421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8086:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11407, - "name": "Proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11170, - "src": "7689:8:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Proposal_$11170_storage_ptr_$", - "typeString": "type(struct GovernorAlpha.Proposal storage pointer)" - } - }, - "id": 11422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "id", - "proposer", - "eta", - "targets", - "values", - "signatures", - "calldatas", - "startBlock", - "endBlock", - "forVotes", - "againstVotes", - "canceled", - "executed" - ], - "nodeType": "FunctionCall", - "src": "7689:413:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7659:443:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11424, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8113:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11427, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11425, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8123:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8123:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8113:25:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11428, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8141:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "src": "8113:39:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11430, - "nodeType": "ExpressionStatement", - "src": "8113:39:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11431, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11194, - "src": "8162:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 11434, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11432, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8180:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11433, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "8180:20:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8162:39:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11435, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8204:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11436, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8204:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8162:56:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11438, - "nodeType": "ExpressionStatement", - "src": "8162:56:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11440, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8263:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8263:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11442, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8291:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8291:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11444, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11280, - "src": "8315:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 11445, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11283, - "src": "8336:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 11446, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11286, - "src": "8356:10:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11447, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11289, - "src": "8380:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 11448, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11386, - "src": "8403:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11449, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11395, - "src": "8427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11450, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11291, - "src": "8449:11:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 11439, - "name": "ProposalCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11228, - "src": "8234:15:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_string_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,address[] memory,uint256[] memory,string memory[] memory,bytes memory[] memory,uint256,uint256,string memory)" - } - }, - "id": 11451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8234:236:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11452, - "nodeType": "EmitStatement", - "src": "8229:241:10" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11453, - "name": "newProposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11406, - "src": "8487:11:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_memory_ptr", - "typeString": "struct GovernorAlpha.Proposal memory" - } - }, - "id": 11454, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 11137, - "src": "8487:14:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11295, - "id": 11455, - "nodeType": "Return", - "src": "8480:21:10" - } - ] - }, - "documentation": null, - "id": 11457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "propose", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11280, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6205:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11278, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6205:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11279, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6205:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11283, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6239:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11281, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6239:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6239:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11286, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6269:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11284, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6269:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11285, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6269:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11289, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6305:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11287, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6305:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11288, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11291, - "name": "description", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6339:25:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6339:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6195:175:10" - }, - "returnParameters": { - "id": 11295, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11457, - "src": "6403:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11293, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6403:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6402:9:10" - }, - "scope": 12250, - "src": "6179:2329:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11533, - "nodeType": "Block", - "src": "8568:629:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11464, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8592:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11463, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "8586:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8586:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11466, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "8607:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8607:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "8586:44:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c2063616e206f6e6c792062652071756575656420696620697420697320737563636565646564", - "id": 11469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8632:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - }, - "value": "GovernorAlpha::queue: proposal can only be queued if it is succeeded" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1d9165de7b961db8df575169dadfdce4206cbf37571a45b735e6bcfda22b83b1", - "typeString": "literal_string \"GovernorAlpha::queue: proposal can only be queued if it is succeeded\"" - } - ], - "id": 11462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8578:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8578:125:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11471, - "nodeType": "ExpressionStatement", - "src": "8578:125:10" - }, - { - "assignments": [ - 11473 - ], - "declarations": [ - { - "constant": false, - "id": 11473, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8713:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11472, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "8713:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11477, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11474, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "8741:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11476, - "indexExpression": { - "argumentTypes": null, - "id": 11475, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "8751:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8741:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8713:49:10" - }, - { - "assignments": [ - 11479 - ], - "declarations": [ - { - "constant": false, - "id": 11479, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11533, - "src": "8772:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11478, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8772:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11481, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "8793:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8793:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11483, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "8810:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delay", - "nodeType": "MemberAccess", - "referencedDeclaration": 12255, - "src": "8810:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:16:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11480, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "8786:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8786:41:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8772:55:10" - }, - { - "body": { - "id": 11520, - "nodeType": "Block", - "src": "8891:226:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11501, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8937:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11502, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8937:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11504, - "indexExpression": { - "argumentTypes": null, - "id": 11503, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8954:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8937:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11505, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8974:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11506, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "8974:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11508, - "indexExpression": { - "argumentTypes": null, - "id": 11507, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8990:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8974:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11509, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9010:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11510, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "9010:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11512, - "indexExpression": { - "argumentTypes": null, - "id": 11511, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9030:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9010:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11513, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9050:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "9050:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11516, - "indexExpression": { - "argumentTypes": null, - "id": 11515, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "9069:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9050:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "id": 11517, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9089:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11500, - "name": "_queueOrRevert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11576, - "src": "8905:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 11518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8905:201:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11519, - "nodeType": "ExpressionStatement", - "src": "8905:201:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11492, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8857:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11493, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "8861:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11494, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "8861:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11495, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8861:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8857:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11521, - "initializationExpression": { - "assignments": [ - 11489 - ], - "declarations": [ - { - "constant": false, - "id": 11489, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11521, - "src": "8842:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11488, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8842:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11491, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11490, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8842:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8886:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11497, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11489, - "src": "8886:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11499, - "nodeType": "ExpressionStatement", - "src": "8886:3:10" - }, - "nodeType": "ForStatement", - "src": "8837:280:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11522, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11473, - "src": "9126:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "9126:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 11525, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9141:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9126:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11527, - "nodeType": "ExpressionStatement", - "src": "9126:18:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11529, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11459, - "src": "9174:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11530, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11479, - "src": "9186:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11528, - "name": "ProposalQueued", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11248, - "src": "9159:14:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 11531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9159:31:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11532, - "nodeType": "EmitStatement", - "src": "9154:36:10" - } - ] - }, - "documentation": null, - "id": 11534, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11459, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11534, - "src": "8529:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8529:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8528:20:10" - }, - "returnParameters": { - "id": 11461, - "nodeType": "ParameterList", - "parameters": [], - "src": "8568:0:10" - }, - "scope": 12250, - "src": "8514:683:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11575, - "nodeType": "Block", - "src": "9382:468:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9400:278:10", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11553, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9507:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11554, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9537:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11555, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11556, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9599:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11557, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9627:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11551, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "9473:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9473:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9473:177:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11550, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "9444:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9444:222:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11548, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9401:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queuedTransactions", - "nodeType": "MemberAccess", - "referencedDeclaration": 12270, - "src": "9401:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 11560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9401:277:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a2070726f706f73616c20616374696f6e20616c72656164792071756575656420617420657461", - "id": 11562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9690:70:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - }, - "value": "GovernorAlpha::_queueOrRevert: proposal action already queued at eta" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f2f7c3bae6cb2a10b5b2bdd0f8af6cd89782d3f0c1e0795e81a133975b25c86", - "typeString": "literal_string \"GovernorAlpha::_queueOrRevert: proposal action already queued at eta\"" - } - ], - "id": 11547, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9392:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9392:378:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11564, - "nodeType": "ExpressionStatement", - "src": "9392:378:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11568, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11536, - "src": "9807:6:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11569, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11538, - "src": "9815:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11570, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11540, - "src": "9822:9:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 11571, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11542, - "src": "9833:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 11572, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11544, - "src": "9839:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11565, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "9781:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "9781:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 11573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9781:62:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 11574, - "nodeType": "ExpressionStatement", - "src": "9781:62:10" - } - ] - }, - "documentation": null, - "id": 11576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_queueOrRevert", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11536, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9236:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11535, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9236:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11538, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9260:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9260:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11540, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9283:23:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 11539, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9283:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11542, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9316:17:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 11541, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9316:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11544, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 11576, - "src": "9343:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9343:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9226:134:10" - }, - "returnParameters": { - "id": 11546, - "nodeType": "ParameterList", - "parameters": [], - "src": "9382:0:10" - }, - "scope": 12250, - "src": "9203:647:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 11651, - "nodeType": "Block", - "src": "9928:519:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11583, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "9952:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11582, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "9946:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9946:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11585, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "9967:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9967:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "9946:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637574656420696620697420697320717565756564", - "id": 11588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9989:71:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - }, - "value": "GovernorAlpha::execute: proposal can only be executed if it is queued" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1e6b39f7a3cdaa9f8cd196650711f6f6106ff22624580132558c7d2885a2b40c", - "typeString": "literal_string \"GovernorAlpha::execute: proposal can only be executed if it is queued\"" - } - ], - "id": 11581, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9938:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9938:123:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11590, - "nodeType": "ExpressionStatement", - "src": "9938:123:10" - }, - { - "assignments": [ - 11592 - ], - "declarations": [ - { - "constant": false, - "id": 11592, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11651, - "src": "10071:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11591, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10071:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11596, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11593, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10099:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11595, - "indexExpression": { - "argumentTypes": null, - "id": 11594, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10109:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10099:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10071:49:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11597, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10130:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "10130:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10150:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10130:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11602, - "nodeType": "ExpressionStatement", - "src": "10130:24:10" - }, - { - "body": { - "id": 11645, - "nodeType": "Block", - "src": "10218:180:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11625, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10286:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11626, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10286:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11628, - "indexExpression": { - "argumentTypes": null, - "id": 11627, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10303:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10286:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11629, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10307:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11630, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10307:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11632, - "indexExpression": { - "argumentTypes": null, - "id": 11631, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10323:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10307:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11633, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10327:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11634, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "10327:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11636, - "indexExpression": { - "argumentTypes": null, - "id": 11635, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10347:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10327:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11637, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10351:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11638, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "10351:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11640, - "indexExpression": { - "argumentTypes": null, - "id": 11639, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10370:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10351:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11641, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10374:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11642, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "10374:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11620, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10266:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11621, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "10266:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11623, - "indexExpression": { - "argumentTypes": null, - "id": 11622, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10282:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10266:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11615, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "10232:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "10232:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10232:33:10", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory))" - } - }, - "id": 11624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:53:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 11643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:155:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 11644, - "nodeType": "ExpressionStatement", - "src": "10232:155:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11607, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10184:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11608, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11592, - "src": "10188:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10188:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10188:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10184:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11646, - "initializationExpression": { - "assignments": [ - 11604 - ], - "declarations": [ - { - "constant": false, - "id": 11604, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11646, - "src": "10169:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11603, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10169:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11606, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10181:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10169:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10213:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11612, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11604, - "src": "10213:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11614, - "nodeType": "ExpressionStatement", - "src": "10213:3:10" - }, - "nodeType": "ForStatement", - "src": "10164:234:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11648, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11578, - "src": "10429:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11647, - "name": "ProposalExecuted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11252, - "src": "10412:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10412:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11650, - "nodeType": "EmitStatement", - "src": "10407:33:10" - } - ] - }, - "documentation": null, - "id": 11652, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "execute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11578, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11652, - "src": "9873:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9873:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9872:20:10" - }, - "returnParameters": { - "id": 11580, - "nodeType": "ParameterList", - "parameters": [], - "src": "9928:0:10" - }, - "scope": 12250, - "src": "9856:591:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11746, - "nodeType": "Block", - "src": "10508:698:10", - "statements": [ - { - "assignments": [ - 11658 - ], - "declarations": [ - { - "constant": false, - "id": 11658, - "name": "state", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10518:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11657, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "10518:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11662, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11660, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10546:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11659, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "10540:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 11661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10540:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10518:39:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 11667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11664, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11658, - "src": "10575:5:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11665, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "10584:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10584:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "10575:31:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616e63656c2065786563757465642070726f706f73616c", - "id": 11668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10608:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - }, - "value": "GovernorAlpha::cancel: cannot cancel executed proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9d477897cfec9b3c036d388c3168bf4ff9f6d4c49c58b845fd31f77ad2af11d", - "typeString": "literal_string \"GovernorAlpha::cancel: cannot cancel executed proposal\"" - } - ], - "id": 11663, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10567:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10567:98:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11670, - "nodeType": "ExpressionStatement", - "src": "10567:98:10" - }, - { - "assignments": [ - 11672 - ], - "declarations": [ - { - "constant": false, - "id": 11672, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11746, - "src": "10676:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11671, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "10676:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11676, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11673, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "10704:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11675, - "indexExpression": { - "argumentTypes": null, - "id": 11674, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "10714:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10704:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10676:49:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11678, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10743:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10743:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 11680, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "10757:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10743:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11684, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10787:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11685, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 11139, - "src": "10787:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11687, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "10813:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10813:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 11689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10827:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 11686, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12237, - "src": "10806:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10806:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11682, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "10769:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 11683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "10769:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 11691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10769:61:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11692, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11103, - "src": "10833:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10833:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10769:83:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10743:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722061626f7665207468726573686f6c64", - "id": 11696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10854:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - }, - "value": "GovernorAlpha::cancel: proposer above threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_955146449a8b4861230739fdd349c84a094c3689202256bb43330a0b0d63a0ae", - "typeString": "literal_string \"GovernorAlpha::cancel: proposer above threshold\"" - } - ], - "id": 11677, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10735:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10735:169:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11698, - "nodeType": "ExpressionStatement", - "src": "10735:169:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 11703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11699, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10915:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11701, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "10915:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 11702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10935:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10915:24:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11704, - "nodeType": "ExpressionStatement", - "src": "10915:24:10" - }, - { - "body": { - "id": 11740, - "nodeType": "Block", - "src": "11003:153:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11720, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11044:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11721, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11044:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11723, - "indexExpression": { - "argumentTypes": null, - "id": 11722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11061:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11044:19:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11724, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11065:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11065:15:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 11727, - "indexExpression": { - "argumentTypes": null, - "id": 11726, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11081:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11065:18:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11728, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11085:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11729, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11085:19:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 11731, - "indexExpression": { - "argumentTypes": null, - "id": 11730, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11105:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11085:22:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11732, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11109:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11733, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11109:18:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 11735, - "indexExpression": { - "argumentTypes": null, - "id": 11734, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "11128:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11109:21:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11736, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "11132:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11737, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "11132:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 11717, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "11017:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12298, - "src": "11017:26:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external" - } - }, - "id": 11738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11017:128:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11739, - "nodeType": "ExpressionStatement", - "src": "11017:128:10" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10969:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11710, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11672, - "src": "10973:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11711, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "10973:16:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 11712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10973:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10969:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 11741, - "initializationExpression": { - "assignments": [ - 11706 - ], - "declarations": [ - { - "constant": false, - "id": 11706, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 11741, - "src": "10954:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10954:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11708, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 11707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10966:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10954:13:10" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 11715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10998:3:10", - "subExpression": { - "argumentTypes": null, - "id": 11714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11706, - "src": "10998:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11716, - "nodeType": "ExpressionStatement", - "src": "10998:3:10" - }, - "nodeType": "ForStatement", - "src": "10949:207:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11743, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11654, - "src": "11188:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11742, - "name": "ProposalCanceled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11242, - "src": "11171:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 11744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11171:28:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11745, - "nodeType": "EmitStatement", - "src": "11166:33:10" - } - ] - }, - "documentation": null, - "id": 11747, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancel", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11655, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11654, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11747, - "src": "10469:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11653, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10469:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10468:20:10" - }, - "returnParameters": { - "id": 11656, - "nodeType": "ParameterList", - "parameters": [], - "src": "10508:0:10" - }, - "scope": 12250, - "src": "10453:753:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11780, - "nodeType": "Block", - "src": "11461:124:10", - "statements": [ - { - "assignments": [ - 11765 - ], - "declarations": [ - { - "constant": false, - "id": 11765, - "name": "p", - "nodeType": "VariableDeclaration", - "scope": 11780, - "src": "11471:18:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11764, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11471:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11769, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11766, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11492:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11768, - "indexExpression": { - "argumentTypes": null, - "id": 11767, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11749, - "src": "11502:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11492:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11471:42:10" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11770, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11531:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11771, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 11144, - "src": "11531:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11772, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11542:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11773, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 11147, - "src": "11542:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11774, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11552:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 11150, - "src": "11552:12:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11776, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11765, - "src": "11566:1:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 11153, - "src": "11566:11:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - } - ], - "id": 11778, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11530:48:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_storage_$_t_array$_t_uint256_$dyn_storage_$_t_array$_t_string_storage_$dyn_storage_$_t_array$_t_bytes_storage_$dyn_storage_$", - "typeString": "tuple(address[] storage ref,uint256[] storage ref,string storage ref[] storage ref,bytes storage ref[] storage ref)" - } - }, - "functionReturnParameters": 11763, - "id": 11779, - "nodeType": "Return", - "src": "11523:55:10" - } - ] - }, - "documentation": null, - "id": 11781, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getActions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11749, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11232:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11748, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11232:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11231:20:10" - }, - "returnParameters": { - "id": 11763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11753, - "name": "targets", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11310:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 11751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11310:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 11752, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11310:9:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11756, - "name": "values", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11348:20:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 11754, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11348:4:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 11755, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11348:6:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11759, - "name": "signatures", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11382:26:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 11757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11382:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 11758, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11382:8:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11762, - "name": "calldatas", - "nodeType": "VariableDeclaration", - "scope": 11781, - "src": "11422:24:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 11760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11422:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 11761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11422:7:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11296:160:10" - }, - "scope": 12250, - "src": "11212:373:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11797, - "nodeType": "Block", - "src": "11711:61:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11790, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "11728:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11792, - "indexExpression": { - "argumentTypes": null, - "id": 11791, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11783, - "src": "11738:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "id": 11793, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "11728:30:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 11795, - "indexExpression": { - "argumentTypes": null, - "id": 11794, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11785, - "src": "11759:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11728:37:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "functionReturnParameters": 11789, - "id": 11796, - "nodeType": "Return", - "src": "11721:44:10" - } - ] - }, - "documentation": null, - "id": 11798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11783, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11611:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11611:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11785, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11631:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11784, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11631:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11610:35:10" - }, - "returnParameters": { - "id": 11789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11788, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11798, - "src": "11691:14:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_memory_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 11787, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "11691:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11690:16:10" - }, - "scope": 12250, - "src": "11591:181:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11900, - "nodeType": "Block", - "src": "11877:957:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11806, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11135, - "src": "11895:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 11807, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11912:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11895:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11809, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "11926:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11926:14:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11895:45:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726f706f73616c206964", - "id": 11813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11942:43:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - }, - "value": "GovernorAlpha::state: invalid proposal id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4e13bf7de4ba5f0690868b0ce8fbbb5874a1007783c383619a200c32a346f517", - "typeString": "literal_string \"GovernorAlpha::state: invalid proposal id\"" - } - ], - "id": 11805, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "11887:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11887:99:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11815, - "nodeType": "ExpressionStatement", - "src": "11887:99:10" - }, - { - "assignments": [ - 11817 - ], - "declarations": [ - { - "constant": false, - "id": 11817, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 11900, - "src": "11996:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 11816, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "11996:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11821, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 11818, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "12024:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 11820, - "indexExpression": { - "argumentTypes": null, - "id": 11819, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11800, - "src": "12034:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12024:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11996:49:10" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11822, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12059:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11823, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 11163, - "src": "12059:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11828, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12142:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12142:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11830, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12158:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11831, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "12158:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12142:35:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11837, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12242:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11839, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12258:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11157, - "src": "12258:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12242:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 11856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11846, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12339:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12339:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11848, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12360:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11849, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "12360:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12339:42:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11851, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12385:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "12385:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11853, - "name": "quorumVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11089, - "src": "12405:11:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 11854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12405:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12385:33:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12339:79:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11861, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12484:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11862, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12484:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 11863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12500:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12484:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11869, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11870, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 11165, - "src": "12568:17:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 11884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19256, - "src": "12651:5:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 11876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11878, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11817, - "src": "12677:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 11879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 11141, - "src": "12677:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 11880, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "12691:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 11881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "GRACE_PERIOD", - "nodeType": "MemberAccess", - "referencedDeclaration": 12260, - "src": "12691:21:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 11882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12691:23:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 11877, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "12670:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 11883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12670:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12651:64:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 11892, - "nodeType": "Block", - "src": "12776:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11889, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12797:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12797:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11891, - "nodeType": "Return", - "src": "12790:27:10" - } - ] - }, - "id": 11893, - "nodeType": "IfStatement", - "src": "12647:181:10", - "trueBody": { - "id": 11888, - "nodeType": "Block", - "src": "12717:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11885, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12738:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11886, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Expired", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12738:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11887, - "nodeType": "Return", - "src": "12731:28:10" - } - ] - } - }, - "id": 11894, - "nodeType": "IfStatement", - "src": "12564:264:10", - "trueBody": { - "id": 11874, - "nodeType": "Block", - "src": "12587:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11871, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12608:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12608:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11873, - "nodeType": "Return", - "src": "12601:29:10" - } - ] - } - }, - "id": 11895, - "nodeType": "IfStatement", - "src": "12480:348:10", - "trueBody": { - "id": 11868, - "nodeType": "Block", - "src": "12503:55:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11865, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12524:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12524:23:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11867, - "nodeType": "Return", - "src": "12517:30:10" - } - ] - } - }, - "id": 11896, - "nodeType": "IfStatement", - "src": "12335:493:10", - "trueBody": { - "id": 11860, - "nodeType": "Block", - "src": "12420:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11857, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12441:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Defeated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12441:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11859, - "nodeType": "Return", - "src": "12434:29:10" - } - ] - } - }, - "id": 11897, - "nodeType": "IfStatement", - "src": "12238:590:10", - "trueBody": { - "id": 11845, - "nodeType": "Block", - "src": "12277:52:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11842, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12298:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12298:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11844, - "nodeType": "Return", - "src": "12291:27:10" - } - ] - } - }, - "id": 11898, - "nodeType": "IfStatement", - "src": "12138:690:10", - "trueBody": { - "id": 11836, - "nodeType": "Block", - "src": "12179:53:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11833, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12200:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12200:21:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11835, - "nodeType": "Return", - "src": "12193:28:10" - } - ] - } - }, - "id": 11899, - "nodeType": "IfStatement", - "src": "12055:773:10", - "trueBody": { - "id": 11827, - "nodeType": "Block", - "src": "12078:54:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11824, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "12099:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 11825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12099:22:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "functionReturnParameters": 11804, - "id": 11826, - "nodeType": "Return", - "src": "12092:29:10" - } - ] - } - } - ] - }, - "documentation": null, - "id": 11901, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11800, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11793:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11793:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11792:20:10" - }, - "returnParameters": { - "id": 11804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 11901, - "src": "11858:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 11802, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11186, - "src": "11858:13:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11857:15:10" - }, - "scope": 12250, - "src": "11778:1056:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11915, - "nodeType": "Block", - "src": "12911:66:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 11909, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "12938:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 11910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12938:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 11911, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11903, - "src": "12950:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11912, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11905, - "src": "12962:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11908, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "12928:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12928:42:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11907, - "id": 11914, - "nodeType": "Return", - "src": "12921:49:10" - } - ] - }, - "documentation": null, - "id": 11916, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11903, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12858:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12858:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11905, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11916, - "src": "12878:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11904, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12878:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12857:34:10" - }, - "returnParameters": { - "id": 11907, - "nodeType": "ParameterList", - "parameters": [], - "src": "12911:0:10" - }, - "scope": 12250, - "src": "12840:137:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 11994, - "nodeType": "Block", - "src": "13136:797:10", - "statements": [ - { - "assignments": [ - 11930 - ], - "declarations": [ - { - "constant": false, - "id": 11930, - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13146:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11929, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13146:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11947, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11934, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11199, - "src": "13223:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11937, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11071, - "src": "13272:4:10", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory", - "typeString": "string memory" - } - ], - "id": 11936, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13266:5:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": "bytes" - }, - "id": 11938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13266:11:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11935, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13256:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11939, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13256:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 11940, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12249, - "src": "13296:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 11941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13296:12:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11943, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19284, - "src": "13334:4:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_GovernorAlpha_$12250", - "typeString": "contract GovernorAlpha" - } - ], - "id": 11942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13326:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13326:13:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 11932, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13195:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13195:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13195:158:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11931, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13172:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:191:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13146:217:10" - }, - { - "assignments": [ - 11949 - ], - "declarations": [ - { - "constant": false, - "id": 11949, - "name": "structHash", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13374:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11948, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11958, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11953, - "name": "BALLOT_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11204, - "src": "13446:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11954, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13479:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11955, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13507:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 11951, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13418:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13418:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13418:110:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11950, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13395:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13395:143:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13374:164:10" - }, - { - "assignments": [ - 11960 - ], - "declarations": [ - { - "constant": false, - "id": 11960, - "name": "digest", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13549:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11959, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13549:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11969, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 11964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13623:10:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 11965, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11930, - "src": "13651:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11966, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11949, - "src": "13684:10:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 11962, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13589:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13589:16:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 11967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13589:119:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 11961, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "13566:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 11968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13566:152:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13549:169:10" - }, - { - "assignments": [ - 11971 - ], - "declarations": [ - { - "constant": false, - "id": 11971, - "name": "signatory", - "nodeType": "VariableDeclaration", - "scope": 11994, - "src": "13729:17:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11970, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13729:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 11978, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11973, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11960, - "src": "13759:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11974, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11922, - "src": "13767:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 11975, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11924, - "src": "13770:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 11976, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11926, - "src": "13773:1:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 11972, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19258, - "src": "13749:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 11977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13749:26:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13729:46:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 11984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 11980, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13793:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 11982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13814:1:10", - "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": 11981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13806:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 11983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13806:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13793:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e76616c6964207369676e6174757265", - "id": 11985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13818:49:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - }, - "value": "GovernorAlpha::castVoteBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0985792d8cb800c80e50f8ecca736cc3e54b8c9588453e723506f4e50d429f9", - "typeString": "literal_string \"GovernorAlpha::castVoteBySig: invalid signature\"" - } - ], - "id": 11979, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "13785:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 11986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13785:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 11987, - "nodeType": "ExpressionStatement", - "src": "13785:83:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 11989, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11971, - "src": "13895:9:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 11990, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11918, - "src": "13906:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 11991, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11920, - "src": "13918:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 11988, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12094, - "src": "13885:9:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$returns$__$", - "typeString": "function (address,uint256,bool)" - } - }, - "id": 11992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13885:41:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 11928, - "id": 11993, - "nodeType": "Return", - "src": "13878:48:10" - } - ] - }, - "documentation": null, - "id": 11995, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVoteBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11927, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11918, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13015:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13015:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11920, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13043:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 11919, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13043:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11922, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13065:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 11921, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "13065:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11924, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13082:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11923, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13082:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11926, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 11995, - "src": "13101:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 11925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13101:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13005:111:10" - }, - "returnParameters": { - "id": 11928, - "nodeType": "ParameterList", - "parameters": [], - "src": "13136:0:10" - }, - "scope": 12250, - "src": "12983:950:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12093, - "nodeType": "Block", - "src": "14058:746:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - }, - "id": 12010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12006, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14082:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12005, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11901, - "src": "14076:5:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$11186_$", - "typeString": "function (uint256) view returns (enum GovernorAlpha.ProposalState)" - } - }, - "id": 12007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14076:17:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12008, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11186, - "src": "14097:13:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$11186_$", - "typeString": "type(enum GovernorAlpha.ProposalState)" - } - }, - "id": 12009, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14097:20:10", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$11186", - "typeString": "enum GovernorAlpha.ProposalState" - } - }, - "src": "14076:41:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6720697320636c6f736564", - "id": 12011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14119:44:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - }, - "value": "GovernorAlpha::_castVote: voting is closed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eede0aeb04f75d58f89f0b84608a4108da079ec9b462189375bbf8fd7e8edbaa", - "typeString": "literal_string \"GovernorAlpha::_castVote: voting is closed\"" - } - ], - "id": 12004, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14068:96:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12013, - "nodeType": "ExpressionStatement", - "src": "14068:96:10" - }, - { - "assignments": [ - 12015 - ], - "declarations": [ - { - "constant": false, - "id": 12015, - "name": "proposal", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14174:25:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 12014, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11170, - "src": "14174:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12019, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 12016, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11190, - "src": "14202:9:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$11170_storage_$", - "typeString": "mapping(uint256 => struct GovernorAlpha.Proposal storage ref)" - } - }, - "id": 12018, - "indexExpression": { - "argumentTypes": null, - "id": 12017, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14212:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14202:21:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage", - "typeString": "struct GovernorAlpha.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14174:49:10" - }, - { - "assignments": [ - 12021 - ], - "declarations": [ - { - "constant": false, - "id": 12021, - "name": "receipt", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14233:23:10", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 12020, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 11177, - "src": "14233:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12026, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12022, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14259:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12023, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 11169, - "src": "14259:17:10", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$11177_storage_$", - "typeString": "mapping(address => struct GovernorAlpha.Receipt storage ref)" - } - }, - "id": 12025, - "indexExpression": { - "argumentTypes": null, - "id": 12024, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14277:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14259:24:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage", - "typeString": "struct GovernorAlpha.Receipt storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14233:50:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 12031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12028, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14301:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12029, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14301:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 12030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14321:5:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14301:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74657220616c726561647920766f746564", - "id": 12032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14328:47:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - }, - "value": "GovernorAlpha::_castVote: voter already voted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b6e843e3ab725378b7b68db9a8698ac55194c56a0430edac6725cbe558ee624", - "typeString": "literal_string \"GovernorAlpha::_castVote: voter already voted\"" - } - ], - "id": 12027, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14293:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14293:83:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12034, - "nodeType": "ExpressionStatement", - "src": "14293:83:10" - }, - { - "assignments": [ - 12036 - ], - "declarations": [ - { - "constant": false, - "id": 12036, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 12093, - "src": "14386:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14386:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12043, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12039, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14420:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12040, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14427:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 11155, - "src": "14427:19:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12037, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11131, - "src": "14402:3:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMInterface_$12332", - "typeString": "contract YAMInterface" - } - }, - "id": 12038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 12323, - "src": "14402:17:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 12042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14402:45:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14386:61:10" - }, - { - "condition": { - "argumentTypes": null, - "id": 12044, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14462:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 12066, - "nodeType": "Block", - "src": "14554:85:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12056, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14568:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12058, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14568:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12060, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14599:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12061, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11161, - "src": "14599:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12062, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14622:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12059, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14592:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14592:36:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14568:60:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12065, - "nodeType": "ExpressionStatement", - "src": "14568:60:10" - } - ] - }, - "id": 12067, - "nodeType": "IfStatement", - "src": "14458:181:10", - "trueBody": { - "id": 12055, - "nodeType": "Block", - "src": "14471:77:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 12053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12045, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14485:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12047, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14485:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12049, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12015, - "src": "14512:8:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$11170_storage_ptr", - "typeString": "struct GovernorAlpha.Proposal storage pointer" - } - }, - "id": 12050, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11159, - "src": "14512:17:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12051, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14531:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12048, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12216, - "src": "14505:6:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 12052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14505:32:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14485:52:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12054, - "nodeType": "ExpressionStatement", - "src": "14485:52:10" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 12072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12068, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14649:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12070, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 11172, - "src": "14649:16:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 12071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14668:4:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14649:23:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12073, - "nodeType": "ExpressionStatement", - "src": "14649:23:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12074, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14682:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "support", - "nodeType": "MemberAccess", - "referencedDeclaration": 11174, - "src": "14682:15:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12077, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14700:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14682:25:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12079, - "nodeType": "ExpressionStatement", - "src": "14682:25:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12080, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12021, - "src": "14717:7:10", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$11177_storage_ptr", - "typeString": "struct GovernorAlpha.Receipt storage pointer" - } - }, - "id": 12082, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 11176, - "src": "14717:13:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 12083, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14733:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14717:21:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 12085, - "nodeType": "ExpressionStatement", - "src": "14717:21:10" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12087, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11997, - "src": "14763:5:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 12088, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11999, - "src": "14770:10:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 12089, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12001, - "src": "14782:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 12090, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12036, - "src": "14791:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 12086, - "name": "VoteCast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11238, - "src": "14754:8:10", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bool,uint256)" - } - }, - "id": 12091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14754:43:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12092, - "nodeType": "EmitStatement", - "src": "14749:48:10" - } - ] - }, - "documentation": null, - "id": 12094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_castVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12002, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11997, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13967:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 11996, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13967:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11999, - "name": "proposalId", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "13990:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13990:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12001, - "name": "support", - "nodeType": "VariableDeclaration", - "scope": 12094, - "src": "14018:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14018:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13957:79:10" - }, - "returnParameters": { - "id": 12003, - "nodeType": "ParameterList", - "parameters": [], - "src": "14058:0:10" - }, - "scope": 12250, - "src": "13939:865:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12110, - "nodeType": "Block", - "src": "14854:141:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12098, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "14872:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14872:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12100, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "14886:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14872:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14896:59:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__acceptAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_016a9c33adb814217df364e9cf73255610a85b9a37c739ee6a963286d80bad8d", - "typeString": "literal_string \"GovernorAlpha::__acceptAdmin: sender must be gov guardian\"" - } - ], - "id": 12097, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "14864:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14864:92:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12104, - "nodeType": "ExpressionStatement", - "src": "14864:92:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 12105, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "14966:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "acceptAdmin", - "nodeType": "MemberAccess", - "referencedDeclaration": 12263, - "src": "14966:20:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 12108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14966:22:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12109, - "nodeType": "ExpressionStatement", - "src": "14966:22:10" - } - ] - }, - "documentation": null, - "id": 12111, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12095, - "nodeType": "ParameterList", - "parameters": [], - "src": "14832:2:10" - }, - "returnParameters": { - "id": 12096, - "nodeType": "ParameterList", - "parameters": [], - "src": "14854:0:10" - }, - "scope": 12250, - "src": "14810:185:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12128, - "nodeType": "Block", - "src": "15042:137:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15060:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15060:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12117, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15074:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15060:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15084:56:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__abdicate: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f49e8b1dd028b5b562eda6ed4c810daf6cab5676cccf064826e3309bfa24f25f", - "typeString": "literal_string \"GovernorAlpha::__abdicate: sender must be gov guardian\"" - } - ], - "id": 12114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15052:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15052:89:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12121, - "nodeType": "ExpressionStatement", - "src": "15052:89:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 12122, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15151:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 12124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15170:1:10", - "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": 12123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15162:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15162:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15151:21:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 12127, - "nodeType": "ExpressionStatement", - "src": "15151:21:10" - } - ] - }, - "documentation": null, - "id": 12129, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__abdicate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12112, - "nodeType": "ParameterList", - "parameters": [], - "src": "15020:2:10" - }, - "returnParameters": { - "id": 12113, - "nodeType": "ParameterList", - "parameters": [], - "src": "15042:0:10" - }, - "scope": 12250, - "src": "15001:178:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12159, - "nodeType": "Block", - "src": "15304:245:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12137, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15322:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15322:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12139, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15336:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15322:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12141, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15346:76:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_71f6b53ee5a3d54940ff41e9a266ac547055c56b1388a7e8abdebb7afb4a7b7e", - "typeString": "literal_string \"GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12136, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15314:109:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12143, - "nodeType": "ExpressionStatement", - "src": "15314:109:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12148, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15467:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15459:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15459:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15478:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15481:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12154, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12131, - "src": "15520:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12152, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15509:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15509:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15509:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12156, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12133, - "src": "15538:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12144, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15433:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12285, - "src": "15433:25:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 12157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15433:109:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 12158, - "nodeType": "ExpressionStatement", - "src": "15433:109:10" - } - ] - }, - "documentation": null, - "id": 12160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__queueSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12131, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15234:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15234:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12133, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12160, - "src": "15267:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15267:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15224:60:10" - }, - "returnParameters": { - "id": 12135, - "nodeType": "ParameterList", - "parameters": [], - "src": "15304:0:10" - }, - "scope": 12250, - "src": "15185:364:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12190, - "nodeType": "Block", - "src": "15676:249:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 12171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "15694:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 12169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15694:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 12170, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11133, - "src": "15708:8:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15694:22:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 12172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15718:78:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3875e14bb9041148a3cf495f55cd1888ac6ea09fddd60712f1ffe3da9b3d0cbf", - "typeString": "literal_string \"GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 12167, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "15686:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15686:111:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12174, - "nodeType": "ExpressionStatement", - "src": "15686:111:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12179, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15843:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - ], - "id": 12178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15835:7:10", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 12180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15835:17:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 12181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15854:1:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 12182, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15857:26:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 12185, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12162, - "src": "15896:15:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 12183, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15885:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 12184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15885:10:10", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 12186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15885:27:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 12187, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12164, - "src": "15914:3:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 12175, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11129, - "src": "15807:8:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$12314", - "typeString": "contract TimelockInterface" - } - }, - "id": 12177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 12313, - "src": "15807:27:10", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 12188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15807:111:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 12189, - "nodeType": "ExpressionStatement", - "src": "15807:111:10" - } - ] - }, - "documentation": null, - "id": 12191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__executeSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12165, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12162, - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15606:23:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12161, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15606:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12164, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12191, - "src": "15639:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12163, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15639:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15596:60:10" - }, - "returnParameters": { - "id": 12166, - "nodeType": "ParameterList", - "parameters": [], - "src": "15676:0:10" - }, - "scope": 12250, - "src": "15555:370:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 12215, - "nodeType": "Block", - "src": "16001:98:10", - "statements": [ - { - "assignments": [ - 12201 - ], - "declarations": [ - { - "constant": false, - "id": 12201, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 12215, - "src": "16011:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12200, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16011:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12205, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12202, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16023:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 12203, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12195, - "src": "16027:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16023:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16011:17:10" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12207, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16046:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 12208, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12193, - "src": "16051:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16046:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6164646974696f6e206f766572666c6f77", - "id": 12210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16054:19:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - }, - "value": "addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - } - ], - "id": 12206, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16038:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16038:36:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12212, - "nodeType": "ExpressionStatement", - "src": "16038:36:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12213, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12201, - "src": "16091:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12199, - "id": 12214, - "nodeType": "Return", - "src": "16084:8:10" - } - ] - }, - "documentation": null, - "id": 12216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15947:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15947:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15958:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15958:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15946:22:10" - }, - "returnParameters": { - "id": 12199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12216, - "src": "15992:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15992:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15991:9:10" - }, - "scope": 12250, - "src": "15931:168:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12236, - "nodeType": "Block", - "src": "16175:79:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12226, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16193:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 12227, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16198:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16193:6:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7375627472616374696f6e20756e646572666c6f77", - "id": 12229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16201:23:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - }, - "value": "subtraction underflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - } - ], - "id": 12225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "16185:7:10", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 12230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16185:40:10", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 12231, - "nodeType": "ExpressionStatement", - "src": "16185:40:10" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 12234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 12232, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12218, - "src": "16242:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 12233, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12220, - "src": "16246:1:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16242:5:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12224, - "id": 12235, - "nodeType": "Return", - "src": "16235:12:10" - } - ] - }, - "documentation": null, - "id": 12237, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub256", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12218, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16121:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16121:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12220, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16132:9:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16132:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16120:22:10" - }, - "returnParameters": { - "id": 12224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12223, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12237, - "src": "16166:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16166:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16165:9:10" - }, - "scope": 12250, - "src": "16105:149:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 12248, - "nodeType": "Block", - "src": "16314:98:10", - "statements": [ - { - "assignments": [ - 12243 - ], - "declarations": [ - { - "constant": false, - "id": 12243, - "name": "chainId", - "nodeType": "VariableDeclaration", - "scope": 12248, - "src": "16324:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16324:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 12244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "16324:15:10" - }, - { - "externalReferences": [ - { - "chainId": { - "declaration": 12243, - "isOffset": false, - "isSlot": false, - "src": "16360:7:10", - "valueSize": 1 - } - } - ], - "id": 12245, - "nodeType": "InlineAssembly", - "operations": "{ chainId := chainid() }", - "src": "16349:33:10" - }, - { - "expression": { - "argumentTypes": null, - "id": 12246, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12243, - "src": "16398:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 12241, - "id": 12247, - "nodeType": "Return", - "src": "16391:14:10" - } - ] - }, - "documentation": null, - "id": 12249, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12238, - "nodeType": "ParameterList", - "parameters": [], - "src": "16279:2:10" - }, - "returnParameters": { - "id": 12241, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12240, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12249, - "src": "16305:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12239, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16305:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16304:9:10" - }, - "scope": 12250, - "src": "16260:152:10", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 12333, - "src": "1038:15376:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12314, - "linearizedBaseContracts": [ - 12314 - ], - "name": "TimelockInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12255, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delay", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12251, - "nodeType": "ParameterList", - "parameters": [], - "src": "16464:2:10" - }, - "returnParameters": { - "id": 12254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12253, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12255, - "src": "16490:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12252, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16490:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16489:9:10" - }, - "scope": 12314, - "src": "16450:49:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12260, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "GRACE_PERIOD", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12256, - "nodeType": "ParameterList", - "parameters": [], - "src": "16525:2:10" - }, - "returnParameters": { - "id": 12259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12258, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12260, - "src": "16551:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16551:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16550:9:10" - }, - "scope": 12314, - "src": "16504:56:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12263, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12261, - "nodeType": "ParameterList", - "parameters": [], - "src": "16585:2:10" - }, - "returnParameters": { - "id": 12262, - "nodeType": "ParameterList", - "parameters": [], - "src": "16596:0:10" - }, - "scope": 12314, - "src": "16565:32:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12270, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queuedTransactions", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12265, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16630:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12264, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16630:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16629:14:10" - }, - "returnParameters": { - "id": 12269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12268, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12270, - "src": "16667:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 12267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16667:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16666:6:10" - }, - "scope": 12314, - "src": "16602:71:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12285, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12281, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12272, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16704:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12271, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16704:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12274, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16720:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12273, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16720:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12276, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16735:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12275, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16735:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12278, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16762:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12277, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16762:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12280, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16783:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16783:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16703:92:10" - }, - "returnParameters": { - "id": 12284, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12283, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12285, - "src": "16814:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 12282, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16814:7:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16813:9:10" - }, - "scope": 12314, - "src": "16678:145:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12298, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12296, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12287, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16855:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16855:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12289, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16871:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16871:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12291, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16886:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12290, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16886:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12293, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16913:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12292, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "16913:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12295, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12298, - "src": "16934:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12294, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16934:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16854:92:10" - }, - "returnParameters": { - "id": 12297, - "nodeType": "ParameterList", - "parameters": [], - "src": "16955:0:10" - }, - "scope": 12314, - "src": "16828:128:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12313, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12300, - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "16989:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16989:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12302, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17005:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12301, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17005:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12304, - "name": "signature", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17020:25:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12303, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17020:6:10", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12306, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17047:19:10", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17047:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12308, - "name": "eta", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17068:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17068:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16988:92:10" - }, - "returnParameters": { - "id": 12312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12313, - "src": "17107:12:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 12310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17107:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17106:14:10" - }, - "scope": 12314, - "src": "16961:160:10", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "16416:707:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 12332, - "linearizedBaseContracts": [ - 12332 - ], - "name": "YAMInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 12323, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12316, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17177:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 12315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17177:7:10", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12318, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17194:19:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17194:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17176:38:10" - }, - "returnParameters": { - "id": 12322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12323, - "src": "17238:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17238:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17237:9:10" - }, - "scope": 12332, - "src": "17154:93:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12328, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "initSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12324, - "nodeType": "ParameterList", - "parameters": [], - "src": "17271:2:10" - }, - "returnParameters": { - "id": 12327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 12326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12328, - "src": "17297:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17297:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17296:9:10" - }, - "scope": 12332, - "src": "17252:54:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 12331, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12329, - "nodeType": "ParameterList", - "parameters": [], - "src": "17330:2:10" - }, - "returnParameters": { - "id": 12330, - "nodeType": "ParameterList", - "parameters": [], - "src": "17341:0:10" - }, - "scope": 12332, - "src": "17311:31:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 12333, - "src": "17125:219:10" - } - ], - "src": "0:17345:10" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.053Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMLENDPool.json b/build/contracts/YAMLENDPool.json deleted file mode 100644 index 0e2ac39..0000000 --- a/build/contracts/YAMLENDPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMLENDPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lend", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lend\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMLENDPool.sol\":\"YAMLENDPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMLENDPool.sol\":{\"keccak256\":\"0x6c5273ca8ad3463af4473881f066569b1884dd6b0aa529f3e372e9645a200c36\",\"urls\":[\"bzz-raw://d21958191ade4cf71274d9c47a4eed7950b044b21b73d6d0d79c727af8dcbe14\",\"dweb:/ipfs/QmYgEwZcmHdUDVm29HiJAe6jprbAqf8ZPgERA5WEAdqsvD\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b03199081167380fb784b7ed66730e8b1dbd9820afd29931aab0317825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c806380faa57d116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b1461037857806397dffc6114610394576101ad565b806380faa57d1461032d5780638b876347146103355780638da5889714610368576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b6101e5610cc8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cdb565b6101e5610ced565b610232610cf3565b610380610d0f565b604080519115158252519081900360200190f35b610232610d4f565b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d0f565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d0f565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cd642600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d336111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b33610d74610f09565b600a55610d7f610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cd6610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610cc8565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d0f565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158206804baa0a54fc1a3f0773e3cfc6137113469d0cf9ad2517b014a511cce33c21564736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c806380faa57d116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b1461037857806397dffc6114610394576101ad565b806380faa57d1461032d5780638b876347146103355780638da5889714610368576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b6101e5610cc8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cdb565b6101e5610ced565b610232610cf3565b610380610d0f565b604080519115158252519081900360200190f35b610232610d4f565b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d0f565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d0f565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cd642600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d336111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b33610d74610f09565b600a55610d7f610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cd6610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610cc8565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d0f565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158206804baa0a54fc1a3f0773e3cfc6137113469d0cf9ad2517b014a511cce33c21564736f6c63430005110032", - "sourceMap": "22374:3902:4:-;;;21553:71;;;-1:-1:-1;;;;;;21553:71:4;;;21581:42;21553:71;;;22449:70;;;;;;22476:42;22449:70;;;22615:10;22588:37;;22669:31;;;;22706:29;;9510:12;-1:-1:-1;;;;;9510:10:4;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:4;-1:-1:-1;;;;;9501:21:4;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:4;;-1:-1:-1;;9537:40:4;22374:3902;;8448:96;8527:10;8448:96;:::o;22374:3902::-;;;;;;;", - "deployedSourceMap": "22374:3902:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22374:3902:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24126:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24126:259:4;;;;:::i;:::-;;;;;;;;;;;;;;;;22880:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22880:42:4;;;;:::i;22449:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:4;;;;:::i;:::-;;20906:33;;;:::i;21717:89::-;;;:::i;22525:41::-;;;:::i;24677:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24677:210:4;;:::i;25442:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25442:832:4;;:::i;24993:443::-;;;:::i;21812:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21812:108:4;;;;:::i;10445:137::-;;;:::i;22706:29::-;;;:::i;23577:129::-;;;:::i;22817:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22817:57:4;;;;:::i;22588:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;21553:71;;;:::i;24473:198::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24473:198:4;;:::i;22741:29::-;;;:::i;23712:408::-;;;:::i;22776:35::-;;;:::i;24893:94::-;;;:::i;22669:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:4;;;;:::i;24126:259::-;24361:16;;;24180:7;24361:16;;;:7;:16;;;;;;;;;24279:22;:31;;;;;;24218:160;;24361:16;24218:121;;24334:4;;24218:94;;24258:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24218:18;24228:7;24218:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24199:179;24126:259;-1:-1:-1;;24126:259:4:o;22880:42::-;;;;;;;;;;;;;:::o;22449:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21717:89::-;21787:12;;21717:89;;:::o;22525:41::-;22560:6;22525:41;:::o;24677:210::-;24731:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24781:1;24772:6;:10;24764:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24814:22;24829:6;24814:14;:22::i;:::-;24851:29;;;;;;;;24861:10;;24851:29;;;;;;;;;;24677:210;;:::o;25442:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25563:1;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;25603:9;;25585:15;:27;25581:687;;;25649:12;;25630:15;:31;25626:310;;25692:20;:6;22560;25692:20;:10;:20;:::i;:::-;25679:10;:33;25626:310;;;25767:12;;25747:17;;25767:33;;25784:15;25767:33;:16;:33;:::i;:::-;25747:53;;25816:16;25835:25;25849:10;;25835:9;:13;;:25;;;;:::i;:::-;25816:44;-1:-1:-1;25889:34:4;22560:6;25889:20;:6;25816:44;25889:20;:10;:20;:::i;:34::-;25876:10;:47;-1:-1:-1;;25626:310:4;25964:15;25947:14;:32;;;26006:29;;22560:6;26006:29;:19;:29;:::i;:::-;25991:12;:44;26052:19;;;;;;;;;;;;;;;;;25581:687;;;26113:20;:6;22560;26113:20;:10;:20;:::i;:::-;26100:10;:33;26162:9;;26145:14;:26;;;26198:23;;22560:6;26198:23;:13;:23;:::i;:::-;26183:12;:38;26238:19;;;;;;;;;;;;;;;;;25581:687;21139:1;25442:832;:::o;24993:443::-;25034:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25067:14;25084:18;25091:10;25084:6;:18::i;:::-;25067:35;-1:-1:-1;25116:10:4;;25112:318;;25150:10;25164:1;25142:19;;;:7;:19;;;;;;;;:23;;;25215:3;;25203:37;;;;;;;25142:19;25215:3;;;;25203:35;;:37;;;;;;;;;;;25164:1;25215:3;25203:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25203:37:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25203:37:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25203:37:4;;-1:-1:-1;25254:18:4;25275:37;25305:6;25275:25;:6;25203:37;25275:25;:10;:25;:::i;:37::-;25326:3;;25254:58;;-1:-1:-1;25326:40:4;;:3;;25343:10;25254:58;25326:40;:16;:40;:::i;:::-;25385:34;;;;;;;;25396:10;;25385:34;;;;;;;;;;25112:318;;23235:1;24993:443;:::o;21812:108::-;21895:18;;21869:7;21895:18;;;:9;:18;;;;;;;21812:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22706:29::-;;;;:::o;23577:129::-;23634:7;23660:39;23669:15;23686:12;;23660:8;:39::i;:::-;23653:46;;23577:129;:::o;22817:57::-;;;;;;;;;;;;;:::o;22588:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;21553:71::-;;;;;;:::o;24473:198::-;24524:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24574:1;24565:6;:10;24557:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24604:19;24616:6;24604:11;:19::i;:::-;24638:26;;;;;;;;24645:10;;24638:26;;;;;;;;;;24473:198;;:::o;22741:29::-;;;;:::o;23712:408::-;23759:7;23782:13;:11;:13::i;:::-;23778:76;;-1:-1:-1;23823:20:4;;23816:27;;23778:76;23882:231;23924:175;24085:13;:11;:13::i;:::-;23924:135;24054:4;23924:104;24017:10;;23924:67;23976:14;;23924:26;:24;:26::i;:175::-;23882:20;;;:231;:24;:231;:::i;22776:35::-;;;;:::o;24893:94::-;24928:31;24937:21;24947:10;24937:9;:21::i;:::-;24928:8;:31::i;:::-;24969:11;:9;:11::i;:::-;24893:94::o;22669:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:4:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:4;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22159:211;22225:12;;:24;;22242:6;22225:24;:16;:24;:::i;:::-;22210:12;:39;22293:10;22283:21;;;;:9;:21;;;;;;:33;;22309:6;22283:33;:25;:33;:::i;:::-;22269:10;22259:21;;;;:9;:21;;;;;:57;;;;22326:4;;:37;;22259:21;22326:4;;;;22356:6;22326:17;:37::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:4;;;;;;;;25:18:-1;;61:17;;17776:58:4;182:15:-1;17799:23:4;179:29:-1;160:49;;17750:85:4;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:4;;1848:104;-1:-1:-1;1848:104:4:o;21926:227::-;21989:12;;:24;;22006:6;21989:24;:16;:24;:::i;:::-;21974:12;:39;22057:10;22047:21;;;;:9;:21;;;;;;:33;;22073:6;22047:33;:25;:33;:::i;:::-;22033:10;22023:21;;;;:9;:21;;;;;:57;;;;22090:4;;:56;;22023:21;22090:4;;;;22132;22139:6;22090:21;:56::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:4;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:4;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:4:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:4;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:4;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:4;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:4;;;;;;;;25:18:-1;;61:17;;17974:68:4;182:15:-1;17997:27:4;179:29:-1;160:49;;17948:95:4;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:4:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public lend = IERC20(0x80fB784B7eD66730e8b1DBd9820aFD29931aab03);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n lend.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n lend.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMLENDPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart() {\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMLENDPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMLENDPool.sol", - "exportedSymbols": { - "Address": [ - 4534 - ], - "Context": [ - 4280 - ], - "IERC20": [ - 4460 - ], - "IRewardDistributionRecipient": [ - 4785 - ], - "LPTokenWrapper": [ - 4901 - ], - "Math": [ - 4068 - ], - "Ownable": [ - 4392 - ], - "SafeERC20": [ - 4750 - ], - "SafeMath": [ - 4254 - ], - "YAM": [ - 4792 - ], - "YAMLENDPool": [ - 5320 - ] - }, - "id": 5321, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 4001, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 4068, - "linearizedBaseContracts": [ - 4068 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4017, - "nodeType": "Block", - "src": "1739:38:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4010, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4003, - "src": "1756:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4011, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4005, - "src": "1761:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 4014, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4005, - "src": "1769:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:4", - "trueExpression": { - "argumentTypes": null, - "id": 4013, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4003, - "src": "1765:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4009, - "id": 4016, - "nodeType": "Return", - "src": "1749:21:4" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 4018, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4006, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4003, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4018, - "src": "1685:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4002, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4005, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4018, - "src": "1696:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:4" - }, - "returnParameters": { - "id": 4009, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4008, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4018, - "src": "1730:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4007, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:4" - }, - "scope": 4068, - "src": "1672:105:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4034, - "nodeType": "Block", - "src": "1915:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4027, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4020, - "src": "1932:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 4028, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4022, - "src": "1936:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 4031, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4022, - "src": "1944:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:4", - "trueExpression": { - "argumentTypes": null, - "id": 4030, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4020, - "src": "1940:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4026, - "id": 4033, - "nodeType": "Return", - "src": "1925:20:4" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 4035, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4023, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4020, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "1861:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4019, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4022, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "1872:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4021, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:4" - }, - "returnParameters": { - "id": 4026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4025, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "1906:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4024, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:4" - }, - "scope": 4068, - "src": "1848:104:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4066, - "nodeType": "Block", - "src": "2136:119:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4044, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "2208:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4045, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4047, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4048, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "2218:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4051, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4053, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "2229:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4054, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4056, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "2237:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4060, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4061, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4063, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4043, - "id": 4065, - "nodeType": "Return", - "src": "2200:48:4" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 4067, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4037, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4067, - "src": "2082:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4036, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4039, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4067, - "src": "2093:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4038, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:4" - }, - "returnParameters": { - "id": 4043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4042, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4067, - "src": "2127:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4041, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:4" - }, - "scope": 4068, - "src": "2065:190:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "1589:668:4" - }, - { - "id": 4069, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 4254, - "linearizedBaseContracts": [ - 4254 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4093, - "nodeType": "Block", - "src": "3212:109:4", - "statements": [ - { - "assignments": [ - 4079 - ], - "declarations": [ - { - "constant": false, - "id": 4079, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4093, - "src": "3222:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4078, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4083, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4080, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4071, - "src": "3234:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 4081, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4073, - "src": "3238:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4085, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4079, - "src": "3257:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4086, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4071, - "src": "3262:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 4088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 4084, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4090, - "nodeType": "ExpressionStatement", - "src": "3249:46:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4091, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4079, - "src": "3313:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4077, - "id": 4092, - "nodeType": "Return", - "src": "3306:8:4" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 4094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4074, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4071, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4094, - "src": "3158:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4070, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4073, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4094, - "src": "3169:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4072, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:4" - }, - "returnParameters": { - "id": 4077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4076, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4094, - "src": "3203:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4075, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:4" - }, - "scope": 4254, - "src": "3145:176:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4109, - "nodeType": "Block", - "src": "3652:67:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4104, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "3673:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4105, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4098, - "src": "3676:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 4106, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 4103, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4110, - 4137 - ], - "referencedDeclaration": 4137, - "src": "3669:3:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4102, - "id": 4108, - "nodeType": "Return", - "src": "3662:50:4" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 4110, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4099, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4096, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "3598:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4095, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4098, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "3609:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4097, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:4" - }, - "returnParameters": { - "id": 4102, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4101, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "3643:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4100, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:4" - }, - "scope": 4254, - "src": "3585:134:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4136, - "nodeType": "Block", - "src": "4138:92:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4122, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4114, - "src": "4156:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 4123, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4112, - "src": "4161:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 4125, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4116, - "src": "4164:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4127, - "nodeType": "ExpressionStatement", - "src": "4148:29:4" - }, - { - "assignments": [ - 4129 - ], - "declarations": [ - { - "constant": false, - "id": 4129, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4136, - "src": "4187:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4133, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4130, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4112, - "src": "4199:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 4131, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4114, - "src": "4203:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4134, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4129, - "src": "4222:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4120, - "id": 4135, - "nodeType": "Return", - "src": "4215:8:4" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 4137, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4112, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4056:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4111, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4114, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4067:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4116, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4078:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4115, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:4" - }, - "returnParameters": { - "id": 4120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4119, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4129:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4118, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:4" - }, - "scope": 4254, - "src": "4043:187:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4170, - "nodeType": "Block", - "src": "4537:392:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4146, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "4769:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4152, - "nodeType": "IfStatement", - "src": "4765:45:4", - "trueBody": { - "id": 4151, - "nodeType": "Block", - "src": "4777:33:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4149, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 4145, - "id": 4150, - "nodeType": "Return", - "src": "4791:8:4" - } - ] - } - }, - { - "assignments": [ - 4154 - ], - "declarations": [ - { - "constant": false, - "id": 4154, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4170, - "src": "4820:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4153, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4158, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4155, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "4832:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 4156, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4141, - "src": "4836:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4160, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4154, - "src": "4855:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 4161, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "4859:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4163, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4141, - "src": "4864:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 4165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 4159, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4167, - "nodeType": "ExpressionStatement", - "src": "4847:56:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4168, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4154, - "src": "4921:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4145, - "id": 4169, - "nodeType": "Return", - "src": "4914:8:4" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 4171, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4139, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4171, - "src": "4483:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4141, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4171, - "src": "4494:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:4" - }, - "returnParameters": { - "id": 4145, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4144, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4171, - "src": "4528:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4143, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:4" - }, - "scope": 4254, - "src": "4470:459:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4186, - "nodeType": "Block", - "src": "5451:63:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4181, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4173, - "src": "5472:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4182, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4175, - "src": "5475:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 4183, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 4180, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4187, - 4214 - ], - "referencedDeclaration": 4214, - "src": "5468:3:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4179, - "id": 4185, - "nodeType": "Return", - "src": "5461:46:4" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 4187, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4173, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4187, - "src": "5397:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4172, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4175, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4187, - "src": "5408:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:4" - }, - "returnParameters": { - "id": 4179, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4178, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4187, - "src": "5442:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4177, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:4" - }, - "scope": 4254, - "src": "5384:130:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4213, - "nodeType": "Block", - "src": "6124:243:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4199, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4191, - "src": "6208:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4200, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 4202, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4193, - "src": "6215:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4198, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4204, - "nodeType": "ExpressionStatement", - "src": "6200:28:4" - }, - { - "assignments": [ - 4206 - ], - "declarations": [ - { - "constant": false, - "id": 4206, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4213, - "src": "6238:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4210, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4207, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4189, - "src": "6250:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 4208, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4191, - "src": "6254:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4211, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4206, - "src": "6359:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4197, - "id": 4212, - "nodeType": "Return", - "src": "6352:8:4" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 4214, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4194, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4189, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6042:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4191, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6053:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4193, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6064:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4192, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:4" - }, - "returnParameters": { - "id": 4197, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4196, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6115:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4195, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:4" - }, - "scope": 4254, - "src": "6029:338:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4229, - "nodeType": "Block", - "src": "6878:61:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4224, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4216, - "src": "6899:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4225, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "6902:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 4226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 4223, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4230, - 4253 - ], - "referencedDeclaration": 4253, - "src": "6895:3:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4222, - "id": 4228, - "nodeType": "Return", - "src": "6888:44:4" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 4230, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4219, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4216, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4230, - "src": "6824:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4215, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4218, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4230, - "src": "6835:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:4" - }, - "returnParameters": { - "id": 4222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4221, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4230, - "src": "6869:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:4" - }, - "scope": 4254, - "src": "6811:128:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4252, - "nodeType": "Block", - "src": "7538:68:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4242, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "7556:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4243, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 4245, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4236, - "src": "7564:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4241, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4247, - "nodeType": "ExpressionStatement", - "src": "7548:29:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4248, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4232, - "src": "7594:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 4249, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "7598:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4240, - "id": 4251, - "nodeType": "Return", - "src": "7587:12:4" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 4253, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4232, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7456:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4234, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7467:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4233, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4236, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7478:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4235, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:4" - }, - "returnParameters": { - "id": 4240, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4239, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7529:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4238, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:4" - }, - "scope": 4254, - "src": "7443:163:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "2900:4708:4" - }, - { - "id": 4255, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 4280, - "linearizedBaseContracts": [ - 4280 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4258, - "nodeType": "Block", - "src": "8386:3:4", - "statements": [] - }, - "documentation": null, - "id": 4259, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4256, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:4" - }, - "returnParameters": { - "id": 4257, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:4" - }, - "scope": 4280, - "src": "8362:27:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4267, - "nodeType": "Block", - "src": "8510:34:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4264, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 4263, - "id": 4266, - "nodeType": "Return", - "src": "8520:17:4" - } - ] - }, - "documentation": null, - "id": 4268, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4260, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:4" - }, - "returnParameters": { - "id": 4263, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4262, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4268, - "src": "8493:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 4261, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:4", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:4" - }, - "scope": 4280, - "src": "8448:96:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4278, - "nodeType": "Block", - "src": "8607:165:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4273, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19329, - "src": "8617:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$4280", - "typeString": "contract Context" - } - }, - "id": 4274, - "nodeType": "ExpressionStatement", - "src": "8617:4:4" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4275, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 4272, - "id": 4277, - "nodeType": "Return", - "src": "8750:15:4" - } - ] - }, - "documentation": null, - "id": 4279, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4269, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:4" - }, - "returnParameters": { - "id": 4272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4279, - "src": "8593:12:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4270, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:4" - }, - "scope": 4280, - "src": "8550:222:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "8185:589:4" - }, - { - "id": 4281, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4282, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4280, - "src": "9238:7:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$4280", - "typeString": "contract Context" - } - }, - "id": 4283, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:4" - } - ], - "contractDependencies": [ - 4280 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 4392, - "linearizedBaseContracts": [ - 4392, - 4280 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4285, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 4392, - "src": "9252:22:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4284, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 4291, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 4290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4287, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 4291, - "src": "9308:29:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4289, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 4291, - "src": "9339:24:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4288, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:4" - }, - "src": "9281:84:4" - }, - { - "body": { - "id": 4306, - "nodeType": "Block", - "src": "9491:93:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4294, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "9501:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4295, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "9510:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 4296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4298, - "nodeType": "ExpressionStatement", - "src": "9501:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4301, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:4", - "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": 4300, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4302, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 4303, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "9570:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4299, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4291, - "src": "9537:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 4304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4305, - "nodeType": "EmitStatement", - "src": "9532:45:4" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 4307, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4292, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:4" - }, - "returnParameters": { - "id": 4293, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:4" - }, - "scope": 4392, - "src": "9467:117:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4314, - "nodeType": "Block", - "src": "9707:30:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4312, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "9724:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 4311, - "id": 4313, - "nodeType": "Return", - "src": "9717:13:4" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 4315, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4308, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:4" - }, - "returnParameters": { - "id": 4311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4310, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4315, - "src": "9698:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:4" - }, - "scope": 4392, - "src": "9660:77:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4324, - "nodeType": "Block", - "src": "9846:82:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4318, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "9864:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 4319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 4320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 4317, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4322, - "nodeType": "ExpressionStatement", - "src": "9856:54:4" - }, - { - "id": 4323, - "nodeType": "PlaceholderStatement", - "src": "9920:1:4" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 4325, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4316, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:4" - }, - "src": "9825:103:4", - "visibility": "internal" - }, - { - "body": { - "id": 4335, - "nodeType": "Block", - "src": "10057:46:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4330, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "10074:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 4331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4332, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "10090:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4329, - "id": 4334, - "nodeType": "Return", - "src": "10067:29:4" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 4336, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4326, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:4" - }, - "returnParameters": { - "id": 4329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4328, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4336, - "src": "10051:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4327, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:4" - }, - "scope": 4392, - "src": "10011:92:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4354, - "nodeType": "Block", - "src": "10491:91:4", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4342, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "10527:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4344, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:4", - "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": 4343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4345, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4341, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4291, - "src": "10506:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 4346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4347, - "nodeType": "EmitStatement", - "src": "10501:45:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4348, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "10556:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:4", - "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": 4349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4351, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4353, - "nodeType": "ExpressionStatement", - "src": "10556:19:4" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 4355, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4339, - "modifierName": { - "argumentTypes": null, - "id": 4338, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4325, - "src": "10481:9:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:4" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4337, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:4" - }, - "returnParameters": { - "id": 4340, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:4" - }, - "scope": 4392, - "src": "10445:137:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4366, - "nodeType": "Block", - "src": "10793:45:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4363, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4357, - "src": "10822:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4362, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4391, - "src": "10803:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 4364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4365, - "nodeType": "ExpressionStatement", - "src": "10803:28:4" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 4367, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4360, - "modifierName": { - "argumentTypes": null, - "id": 4359, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4325, - "src": "10783:9:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:4" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4357, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 4367, - "src": "10758:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4356, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:4" - }, - "returnParameters": { - "id": 4361, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:4" - }, - "scope": 4392, - "src": "10731:107:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4390, - "nodeType": "Block", - "src": "10994:170:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4373, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4369, - "src": "11012:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:4", - "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": 4374, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4376, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 4378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 4372, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4380, - "nodeType": "ExpressionStatement", - "src": "11004:73:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4382, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "11113:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4383, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4369, - "src": "11121:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4381, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4291, - "src": "11092:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 4384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4385, - "nodeType": "EmitStatement", - "src": "11087:43:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4386, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "11140:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4387, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4369, - "src": "11149:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4389, - "nodeType": "ExpressionStatement", - "src": "11140:17:4" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 4391, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4369, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 4391, - "src": "10967:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4368, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:4" - }, - "returnParameters": { - "id": 4371, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:4" - }, - "scope": 4392, - "src": "10939:225:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "9218:1948:4" - }, - { - "id": 4393, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 4460, - "linearizedBaseContracts": [ - 4460 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 4398, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4394, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:4" - }, - "returnParameters": { - "id": 4397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4396, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4398, - "src": "11541:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4395, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:4" - }, - "scope": 4460, - "src": "11495:55:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 4405, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4400, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4405, - "src": "11652:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4399, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:4" - }, - "returnParameters": { - "id": 4404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4403, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4405, - "src": "11692:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4402, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:4" - }, - "scope": 4460, - "src": "11633:68:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 4414, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4407, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 4414, - "src": "11939:17:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4406, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4409, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4414, - "src": "11958:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:4" - }, - "returnParameters": { - "id": 4413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4412, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4414, - "src": "11992:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4411, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:4" - }, - "scope": 4460, - "src": "11921:77:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 4423, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4419, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4416, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 4423, - "src": "12292:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4415, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4418, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4423, - "src": "12307:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4417, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:4" - }, - "returnParameters": { - "id": 4422, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4421, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4423, - "src": "12347:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4420, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:4" - }, - "scope": 4460, - "src": "12273:83:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 4432, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4428, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4425, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4432, - "src": "13026:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4424, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4427, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4432, - "src": "13043:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:4" - }, - "returnParameters": { - "id": 4431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4430, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4432, - "src": "13077:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4429, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:4" - }, - "scope": 4460, - "src": "13009:74:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 4443, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4434, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13412:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4433, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4436, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13428:17:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4435, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4438, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13447:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4437, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:4" - }, - "returnParameters": { - "id": 4442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4441, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13481:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4440, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:4" - }, - "scope": 4460, - "src": "13390:97:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 4451, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 4450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4445, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 4451, - "src": "13671:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4444, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4447, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 4451, - "src": "13693:18:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4446, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4449, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4451, - "src": "13713:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4448, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:4" - }, - "src": "13656:72:4" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 4459, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 4458, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4453, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 4459, - "src": "13902:21:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4452, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4455, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4459, - "src": "13925:23:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4454, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4457, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4459, - "src": "13950:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4456, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:4" - }, - "src": "13887:78:4" - } - ], - "scope": 5321, - "src": "11401:2566:4" - }, - { - "id": 4461, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 4534, - "linearizedBaseContracts": [ - 4534 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4485, - "nodeType": "Block", - "src": "14644:731:4", - "statements": [ - { - "assignments": [ - 4469 - ], - "declarations": [ - { - "constant": false, - "id": 4469, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 4485, - "src": "15083:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4468, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4470, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:4" - }, - { - "assignments": [ - 4472 - ], - "declarations": [ - { - "constant": false, - "id": 4472, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 4485, - "src": "15109:19:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4471, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4474, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 4473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:4" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 4469, - "isOffset": false, - "isSlot": false, - "src": "15274:8:4", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 4463, - "isOffset": false, - "isSlot": false, - "src": "15298:7:4", - "valueSize": 1 - } - } - ], - "id": 4475, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:4" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 4478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4476, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4469, - "src": "15325:8:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 4477, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 4481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4479, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4469, - "src": "15344:8:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 4480, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4472, - "src": "15356:11:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4483, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4467, - "id": 4484, - "nodeType": "Return", - "src": "15317:51:4" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 4486, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4463, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4486, - "src": "14598:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4462, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:4" - }, - "returnParameters": { - "id": 4467, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4466, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4486, - "src": "14638:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4465, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:4" - }, - "scope": 4534, - "src": "14578:797:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4499, - "nodeType": "Block", - "src": "15660:49:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4495, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4488, - "src": "15693:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 4496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 4493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 4492, - "id": 4498, - "nodeType": "Return", - "src": "15670:32:4" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 4500, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4489, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4488, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4500, - "src": "15603:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4487, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:4" - }, - "returnParameters": { - "id": 4492, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4491, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4500, - "src": "15643:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 4490, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:4", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:4" - }, - "scope": 4534, - "src": "15584:125:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4532, - "nodeType": "Block", - "src": "16737:294:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4509, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19335, - "src": "16763:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4534", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$4534", - "typeString": "library Address" - } - ], - "id": 4508, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4512, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4504, - "src": "16780:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 4514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 4507, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4516, - "nodeType": "ExpressionStatement", - "src": "16747:73:4" - }, - { - "assignments": [ - 4518, - null - ], - "declarations": [ - { - "constant": false, - "id": 4518, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4532, - "src": "16886:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4517, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 4526, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 4524, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 4522, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4504, - "src": "16925:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4519, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4502, - "src": "16904:9:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 4520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:4", - "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": 4521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 4523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:4", - "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": 4525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4528, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4518, - "src": "16954:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 4529, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 4527, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4531, - "nodeType": "ExpressionStatement", - "src": "16946:78:4" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 4533, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4505, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4502, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 4533, - "src": "16685:25:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 4501, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:4", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4504, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4533, - "src": "16712:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4503, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:4" - }, - "returnParameters": { - "id": 4506, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:4" - }, - "scope": 4534, - "src": "16666:365:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "14114:2919:4" - }, - { - "id": 4535, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 4750, - "linearizedBaseContracts": [ - 4750 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 4538, - "libraryName": { - "contractScope": null, - "id": 4536, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4254, - "src": "17610:8:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$4254", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:4", - "typeName": { - "id": 4537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 4541, - "libraryName": { - "contractScope": null, - "id": 4539, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4534, - "src": "17642:7:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4534", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:4", - "typeName": { - "id": 4540, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 4562, - "nodeType": "Block", - "src": "17740:102:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4551, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4543, - "src": "17769:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4554, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4543, - "src": "17799:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4414, - "src": "17799:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4557, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4545, - "src": "17824:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4558, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4547, - "src": "17828:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4552, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4550, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "17750:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4561, - "nodeType": "ExpressionStatement", - "src": "17750:85:4" - } - ] - }, - "documentation": null, - "id": 4563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4543, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4563, - "src": "17690:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4542, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "17690:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4545, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 4563, - "src": "17704:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4544, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4547, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4563, - "src": "17716:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:4" - }, - "returnParameters": { - "id": 4549, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:4" - }, - "scope": 4750, - "src": "17668:174:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4587, - "nodeType": "Block", - "src": "17938:112:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4575, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4565, - "src": "17967:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4578, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4565, - "src": "17997:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 4443, - "src": "17997:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 4580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4581, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4567, - "src": "18026:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4582, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4569, - "src": "18032:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4583, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4571, - "src": "18036:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4576, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4574, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "17948:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4586, - "nodeType": "ExpressionStatement", - "src": "17948:95:4" - } - ] - }, - "documentation": null, - "id": 4588, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4572, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4565, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17874:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4564, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "17874:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4567, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17888:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4566, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4569, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17902:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4568, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4571, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17914:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4570, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:4" - }, - "returnParameters": { - "id": 4573, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:4" - }, - "scope": 4750, - "src": "17848:202:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4628, - "nodeType": "Block", - "src": "18132:536:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4598, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4594, - "src": "18421:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4599, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4601, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4605, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19337, - "src": "18461:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - ], - "id": 4604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4607, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4592, - "src": "18468:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4602, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4590, - "src": "18437:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 4423, - "src": "18437:15:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 4608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4611, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 4613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 4597, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4615, - "nodeType": "ExpressionStatement", - "src": "18412:150:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4617, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4590, - "src": "18591:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4620, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4590, - "src": "18621:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 4432, - "src": "18621:13:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4623, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4592, - "src": "18645:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4624, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4594, - "src": "18654:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4618, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4616, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "18572:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4627, - "nodeType": "ExpressionStatement", - "src": "18572:89:4" - } - ] - }, - "documentation": null, - "id": 4629, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4590, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4629, - "src": "18077:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4589, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "18077:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4592, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4629, - "src": "18091:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4594, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4629, - "src": "18108:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4593, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:4" - }, - "returnParameters": { - "id": 4596, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:4" - }, - "scope": 4750, - "src": "18056:612:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4663, - "nodeType": "Block", - "src": "18760:196:4", - "statements": [ - { - "assignments": [ - 4639 - ], - "declarations": [ - { - "constant": false, - "id": 4639, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 4663, - "src": "18770:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4638, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4650, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4648, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4635, - "src": "18837:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4643, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19337, - "src": "18817:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - ], - "id": 4642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4645, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4633, - "src": "18824:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4640, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "18793:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 4423, - "src": "18793:15:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 4646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "18793:43:4", - "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": 4649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4652, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "18872:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4655, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "18902:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 4432, - "src": "18902:13:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4658, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4633, - "src": "18926:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4659, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4639, - "src": "18935:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4653, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4651, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "18853:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4662, - "nodeType": "ExpressionStatement", - "src": "18853:96:4" - } - ] - }, - "documentation": null, - "id": 4664, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4636, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4631, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4664, - "src": "18705:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4630, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "18705:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4633, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4664, - "src": "18719:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4632, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4635, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4664, - "src": "18736:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4634, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:4" - }, - "returnParameters": { - "id": 4637, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:4" - }, - "scope": 4750, - "src": "18674:282:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4699, - "nodeType": "Block", - "src": "19048:241:4", - "statements": [ - { - "assignments": [ - 4674 - ], - "declarations": [ - { - "constant": false, - "id": 4674, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 4699, - "src": "19058:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4673, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4686, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4683, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4670, - "src": "19125:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 4684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4678, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19337, - "src": "19105:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - ], - "id": 4677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4680, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4668, - "src": "19112:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4675, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4666, - "src": "19081:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 4423, - "src": "19081:15:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 4681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4137, - "src": "19081:43:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4688, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4666, - "src": "19205:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4691, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4666, - "src": "19235:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 4432, - "src": "19235:13:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4694, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4668, - "src": "19259:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4695, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4674, - "src": "19268:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4689, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4690, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4687, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "19186:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4698, - "nodeType": "ExpressionStatement", - "src": "19186:96:4" - } - ] - }, - "documentation": null, - "id": 4700, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4671, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4666, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4700, - "src": "18993:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4665, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "18993:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4668, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4700, - "src": "19007:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4670, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4700, - "src": "19024:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4669, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:4" - }, - "returnParameters": { - "id": 4672, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:4" - }, - "scope": 4750, - "src": "18962:327:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4748, - "nodeType": "Block", - "src": "19741:1026:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4709, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4702, - "src": "20275:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - ], - "id": 4708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 4486, - "src": "20267:25:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 4712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 4713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 4707, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4715, - "nodeType": "ExpressionStatement", - "src": "20259:71:4" - }, - { - "assignments": [ - 4717, - 4719 - ], - "declarations": [ - { - "constant": false, - "id": 4717, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4748, - "src": "20401:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4716, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4719, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 4748, - "src": "20415:23:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4718, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4726, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4724, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4704, - "src": "20462:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4721, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4702, - "src": "20450:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - ], - "id": 4720, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:4", - "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": 4725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4728, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4717, - "src": "20485:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 4729, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 4727, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4731, - "nodeType": "ExpressionStatement", - "src": "20477:52:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4732, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4719, - "src": "20544:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 4733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4747, - "nodeType": "IfStatement", - "src": "20540:221:4", - "trueBody": { - "id": 4746, - "nodeType": "Block", - "src": "20567:194:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4739, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4719, - "src": "20684:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 4740, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 4741, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 4737, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4738, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 4742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 4743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 4736, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4745, - "nodeType": "ExpressionStatement", - "src": "20665:85:4" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 4749, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4705, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4702, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4749, - "src": "19700:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4701, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "19700:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4704, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 4749, - "src": "19714:17:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4703, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:4" - }, - "returnParameters": { - "id": 4706, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:4" - }, - "scope": 4750, - "src": "19672:1095:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 5321, - "src": "17580:3189:4" - }, - { - "id": 4751, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4752, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4392, - "src": "20892:7:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4392", - "typeString": "contract Ownable" - } - }, - "id": 4753, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:4" - } - ], - "contractDependencies": [ - 4280, - 4392 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 4785, - "linearizedBaseContracts": [ - 4785, - 4392, - 4280 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4755, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 4785, - "src": "20906:33:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4754, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 4760, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4758, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4757, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 4760, - "src": "20974:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4756, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:4" - }, - "returnParameters": { - "id": 4759, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:4" - }, - "scope": 4785, - "src": "20946:53:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 4771, - "nodeType": "Block", - "src": "21039:108:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4763, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "21057:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 4764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4765, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4755, - "src": "21073:18:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 4767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 4762, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4769, - "nodeType": "ExpressionStatement", - "src": "21049:80:4" - }, - { - "id": 4770, - "nodeType": "PlaceholderStatement", - "src": "21139:1:4" - } - ] - }, - "documentation": null, - "id": 4772, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4761, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:4" - }, - "src": "21005:142:4", - "visibility": "internal" - }, - { - "body": { - "id": 4783, - "nodeType": "Block", - "src": "21252:57:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4779, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4755, - "src": "21262:18:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4780, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4774, - "src": "21283:19:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4782, - "nodeType": "ExpressionStatement", - "src": "21262:40:4" - } - ] - }, - "documentation": null, - "id": 4784, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4777, - "modifierName": { - "argumentTypes": null, - "id": 4776, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4325, - "src": "21238:9:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:4" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4774, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 4784, - "src": "21184:27:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:4" - }, - "returnParameters": { - "id": 4778, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:4" - }, - "scope": 4785, - "src": "21153:156:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5321, - "src": "20851:460:4" - }, - { - "id": 4786, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 4792, - "linearizedBaseContracts": [ - 4792 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 4791, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4787, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:4" - }, - "returnParameters": { - "id": 4790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4789, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4791, - "src": "21443:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:4" - }, - "scope": 4792, - "src": "21396:56:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5321, - "src": "21376:78:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 4901, - "linearizedBaseContracts": [ - 4901 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 4795, - "libraryName": { - "contractScope": null, - "id": 4793, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4254, - "src": "21494:8:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$4254", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:4", - "typeName": { - "id": 4794, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 4798, - "libraryName": { - "contractScope": null, - "id": 4796, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4750, - "src": "21526:9:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:4", - "typeName": { - "contractScope": null, - "id": 4797, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "21540:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 4803, - "name": "lend", - "nodeType": "VariableDeclaration", - "scope": 4901, - "src": "21553:71:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4799, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "21553:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307838306642373834423765443636373330653862314442643938323061464432393933316161623033", - "id": 4801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x80fB784B7eD66730e8b1DBd9820aFD29931aab03" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4800, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4460, - "src": "21574:6:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$4460_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 4802, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4805, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 4901, - "src": "21631:28:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4804, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 4809, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 4901, - "src": "21665:45:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 4808, - "keyType": { - "id": 4806, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 4807, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 4816, - "nodeType": "Block", - "src": "21770:36:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4814, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "21787:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4813, - "id": 4815, - "nodeType": "Return", - "src": "21780:19:4" - } - ] - }, - "documentation": null, - "id": 4817, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4810, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:4" - }, - "returnParameters": { - "id": 4813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4812, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4817, - "src": "21761:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4811, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:4" - }, - "scope": 4901, - "src": "21717:89:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4828, - "nodeType": "Block", - "src": "21878:42:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4824, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "21895:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4826, - "indexExpression": { - "argumentTypes": null, - "id": 4825, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4819, - "src": "21905:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4823, - "id": 4827, - "nodeType": "Return", - "src": "21888:25:4" - } - ] - }, - "documentation": null, - "id": 4829, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4819, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4829, - "src": "21831:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4818, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:4" - }, - "returnParameters": { - "id": 4823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4822, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4829, - "src": "21869:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4821, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:4" - }, - "scope": 4901, - "src": "21812:108:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4865, - "nodeType": "Block", - "src": "21964:189:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4834, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "21974:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4837, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4831, - "src": "22006:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4835, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "21989:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "21989:16:4", - "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": 4838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4840, - "nodeType": "ExpressionStatement", - "src": "21974:39:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4841, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22023:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4844, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4842, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4850, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4831, - "src": "22073:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4845, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22047:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4848, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4846, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "22047:25:4", - "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": 4851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4853, - "nodeType": "ExpressionStatement", - "src": "22023:57:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4857, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4860, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19343, - "src": "22132:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$4901", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$4901", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 4859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4831, - "src": "22139:6:4", - "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, - "id": 4854, - "name": "lend", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4803, - "src": "22090:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 4588, - "src": "22090:21:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4460_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 4863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4864, - "nodeType": "ExpressionStatement", - "src": "22090:56:4" - } - ] - }, - "documentation": null, - "id": 4866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4831, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4866, - "src": "21941:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:4" - }, - "returnParameters": { - "id": 4833, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:4" - }, - "scope": 4901, - "src": "21926:227:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4899, - "nodeType": "Block", - "src": "22200:170:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4871, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "22210:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4874, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4868, - "src": "22242:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4872, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "22225:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "22225:16:4", - "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": 4875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4877, - "nodeType": "ExpressionStatement", - "src": "22210:39:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4878, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22259:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4881, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4879, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4887, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4868, - "src": "22309:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4882, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22283:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4885, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4883, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "22283:25:4", - "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": 4888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4890, - "nodeType": "ExpressionStatement", - "src": "22259:57:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4894, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 4896, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4868, - "src": "22356:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4891, - "name": "lend", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4803, - "src": "22326:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4563, - "src": "22326:17:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4460_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 4897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4898, - "nodeType": "ExpressionStatement", - "src": "22326:37:4" - } - ] - }, - "documentation": null, - "id": 4900, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4868, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4900, - "src": "22177:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:4" - }, - "returnParameters": { - "id": 4870, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:4" - }, - "scope": 4901, - "src": "22159:211:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 5321, - "src": "21458:914:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4902, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4901, - "src": "22398:14:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$4901", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 4903, - "nodeType": "InheritanceSpecifier", - "src": "22398:14:4" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4904, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4785, - "src": "22414:28:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$4785", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 4905, - "nodeType": "InheritanceSpecifier", - "src": "22414:28:4" - } - ], - "contractDependencies": [ - 4280, - 4392, - 4785, - 4901 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5320, - "linearizedBaseContracts": [ - 5320, - 4785, - 4392, - 4280, - 4901 - ], - "name": "YAMLENDPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4910, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22449:70:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4906, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "22449:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 4908, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22476:42:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4907, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4460, - "src": "22469:6:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$4460_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 4909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22469:50:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 4913, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22525:41:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4911, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22525:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 4912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22560:6:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4916, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22588:37:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4914, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22588:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 4915, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22615:10:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4919, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22669:31:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22669:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 4918, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22699:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4922, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22706:29:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4920, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22706:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 4921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22734:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4924, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22741:29:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4923, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22741:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 4926, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22776:35:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4925, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22776:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 4930, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22817:57:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 4929, - "keyType": { - "id": 4927, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22825:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22817:27:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 4928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22836:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 4934, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22880:42:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 4933, - "keyType": { - "id": 4931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22888:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22880:27:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 4932, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22899:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 4938, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 4937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4936, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 4938, - "src": "22947:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4935, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22947:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22946:16:4" - }, - "src": "22929:34:4" - }, - { - "anonymous": false, - "documentation": null, - "id": 4944, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 4943, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4940, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 4944, - "src": "22981:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4939, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22981:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4942, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4944, - "src": "23003:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4941, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22980:38:4" - }, - "src": "22968:51:4" - }, - { - "anonymous": false, - "documentation": null, - "id": 4950, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 4949, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4946, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 4950, - "src": "23040:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4945, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23040:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4948, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4950, - "src": "23062:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4947, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23062:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23039:38:4" - }, - "src": "23024:54:4" - }, - { - "anonymous": false, - "documentation": null, - "id": 4956, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 4955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4952, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 4956, - "src": "23100:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4951, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23100:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4954, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 4956, - "src": "23122:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4953, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23122:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23099:38:4" - }, - "src": "23083:55:4" - }, - { - "body": { - "id": 4967, - "nodeType": "Block", - "src": "23166:77:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4959, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23184:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 4960, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23184:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4961, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "23203:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23184:28:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 4963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23213:11:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 4958, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23176:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23176:49:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4965, - "nodeType": "ExpressionStatement", - "src": "23176:49:4" - }, - { - "id": 4966, - "nodeType": "PlaceholderStatement", - "src": "23235:1:4" - } - ] - }, - "documentation": null, - "id": 4968, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4957, - "nodeType": "ParameterList", - "parameters": [], - "src": "23163:2:4" - }, - "src": "23144:99:4", - "visibility": "internal" - }, - { - "body": { - "id": 5004, - "nodeType": "Block", - "src": "23288:283:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4972, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23298:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4973, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5051, - "src": "23321:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 4974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23321:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23298:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4976, - "nodeType": "ExpressionStatement", - "src": "23298:39:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4977, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "23347:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4978, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5018, - "src": "23364:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 4979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23364:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23347:43:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4981, - "nodeType": "ExpressionStatement", - "src": "23347:43:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4982, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23404:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4984, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23423:1:4", - "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": 4983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23415:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23415:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23404:21:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5002, - "nodeType": "IfStatement", - "src": "23400:154:4", - "trueBody": { - "id": 5001, - "nodeType": "Block", - "src": "23427:127:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4987, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4934, - "src": "23441:7:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4989, - "indexExpression": { - "argumentTypes": null, - "id": 4988, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23449:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23441:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4991, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23467:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4990, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5080, - "src": "23460:6:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 4992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23460:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23441:34:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4994, - "nodeType": "ExpressionStatement", - "src": "23441:34:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4995, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4930, - "src": "23489:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4997, - "indexExpression": { - "argumentTypes": null, - "id": 4996, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23512:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23489:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4998, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23523:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23489:54:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5000, - "nodeType": "ExpressionStatement", - "src": "23489:54:4" - } - ] - } - }, - { - "id": 5003, - "nodeType": "PlaceholderStatement", - "src": "23563:1:4" - } - ] - }, - "documentation": null, - "id": 5005, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4971, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4970, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5005, - "src": "23271:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4969, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23271:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23270:17:4" - }, - "src": "23249:322:4", - "visibility": "internal" - }, - { - "body": { - "id": 5017, - "nodeType": "Block", - "src": "23643:63:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5012, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23669:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23669:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5014, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "23686:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5010, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4068, - "src": "23660:4:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$4068_$", - "typeString": "type(library Math)" - } - }, - "id": 5011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 4035, - "src": "23660:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 5015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23660:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5009, - "id": 5016, - "nodeType": "Return", - "src": "23653:46:4" - } - ] - }, - "documentation": null, - "id": 5018, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5006, - "nodeType": "ParameterList", - "parameters": [], - "src": "23610:2:4" - }, - "returnParameters": { - "id": 5009, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5008, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5018, - "src": "23634:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5007, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23634:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23633:9:4" - }, - "scope": 5320, - "src": "23577:129:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5050, - "nodeType": "Block", - "src": "23768:352:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5023, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4817, - "src": "23782:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23782:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5025, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23799:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23782:18:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5030, - "nodeType": "IfStatement", - "src": "23778:76:4", - "trueBody": { - "id": 5029, - "nodeType": "Block", - "src": "23802:52:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5027, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23823:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5022, - "id": 5028, - "nodeType": "Return", - "src": "23816:27:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5045, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4817, - "src": "24085:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24085:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 5042, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24054:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5039, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "24017:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5036, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "23976:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5033, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5018, - "src": "23924:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "23924:51:4", - "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": 5037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:67:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "23924:92:4", - "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": 5040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:104:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5041, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "23924:129:4", - "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": 5043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:135:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "23924:160:4", - "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": 5047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:175:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5031, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23882:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "23882:24:4", - "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": 5048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23882:231:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5022, - "id": 5049, - "nodeType": "Return", - "src": "23863:250:4" - } - ] - }, - "documentation": null, - "id": 5051, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5019, - "nodeType": "ParameterList", - "parameters": [], - "src": "23735:2:4" - }, - "returnParameters": { - "id": 5022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5021, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5051, - "src": "23759:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5020, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23759:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23758:9:4" - }, - "scope": 5320, - "src": "23712:408:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5079, - "nodeType": "Block", - "src": "24189:196:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5074, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4934, - "src": "24361:7:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5076, - "indexExpression": { - "argumentTypes": null, - "id": 5075, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5053, - "src": "24369:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24361:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 5071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24334:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5065, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4930, - "src": "24279:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5067, - "indexExpression": { - "argumentTypes": null, - "id": 5066, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5053, - "src": "24302:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24279:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5062, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5051, - "src": "24258:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "24258:20:4", - "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": 5068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:53:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5059, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5053, - "src": "24228:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5058, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4829, - "src": "24218:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 5060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:18:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "24218:39:4", - "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": 5069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:94:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "24218:115:4", - "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": 5072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:121:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "24218:142:4", - "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": 5077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:160:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5057, - "id": 5078, - "nodeType": "Return", - "src": "24199:179:4" - } - ] - }, - "documentation": null, - "id": 5080, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5053, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5080, - "src": "24142:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5052, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24142:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24141:17:4" - }, - "returnParameters": { - "id": 5057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5056, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5080, - "src": "24180:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5055, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24180:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24179:9:4" - }, - "scope": 5320, - "src": "24126:259:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5110, - "nodeType": "Block", - "src": "24547:124:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5092, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5082, - "src": "24565:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5093, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24574:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24565:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 5095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24577:16:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 5091, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24557:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24557:37:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5097, - "nodeType": "ExpressionStatement", - "src": "24557:37:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5101, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5082, - "src": "24616:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5098, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19346, - "src": "24604:5:4", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLENDPool_$5320", - "typeString": "contract super YAMLENDPool" - } - }, - "id": 5100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 4866, - "src": "24604:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24604:19:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5103, - "nodeType": "ExpressionStatement", - "src": "24604:19:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5105, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24645:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24645:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5107, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5082, - "src": "24657:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5104, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4944, - "src": "24638:6:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 5108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24638:26:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5109, - "nodeType": "EmitStatement", - "src": "24633:31:4" - } - ] - }, - "documentation": null, - "id": 5111, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5085, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24524:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24524:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5087, - "modifierName": { - "argumentTypes": null, - "id": 5084, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "24511:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24511:24:4" - }, - { - "arguments": null, - "id": 5089, - "modifierName": { - "argumentTypes": null, - "id": 5088, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4968, - "src": "24536:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24536:10:4" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5083, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5082, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5111, - "src": "24488:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5081, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24488:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24487:16:4" - }, - "returnParameters": { - "id": 5090, - "nodeType": "ParameterList", - "parameters": [], - "src": "24547:0:4" - }, - "scope": 5320, - "src": "24473:198:4", - "stateMutability": "nonpayable", - "superFunction": 4866, - "visibility": "public" - }, - { - "body": { - "id": 5141, - "nodeType": "Block", - "src": "24754:133:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5123, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5113, - "src": "24772:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24781:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24772:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 5126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24784:19:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 5122, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24764:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24764:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5128, - "nodeType": "ExpressionStatement", - "src": "24764:40:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5132, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5113, - "src": "24829:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5129, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19346, - "src": "24814:5:4", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLENDPool_$5320", - "typeString": "contract super YAMLENDPool" - } - }, - "id": 5131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 4900, - "src": "24814:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24814:22:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5134, - "nodeType": "ExpressionStatement", - "src": "24814:22:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5136, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24861:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24861:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5138, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5113, - "src": "24873:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5135, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4950, - "src": "24851:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 5139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24851:29:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5140, - "nodeType": "EmitStatement", - "src": "24846:34:4" - } - ] - }, - "documentation": null, - "id": 5142, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5116, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24731:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24731:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5118, - "modifierName": { - "argumentTypes": null, - "id": 5115, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "24718:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24718:24:4" - }, - { - "arguments": null, - "id": 5120, - "modifierName": { - "argumentTypes": null, - "id": 5119, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4968, - "src": "24743:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24743:10:4" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5113, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5142, - "src": "24695:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24695:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24694:16:4" - }, - "returnParameters": { - "id": 5121, - "nodeType": "ParameterList", - "parameters": [], - "src": "24754:0:4" - }, - "scope": 5320, - "src": "24677:210:4", - "stateMutability": "nonpayable", - "superFunction": 4900, - "visibility": "public" - }, - { - "body": { - "id": 5155, - "nodeType": "Block", - "src": "24918:69:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5147, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24947:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24947:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5146, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4829, - "src": "24937:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 5149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24937:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5145, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5142 - ], - "referencedDeclaration": 5142, - "src": "24928:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24928:31:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5151, - "nodeType": "ExpressionStatement", - "src": "24928:31:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5152, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5221, - "src": "24969:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 5153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:11:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5154, - "nodeType": "ExpressionStatement", - "src": "24969:11:4" - } - ] - }, - "documentation": null, - "id": 5156, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5143, - "nodeType": "ParameterList", - "parameters": [], - "src": "24906:2:4" - }, - "returnParameters": { - "id": 5144, - "nodeType": "ParameterList", - "parameters": [], - "src": "24918:0:4" - }, - "scope": 5320, - "src": "24893:94:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 5220, - "nodeType": "Block", - "src": "25057:379:4", - "statements": [ - { - "assignments": [ - 5166 - ], - "declarations": [ - { - "constant": false, - "id": 5166, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 5220, - "src": "25067:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25067:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5171, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25091:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25091:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5167, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5080, - "src": "25084:6:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 5170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25084:18:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25067:35:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5172, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5166, - "src": "25116:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5173, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25125:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25116:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5219, - "nodeType": "IfStatement", - "src": "25112:318:4", - "trueBody": { - "id": 5218, - "nodeType": "Block", - "src": "25128:302:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5175, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4934, - "src": "25142:7:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25150:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25150:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25142:19:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 5179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25164:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25142:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5181, - "nodeType": "ExpressionStatement", - "src": "25142:23:4" - }, - { - "assignments": [ - 5183 - ], - "declarations": [ - { - "constant": false, - "id": 5183, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 5218, - "src": "25179:21:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25179:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5191, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5186, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4910, - "src": "25215:3:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - ], - "id": 5185, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25207:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25207:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5184, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4792, - "src": "25203:3:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$4792_$", - "typeString": "type(contract YAM)" - } - }, - "id": 5188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:17:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$4792", - "typeString": "contract YAM" - } - }, - "id": 5189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 4791, - "src": "25203:35:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 5190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25179:61:4" - }, - { - "assignments": [ - 5193 - ], - "declarations": [ - { - "constant": false, - "id": 5193, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 5218, - "src": "25254:18:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25254:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5203, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 5201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 5199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 5200, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25309:2:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25305:6:4", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5196, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5183, - "src": "25286:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5194, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5166, - "src": "25275:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "25275:10:4", - "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": 5197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:25:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "25275:29:4", - "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": 5202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25254:58:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5207, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25343:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25343:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5209, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "25355:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5204, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4910, - "src": "25326:3:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 5206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4563, - "src": "25326:16:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4460_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 5210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25326:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5211, - "nodeType": "ExpressionStatement", - "src": "25326:40:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25396:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25396:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5215, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "25408:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5212, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4956, - "src": "25385:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 5216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:34:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5217, - "nodeType": "EmitStatement", - "src": "25380:39:4" - } - ] - } - } - ] - }, - "documentation": null, - "id": 5221, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5159, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25034:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25034:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5161, - "modifierName": { - "argumentTypes": null, - "id": 5158, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "25021:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25021:24:4" - }, - { - "arguments": null, - "id": 5163, - "modifierName": { - "argumentTypes": null, - "id": 5162, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4968, - "src": "25046:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25046:10:4" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5157, - "nodeType": "ParameterList", - "parameters": [], - "src": "25011:2:4" - }, - "returnParameters": { - "id": 5164, - "nodeType": "ParameterList", - "parameters": [], - "src": "25057:0:4" - }, - "scope": 5320, - "src": "24993:443:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5318, - "nodeType": "Block", - "src": "25571:703:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5233, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25585:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25585:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 5235, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "25603:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25585:27:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 5316, - "nodeType": "Block", - "src": "26088:180:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5294, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "26100:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5297, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "26124:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5295, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "26113:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "26113:10:4", - "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": 5298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26113:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5300, - "nodeType": "ExpressionStatement", - "src": "26100:33:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5301, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "26145:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5302, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "26162:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26145:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5304, - "nodeType": "ExpressionStatement", - "src": "26145:26:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5305, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "26183:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5308, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "26212:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5306, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "26198:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "26198:13:4", - "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": 5309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26198:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26183:38:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5311, - "nodeType": "ExpressionStatement", - "src": "26183:38:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5313, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "26250:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5312, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4938, - "src": "26238:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26238:19:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5315, - "nodeType": "EmitStatement", - "src": "26233:24:4" - } - ] - }, - "id": 5317, - "nodeType": "IfStatement", - "src": "25581:687:4", - "trueBody": { - "id": 5293, - "nodeType": "Block", - "src": "25614:468:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5237, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25630:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25630:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5239, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "25649:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25630:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 5274, - "nodeType": "Block", - "src": "25731:205:4", - "statements": [ - { - "assignments": [ - 5250 - ], - "declarations": [ - { - "constant": false, - "id": 5250, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 5274, - "src": "25747:17:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25747:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5256, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5253, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25784:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25784:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5251, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "25767:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "25767:16:4", - "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": 5255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25767:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25747:53:4" - }, - { - "assignments": [ - 5258 - ], - "declarations": [ - { - "constant": false, - "id": 5258, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 5274, - "src": "25816:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25816:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5263, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5261, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "25849:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5259, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "25835:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "25835:13:4", - "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": 5262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:25:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25816:44:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5264, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "25876:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5270, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "25914:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5267, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "25900:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5265, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "25889:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "25889:10:4", - "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": 5268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "25889:24:4", - "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": 5271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:34:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25876:47:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5273, - "nodeType": "ExpressionStatement", - "src": "25876:47:4" - } - ] - }, - "id": 5275, - "nodeType": "IfStatement", - "src": "25626:310:4", - "trueBody": { - "id": 5248, - "nodeType": "Block", - "src": "25663:62:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5241, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "25679:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5244, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "25703:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5242, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "25692:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "25692:10:4", - "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": 5245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25692:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25679:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5247, - "nodeType": "ExpressionStatement", - "src": "25679:33:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 5279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5276, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "25947:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5277, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25964:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25964:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25947:32:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5280, - "nodeType": "ExpressionStatement", - "src": "25947:32:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5281, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "25991:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5285, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "26026:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5282, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26006:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26006:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "26006:19:4", - "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": 5286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26006:29:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25991:44:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5288, - "nodeType": "ExpressionStatement", - "src": "25991:44:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5290, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "26064:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5289, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4938, - "src": "26052:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:19:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5292, - "nodeType": "EmitStatement", - "src": "26047:24:4" - } - ] - } - } - ] - }, - "documentation": null, - "id": 5319, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5226, - "modifierName": { - "argumentTypes": null, - "id": 5225, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4772, - "src": "25511:22:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25511:22:4" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25563:1:4", - "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": 5228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25555:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25555:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5231, - "modifierName": { - "argumentTypes": null, - "id": 5227, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "25542:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25542:24:4" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5223, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 5319, - "src": "25470:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25470:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25469:16:4" - }, - "returnParameters": { - "id": 5232, - "nodeType": "ParameterList", - "parameters": [], - "src": "25571:0:4" - }, - "scope": 5320, - "src": "25442:832:4", - "stateMutability": "nonpayable", - "superFunction": 4760, - "visibility": "external" - } - ], - "scope": 5321, - "src": "22374:3902:4" - } - ], - "src": "1490:24787:4" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMLENDPool.sol", - "exportedSymbols": { - "Address": [ - 4534 - ], - "Context": [ - 4280 - ], - "IERC20": [ - 4460 - ], - "IRewardDistributionRecipient": [ - 4785 - ], - "LPTokenWrapper": [ - 4901 - ], - "Math": [ - 4068 - ], - "Ownable": [ - 4392 - ], - "SafeERC20": [ - 4750 - ], - "SafeMath": [ - 4254 - ], - "YAM": [ - 4792 - ], - "YAMLENDPool": [ - 5320 - ] - }, - "id": 5321, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 4001, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 4068, - "linearizedBaseContracts": [ - 4068 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4017, - "nodeType": "Block", - "src": "1739:38:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4012, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4010, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4003, - "src": "1756:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4011, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4005, - "src": "1761:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 4014, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4005, - "src": "1769:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:4", - "trueExpression": { - "argumentTypes": null, - "id": 4013, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4003, - "src": "1765:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4009, - "id": 4016, - "nodeType": "Return", - "src": "1749:21:4" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 4018, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4006, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4003, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4018, - "src": "1685:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4002, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4005, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4018, - "src": "1696:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:4" - }, - "returnParameters": { - "id": 4009, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4008, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4018, - "src": "1730:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4007, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:4" - }, - "scope": 4068, - "src": "1672:105:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4034, - "nodeType": "Block", - "src": "1915:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4027, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4020, - "src": "1932:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 4028, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4022, - "src": "1936:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 4031, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4022, - "src": "1944:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:4", - "trueExpression": { - "argumentTypes": null, - "id": 4030, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4020, - "src": "1940:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4026, - "id": 4033, - "nodeType": "Return", - "src": "1925:20:4" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 4035, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4023, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4020, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "1861:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4019, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4022, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "1872:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4021, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:4" - }, - "returnParameters": { - "id": 4026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4025, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4035, - "src": "1906:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4024, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:4" - }, - "scope": 4068, - "src": "1848:104:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4066, - "nodeType": "Block", - "src": "2136:119:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4044, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "2208:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4045, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4047, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4048, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "2218:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4051, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4053, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4037, - "src": "2229:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4054, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4058, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4056, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4039, - "src": "2237:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4060, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4061, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4063, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4043, - "id": 4065, - "nodeType": "Return", - "src": "2200:48:4" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 4067, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4037, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4067, - "src": "2082:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4036, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4039, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4067, - "src": "2093:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4038, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:4" - }, - "returnParameters": { - "id": 4043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4042, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4067, - "src": "2127:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4041, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:4" - }, - "scope": 4068, - "src": "2065:190:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "1589:668:4" - }, - { - "id": 4069, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 4254, - "linearizedBaseContracts": [ - 4254 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4093, - "nodeType": "Block", - "src": "3212:109:4", - "statements": [ - { - "assignments": [ - 4079 - ], - "declarations": [ - { - "constant": false, - "id": 4079, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4093, - "src": "3222:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4078, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4083, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4080, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4071, - "src": "3234:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 4081, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4073, - "src": "3238:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4085, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4079, - "src": "3257:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4086, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4071, - "src": "3262:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 4088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 4084, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4090, - "nodeType": "ExpressionStatement", - "src": "3249:46:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4091, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4079, - "src": "3313:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4077, - "id": 4092, - "nodeType": "Return", - "src": "3306:8:4" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 4094, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4074, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4071, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4094, - "src": "3158:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4070, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4073, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4094, - "src": "3169:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4072, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:4" - }, - "returnParameters": { - "id": 4077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4076, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4094, - "src": "3203:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4075, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:4" - }, - "scope": 4254, - "src": "3145:176:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4109, - "nodeType": "Block", - "src": "3652:67:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4104, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4096, - "src": "3673:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4105, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4098, - "src": "3676:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 4106, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 4103, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4110, - 4137 - ], - "referencedDeclaration": 4137, - "src": "3669:3:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4102, - "id": 4108, - "nodeType": "Return", - "src": "3662:50:4" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 4110, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4099, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4096, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "3598:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4095, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4098, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "3609:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4097, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:4" - }, - "returnParameters": { - "id": 4102, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4101, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4110, - "src": "3643:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4100, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:4" - }, - "scope": 4254, - "src": "3585:134:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4136, - "nodeType": "Block", - "src": "4138:92:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4122, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4114, - "src": "4156:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 4123, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4112, - "src": "4161:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 4125, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4116, - "src": "4164:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4127, - "nodeType": "ExpressionStatement", - "src": "4148:29:4" - }, - { - "assignments": [ - 4129 - ], - "declarations": [ - { - "constant": false, - "id": 4129, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4136, - "src": "4187:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4133, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4130, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4112, - "src": "4199:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 4131, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4114, - "src": "4203:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4134, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4129, - "src": "4222:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4120, - "id": 4135, - "nodeType": "Return", - "src": "4215:8:4" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 4137, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4112, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4056:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4111, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4114, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4067:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4113, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4116, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4078:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4115, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:4" - }, - "returnParameters": { - "id": 4120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4119, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4137, - "src": "4129:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4118, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:4" - }, - "scope": 4254, - "src": "4043:187:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4170, - "nodeType": "Block", - "src": "4537:392:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4146, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "4769:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4152, - "nodeType": "IfStatement", - "src": "4765:45:4", - "trueBody": { - "id": 4151, - "nodeType": "Block", - "src": "4777:33:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4149, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 4145, - "id": 4150, - "nodeType": "Return", - "src": "4791:8:4" - } - ] - } - }, - { - "assignments": [ - 4154 - ], - "declarations": [ - { - "constant": false, - "id": 4154, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4170, - "src": "4820:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4153, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4158, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4155, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "4832:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 4156, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4141, - "src": "4836:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4160, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4154, - "src": "4855:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 4161, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4139, - "src": "4859:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4163, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4141, - "src": "4864:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 4165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 4159, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4167, - "nodeType": "ExpressionStatement", - "src": "4847:56:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4168, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4154, - "src": "4921:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4145, - "id": 4169, - "nodeType": "Return", - "src": "4914:8:4" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 4171, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4139, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4171, - "src": "4483:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4138, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4141, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4171, - "src": "4494:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:4" - }, - "returnParameters": { - "id": 4145, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4144, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4171, - "src": "4528:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4143, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:4" - }, - "scope": 4254, - "src": "4470:459:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4186, - "nodeType": "Block", - "src": "5451:63:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4181, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4173, - "src": "5472:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4182, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4175, - "src": "5475:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 4183, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 4180, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4187, - 4214 - ], - "referencedDeclaration": 4214, - "src": "5468:3:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4179, - "id": 4185, - "nodeType": "Return", - "src": "5461:46:4" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 4187, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4173, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4187, - "src": "5397:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4172, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4175, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4187, - "src": "5408:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:4" - }, - "returnParameters": { - "id": 4179, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4178, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4187, - "src": "5442:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4177, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:4" - }, - "scope": 4254, - "src": "5384:130:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4213, - "nodeType": "Block", - "src": "6124:243:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4199, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4191, - "src": "6208:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4200, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 4202, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4193, - "src": "6215:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4198, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4204, - "nodeType": "ExpressionStatement", - "src": "6200:28:4" - }, - { - "assignments": [ - 4206 - ], - "declarations": [ - { - "constant": false, - "id": 4206, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 4213, - "src": "6238:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4210, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4207, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4189, - "src": "6250:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 4208, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4191, - "src": "6254:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4211, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4206, - "src": "6359:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4197, - "id": 4212, - "nodeType": "Return", - "src": "6352:8:4" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 4214, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4194, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4189, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6042:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4191, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6053:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4190, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4193, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6064:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4192, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:4" - }, - "returnParameters": { - "id": 4197, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4196, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4214, - "src": "6115:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4195, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:4" - }, - "scope": 4254, - "src": "6029:338:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4229, - "nodeType": "Block", - "src": "6878:61:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4224, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4216, - "src": "6899:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4225, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4218, - "src": "6902:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 4226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 4223, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4230, - 4253 - ], - "referencedDeclaration": 4253, - "src": "6895:3:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4222, - "id": 4228, - "nodeType": "Return", - "src": "6888:44:4" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 4230, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4219, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4216, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4230, - "src": "6824:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4215, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4218, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4230, - "src": "6835:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:4" - }, - "returnParameters": { - "id": 4222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4221, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4230, - "src": "6869:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:4" - }, - "scope": 4254, - "src": "6811:128:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4252, - "nodeType": "Block", - "src": "7538:68:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4242, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "7556:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4243, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 4245, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4236, - "src": "7564:12:4", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4241, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4247, - "nodeType": "ExpressionStatement", - "src": "7548:29:4" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4248, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4232, - "src": "7594:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 4249, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "7598:1:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4240, - "id": 4251, - "nodeType": "Return", - "src": "7587:12:4" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 4253, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4232, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7456:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4234, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7467:9:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4233, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4236, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7478:26:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4235, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:4", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:4" - }, - "returnParameters": { - "id": 4240, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4239, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4253, - "src": "7529:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4238, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:4" - }, - "scope": 4254, - "src": "7443:163:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "2900:4708:4" - }, - { - "id": 4255, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 4280, - "linearizedBaseContracts": [ - 4280 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4258, - "nodeType": "Block", - "src": "8386:3:4", - "statements": [] - }, - "documentation": null, - "id": 4259, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4256, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:4" - }, - "returnParameters": { - "id": 4257, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:4" - }, - "scope": 4280, - "src": "8362:27:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4267, - "nodeType": "Block", - "src": "8510:34:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4264, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 4263, - "id": 4266, - "nodeType": "Return", - "src": "8520:17:4" - } - ] - }, - "documentation": null, - "id": 4268, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4260, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:4" - }, - "returnParameters": { - "id": 4263, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4262, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4268, - "src": "8493:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 4261, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:4", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:4" - }, - "scope": 4280, - "src": "8448:96:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4278, - "nodeType": "Block", - "src": "8607:165:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4273, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19329, - "src": "8617:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$4280", - "typeString": "contract Context" - } - }, - "id": 4274, - "nodeType": "ExpressionStatement", - "src": "8617:4:4" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4275, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 4272, - "id": 4277, - "nodeType": "Return", - "src": "8750:15:4" - } - ] - }, - "documentation": null, - "id": 4279, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4269, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:4" - }, - "returnParameters": { - "id": 4272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4279, - "src": "8593:12:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4270, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:4" - }, - "scope": 4280, - "src": "8550:222:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "8185:589:4" - }, - { - "id": 4281, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4282, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4280, - "src": "9238:7:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$4280", - "typeString": "contract Context" - } - }, - "id": 4283, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:4" - } - ], - "contractDependencies": [ - 4280 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 4392, - "linearizedBaseContracts": [ - 4392, - 4280 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4285, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 4392, - "src": "9252:22:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4284, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 4291, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 4290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4287, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 4291, - "src": "9308:29:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4286, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4289, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 4291, - "src": "9339:24:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4288, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:4" - }, - "src": "9281:84:4" - }, - { - "body": { - "id": 4306, - "nodeType": "Block", - "src": "9491:93:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4294, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "9501:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4295, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "9510:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 4296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4298, - "nodeType": "ExpressionStatement", - "src": "9501:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4301, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:4", - "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": 4300, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4302, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 4303, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "9570:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4299, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4291, - "src": "9537:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 4304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4305, - "nodeType": "EmitStatement", - "src": "9532:45:4" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 4307, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4292, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:4" - }, - "returnParameters": { - "id": 4293, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:4" - }, - "scope": 4392, - "src": "9467:117:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4314, - "nodeType": "Block", - "src": "9707:30:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4312, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "9724:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 4311, - "id": 4313, - "nodeType": "Return", - "src": "9717:13:4" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 4315, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4308, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:4" - }, - "returnParameters": { - "id": 4311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4310, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4315, - "src": "9698:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:4" - }, - "scope": 4392, - "src": "9660:77:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4324, - "nodeType": "Block", - "src": "9846:82:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4318, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "9864:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 4319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 4320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 4317, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4322, - "nodeType": "ExpressionStatement", - "src": "9856:54:4" - }, - { - "id": 4323, - "nodeType": "PlaceholderStatement", - "src": "9920:1:4" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 4325, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4316, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:4" - }, - "src": "9825:103:4", - "visibility": "internal" - }, - { - "body": { - "id": 4335, - "nodeType": "Block", - "src": "10057:46:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4330, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "10074:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 4331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4332, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "10090:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4329, - "id": 4334, - "nodeType": "Return", - "src": "10067:29:4" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 4336, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4326, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:4" - }, - "returnParameters": { - "id": 4329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4328, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4336, - "src": "10051:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4327, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:4" - }, - "scope": 4392, - "src": "10011:92:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4354, - "nodeType": "Block", - "src": "10491:91:4", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4342, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "10527:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4344, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:4", - "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": 4343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4345, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4341, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4291, - "src": "10506:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 4346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4347, - "nodeType": "EmitStatement", - "src": "10501:45:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4348, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "10556:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:4", - "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": 4349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4351, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4353, - "nodeType": "ExpressionStatement", - "src": "10556:19:4" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 4355, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4339, - "modifierName": { - "argumentTypes": null, - "id": 4338, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4325, - "src": "10481:9:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:4" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4337, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:4" - }, - "returnParameters": { - "id": 4340, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:4" - }, - "scope": 4392, - "src": "10445:137:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4366, - "nodeType": "Block", - "src": "10793:45:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4363, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4357, - "src": "10822:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4362, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4391, - "src": "10803:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 4364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4365, - "nodeType": "ExpressionStatement", - "src": "10803:28:4" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 4367, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4360, - "modifierName": { - "argumentTypes": null, - "id": 4359, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4325, - "src": "10783:9:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:4" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4357, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 4367, - "src": "10758:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4356, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:4" - }, - "returnParameters": { - "id": 4361, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:4" - }, - "scope": 4392, - "src": "10731:107:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4390, - "nodeType": "Block", - "src": "10994:170:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4373, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4369, - "src": "11012:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:4", - "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": 4374, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4376, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 4378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 4372, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4380, - "nodeType": "ExpressionStatement", - "src": "11004:73:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4382, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "11113:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4383, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4369, - "src": "11121:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4381, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4291, - "src": "11092:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 4384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4385, - "nodeType": "EmitStatement", - "src": "11087:43:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4386, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4285, - "src": "11140:6:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4387, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4369, - "src": "11149:8:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4389, - "nodeType": "ExpressionStatement", - "src": "11140:17:4" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 4391, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4370, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4369, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 4391, - "src": "10967:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4368, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:4" - }, - "returnParameters": { - "id": 4371, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:4" - }, - "scope": 4392, - "src": "10939:225:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "9218:1948:4" - }, - { - "id": 4393, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 4460, - "linearizedBaseContracts": [ - 4460 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 4398, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4394, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:4" - }, - "returnParameters": { - "id": 4397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4396, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4398, - "src": "11541:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4395, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:4" - }, - "scope": 4460, - "src": "11495:55:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 4405, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4400, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4405, - "src": "11652:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4399, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:4" - }, - "returnParameters": { - "id": 4404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4403, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4405, - "src": "11692:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4402, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:4" - }, - "scope": 4460, - "src": "11633:68:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 4414, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4407, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 4414, - "src": "11939:17:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4406, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4409, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4414, - "src": "11958:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:4" - }, - "returnParameters": { - "id": 4413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4412, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4414, - "src": "11992:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4411, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:4" - }, - "scope": 4460, - "src": "11921:77:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 4423, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4419, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4416, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 4423, - "src": "12292:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4415, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4418, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4423, - "src": "12307:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4417, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:4" - }, - "returnParameters": { - "id": 4422, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4421, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4423, - "src": "12347:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4420, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:4" - }, - "scope": 4460, - "src": "12273:83:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 4432, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4428, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4425, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4432, - "src": "13026:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4424, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4427, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4432, - "src": "13043:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:4" - }, - "returnParameters": { - "id": 4431, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4430, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4432, - "src": "13077:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4429, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:4" - }, - "scope": 4460, - "src": "13009:74:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 4443, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4434, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13412:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4433, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4436, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13428:17:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4435, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4438, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13447:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4437, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:4" - }, - "returnParameters": { - "id": 4442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4441, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4443, - "src": "13481:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4440, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:4" - }, - "scope": 4460, - "src": "13390:97:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 4451, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 4450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4445, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 4451, - "src": "13671:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4444, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4447, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 4451, - "src": "13693:18:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4446, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4449, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4451, - "src": "13713:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4448, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:4" - }, - "src": "13656:72:4" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 4459, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 4458, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4453, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 4459, - "src": "13902:21:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4452, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4455, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4459, - "src": "13925:23:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4454, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4457, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4459, - "src": "13950:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4456, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:4" - }, - "src": "13887:78:4" - } - ], - "scope": 5321, - "src": "11401:2566:4" - }, - { - "id": 4461, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 4534, - "linearizedBaseContracts": [ - 4534 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 4485, - "nodeType": "Block", - "src": "14644:731:4", - "statements": [ - { - "assignments": [ - 4469 - ], - "declarations": [ - { - "constant": false, - "id": 4469, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 4485, - "src": "15083:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4468, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4470, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:4" - }, - { - "assignments": [ - 4472 - ], - "declarations": [ - { - "constant": false, - "id": 4472, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 4485, - "src": "15109:19:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4471, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4474, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 4473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:4" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 4469, - "isOffset": false, - "isSlot": false, - "src": "15274:8:4", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 4463, - "isOffset": false, - "isSlot": false, - "src": "15298:7:4", - "valueSize": 1 - } - } - ], - "id": 4475, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:4" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 4478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4476, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4469, - "src": "15325:8:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 4477, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 4481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4479, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4469, - "src": "15344:8:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 4480, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4472, - "src": "15356:11:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4483, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 4467, - "id": 4484, - "nodeType": "Return", - "src": "15317:51:4" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 4486, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4463, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4486, - "src": "14598:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4462, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:4" - }, - "returnParameters": { - "id": 4467, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4466, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4486, - "src": "14638:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4465, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:4" - }, - "scope": 4534, - "src": "14578:797:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4499, - "nodeType": "Block", - "src": "15660:49:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4495, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4488, - "src": "15693:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 4496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 4493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 4492, - "id": 4498, - "nodeType": "Return", - "src": "15670:32:4" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 4500, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4489, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4488, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4500, - "src": "15603:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4487, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:4" - }, - "returnParameters": { - "id": 4492, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4491, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4500, - "src": "15643:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 4490, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:4", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:4" - }, - "scope": 4534, - "src": "15584:125:4", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4532, - "nodeType": "Block", - "src": "16737:294:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4509, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19335, - "src": "16763:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4534", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$4534", - "typeString": "library Address" - } - ], - "id": 4508, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4512, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4504, - "src": "16780:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 4514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 4507, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4516, - "nodeType": "ExpressionStatement", - "src": "16747:73:4" - }, - { - "assignments": [ - 4518, - null - ], - "declarations": [ - { - "constant": false, - "id": 4518, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4532, - "src": "16886:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4517, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 4526, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 4524, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 4522, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4504, - "src": "16925:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4519, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4502, - "src": "16904:9:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 4520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:4", - "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": 4521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:4", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 4523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:4", - "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": 4525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4528, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4518, - "src": "16954:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 4529, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 4527, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4531, - "nodeType": "ExpressionStatement", - "src": "16946:78:4" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 4533, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4505, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4502, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 4533, - "src": "16685:25:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 4501, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:4", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4504, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4533, - "src": "16712:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4503, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:4" - }, - "returnParameters": { - "id": 4506, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:4" - }, - "scope": 4534, - "src": "16666:365:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 5321, - "src": "14114:2919:4" - }, - { - "id": 4535, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 4750, - "linearizedBaseContracts": [ - 4750 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 4538, - "libraryName": { - "contractScope": null, - "id": 4536, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4254, - "src": "17610:8:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$4254", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:4", - "typeName": { - "id": 4537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 4541, - "libraryName": { - "contractScope": null, - "id": 4539, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4534, - "src": "17642:7:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4534", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:4", - "typeName": { - "id": 4540, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 4562, - "nodeType": "Block", - "src": "17740:102:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4551, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4543, - "src": "17769:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4554, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4543, - "src": "17799:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4414, - "src": "17799:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4557, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4545, - "src": "17824:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4558, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4547, - "src": "17828:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4552, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4550, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "17750:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4561, - "nodeType": "ExpressionStatement", - "src": "17750:85:4" - } - ] - }, - "documentation": null, - "id": 4563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4543, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4563, - "src": "17690:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4542, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "17690:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4545, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 4563, - "src": "17704:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4544, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4547, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4563, - "src": "17716:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4546, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:4" - }, - "returnParameters": { - "id": 4549, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:4" - }, - "scope": 4750, - "src": "17668:174:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4587, - "nodeType": "Block", - "src": "17938:112:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4575, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4565, - "src": "17967:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4578, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4565, - "src": "17997:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 4443, - "src": "17997:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 4580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4581, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4567, - "src": "18026:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4582, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4569, - "src": "18032:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4583, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4571, - "src": "18036:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4576, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4574, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "17948:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4586, - "nodeType": "ExpressionStatement", - "src": "17948:95:4" - } - ] - }, - "documentation": null, - "id": 4588, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4572, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4565, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17874:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4564, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "17874:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4567, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17888:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4566, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4569, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17902:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4568, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4571, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4588, - "src": "17914:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4570, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:4" - }, - "returnParameters": { - "id": 4573, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:4" - }, - "scope": 4750, - "src": "17848:202:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4628, - "nodeType": "Block", - "src": "18132:536:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4598, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4594, - "src": "18421:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4599, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4601, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4605, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19337, - "src": "18461:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - ], - "id": 4604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4607, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4592, - "src": "18468:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4602, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4590, - "src": "18437:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 4423, - "src": "18437:15:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 4608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4611, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 4613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 4597, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4615, - "nodeType": "ExpressionStatement", - "src": "18412:150:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4617, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4590, - "src": "18591:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4620, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4590, - "src": "18621:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 4432, - "src": "18621:13:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4623, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4592, - "src": "18645:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4624, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4594, - "src": "18654:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4618, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4616, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "18572:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4627, - "nodeType": "ExpressionStatement", - "src": "18572:89:4" - } - ] - }, - "documentation": null, - "id": 4629, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4590, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4629, - "src": "18077:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4589, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "18077:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4592, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4629, - "src": "18091:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4594, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4629, - "src": "18108:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4593, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:4" - }, - "returnParameters": { - "id": 4596, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:4" - }, - "scope": 4750, - "src": "18056:612:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4663, - "nodeType": "Block", - "src": "18760:196:4", - "statements": [ - { - "assignments": [ - 4639 - ], - "declarations": [ - { - "constant": false, - "id": 4639, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 4663, - "src": "18770:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4638, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4650, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4648, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4635, - "src": "18837:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4643, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19337, - "src": "18817:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - ], - "id": 4642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4645, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4633, - "src": "18824:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4640, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "18793:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 4423, - "src": "18793:15:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 4646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "18793:43:4", - "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": 4649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4652, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "18872:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4655, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "18902:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 4432, - "src": "18902:13:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4658, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4633, - "src": "18926:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4659, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4639, - "src": "18935:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4653, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4651, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "18853:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4662, - "nodeType": "ExpressionStatement", - "src": "18853:96:4" - } - ] - }, - "documentation": null, - "id": 4664, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4636, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4631, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4664, - "src": "18705:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4630, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "18705:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4633, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4664, - "src": "18719:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4632, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4635, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4664, - "src": "18736:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4634, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:4" - }, - "returnParameters": { - "id": 4637, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:4" - }, - "scope": 4750, - "src": "18674:282:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4699, - "nodeType": "Block", - "src": "19048:241:4", - "statements": [ - { - "assignments": [ - 4674 - ], - "declarations": [ - { - "constant": false, - "id": 4674, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 4699, - "src": "19058:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4673, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4686, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4683, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4670, - "src": "19125:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 4684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4678, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19337, - "src": "19105:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - ], - "id": 4677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4680, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4668, - "src": "19112:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4675, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4666, - "src": "19081:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 4423, - "src": "19081:15:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 4681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4137, - "src": "19081:43:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 4685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4688, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4666, - "src": "19205:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4691, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4666, - "src": "19235:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 4432, - "src": "19235:13:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 4693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 4694, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4668, - "src": "19259:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4695, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4674, - "src": "19268:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4689, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4690, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 4696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 4687, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4749, - "src": "19186:18:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 4697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4698, - "nodeType": "ExpressionStatement", - "src": "19186:96:4" - } - ] - }, - "documentation": null, - "id": 4700, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4671, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4666, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4700, - "src": "18993:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4665, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "18993:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4668, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 4700, - "src": "19007:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4670, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 4700, - "src": "19024:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4669, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:4" - }, - "returnParameters": { - "id": 4672, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:4" - }, - "scope": 4750, - "src": "18962:327:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 4748, - "nodeType": "Block", - "src": "19741:1026:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4709, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4702, - "src": "20275:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - ], - "id": 4708, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 4486, - "src": "20267:25:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 4712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 4713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 4707, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4715, - "nodeType": "ExpressionStatement", - "src": "20259:71:4" - }, - { - "assignments": [ - 4717, - 4719 - ], - "declarations": [ - { - "constant": false, - "id": 4717, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 4748, - "src": "20401:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4716, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4719, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 4748, - "src": "20415:23:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4718, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4726, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4724, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4704, - "src": "20462:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4721, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4702, - "src": "20450:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - ], - "id": 4720, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:4", - "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": 4725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4728, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4717, - "src": "20485:7:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 4729, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 4727, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4731, - "nodeType": "ExpressionStatement", - "src": "20477:52:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4732, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4719, - "src": "20544:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 4733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4747, - "nodeType": "IfStatement", - "src": "20540:221:4", - "trueBody": { - "id": 4746, - "nodeType": "Block", - "src": "20567:194:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4739, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4719, - "src": "20684:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 4740, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 4741, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 4737, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 4738, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 4742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 4743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 4736, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4745, - "nodeType": "ExpressionStatement", - "src": "20665:85:4" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 4749, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4705, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4702, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 4749, - "src": "19700:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4701, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "19700:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4704, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 4749, - "src": "19714:17:4", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4703, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:4", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:4" - }, - "returnParameters": { - "id": 4706, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:4" - }, - "scope": 4750, - "src": "19672:1095:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 5321, - "src": "17580:3189:4" - }, - { - "id": 4751, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4752, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4392, - "src": "20892:7:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$4392", - "typeString": "contract Ownable" - } - }, - "id": 4753, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:4" - } - ], - "contractDependencies": [ - 4280, - 4392 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 4785, - "linearizedBaseContracts": [ - 4785, - 4392, - 4280 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4755, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 4785, - "src": "20906:33:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4754, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 4760, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4758, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4757, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 4760, - "src": "20974:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4756, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:4" - }, - "returnParameters": { - "id": 4759, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:4" - }, - "scope": 4785, - "src": "20946:53:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 4771, - "nodeType": "Block", - "src": "21039:108:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4763, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4268, - "src": "21057:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 4764, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4765, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4755, - "src": "21073:18:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 4767, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 4762, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4769, - "nodeType": "ExpressionStatement", - "src": "21049:80:4" - }, - { - "id": 4770, - "nodeType": "PlaceholderStatement", - "src": "21139:1:4" - } - ] - }, - "documentation": null, - "id": 4772, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4761, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:4" - }, - "src": "21005:142:4", - "visibility": "internal" - }, - { - "body": { - "id": 4783, - "nodeType": "Block", - "src": "21252:57:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4779, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4755, - "src": "21262:18:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4780, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4774, - "src": "21283:19:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4782, - "nodeType": "ExpressionStatement", - "src": "21262:40:4" - } - ] - }, - "documentation": null, - "id": 4784, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4777, - "modifierName": { - "argumentTypes": null, - "id": 4776, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4325, - "src": "21238:9:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:4" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4774, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 4784, - "src": "21184:27:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:4" - }, - "returnParameters": { - "id": 4778, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:4" - }, - "scope": 4785, - "src": "21153:156:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5321, - "src": "20851:460:4" - }, - { - "id": 4786, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 4792, - "linearizedBaseContracts": [ - 4792 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 4791, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4787, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:4" - }, - "returnParameters": { - "id": 4790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4789, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4791, - "src": "21443:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:4" - }, - "scope": 4792, - "src": "21396:56:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5321, - "src": "21376:78:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 4901, - "linearizedBaseContracts": [ - 4901 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 4795, - "libraryName": { - "contractScope": null, - "id": 4793, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4254, - "src": "21494:8:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$4254", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:4", - "typeName": { - "id": 4794, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 4798, - "libraryName": { - "contractScope": null, - "id": 4796, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4750, - "src": "21526:9:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$4750", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:4", - "typeName": { - "contractScope": null, - "id": 4797, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "21540:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 4803, - "name": "lend", - "nodeType": "VariableDeclaration", - "scope": 4901, - "src": "21553:71:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4799, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "21553:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307838306642373834423765443636373330653862314442643938323061464432393933316161623033", - "id": 4801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x80fB784B7eD66730e8b1DBd9820aFD29931aab03" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4800, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4460, - "src": "21574:6:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$4460_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 4802, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4805, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 4901, - "src": "21631:28:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4804, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 4809, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 4901, - "src": "21665:45:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 4808, - "keyType": { - "id": 4806, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 4807, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 4816, - "nodeType": "Block", - "src": "21770:36:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4814, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "21787:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4813, - "id": 4815, - "nodeType": "Return", - "src": "21780:19:4" - } - ] - }, - "documentation": null, - "id": 4817, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4810, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:4" - }, - "returnParameters": { - "id": 4813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4812, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4817, - "src": "21761:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4811, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:4" - }, - "scope": 4901, - "src": "21717:89:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4828, - "nodeType": "Block", - "src": "21878:42:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4824, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "21895:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4826, - "indexExpression": { - "argumentTypes": null, - "id": 4825, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4819, - "src": "21905:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4823, - "id": 4827, - "nodeType": "Return", - "src": "21888:25:4" - } - ] - }, - "documentation": null, - "id": 4829, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4819, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 4829, - "src": "21831:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4818, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:4" - }, - "returnParameters": { - "id": 4823, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4822, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 4829, - "src": "21869:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4821, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:4" - }, - "scope": 4901, - "src": "21812:108:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4865, - "nodeType": "Block", - "src": "21964:189:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4834, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "21974:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4837, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4831, - "src": "22006:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4835, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "21989:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "21989:16:4", - "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": 4838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4840, - "nodeType": "ExpressionStatement", - "src": "21974:39:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4841, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22023:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4844, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4842, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4850, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4831, - "src": "22073:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4845, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22047:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4848, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4846, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "22047:25:4", - "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": 4851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4853, - "nodeType": "ExpressionStatement", - "src": "22023:57:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4857, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4860, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19343, - "src": "22132:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$4901", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$4901", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 4859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4862, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4831, - "src": "22139:6:4", - "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, - "id": 4854, - "name": "lend", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4803, - "src": "22090:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 4588, - "src": "22090:21:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4460_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 4863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4864, - "nodeType": "ExpressionStatement", - "src": "22090:56:4" - } - ] - }, - "documentation": null, - "id": 4866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4831, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4866, - "src": "21941:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:4" - }, - "returnParameters": { - "id": 4833, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:4" - }, - "scope": 4901, - "src": "21926:227:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 4899, - "nodeType": "Block", - "src": "22200:170:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4871, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "22210:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4874, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4868, - "src": "22242:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4872, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4805, - "src": "22225:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "22225:16:4", - "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": 4875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4877, - "nodeType": "ExpressionStatement", - "src": "22210:39:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4878, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22259:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4881, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4879, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4887, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4868, - "src": "22309:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4882, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "22283:9:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4885, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4883, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "22283:25:4", - "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": 4888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4890, - "nodeType": "ExpressionStatement", - "src": "22259:57:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4894, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 4896, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4868, - "src": "22356:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4891, - "name": "lend", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4803, - "src": "22326:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 4893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4563, - "src": "22326:17:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4460_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 4897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4898, - "nodeType": "ExpressionStatement", - "src": "22326:37:4" - } - ] - }, - "documentation": null, - "id": 4900, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 4869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4868, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4900, - "src": "22177:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:4" - }, - "returnParameters": { - "id": 4870, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:4" - }, - "scope": 4901, - "src": "22159:211:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 5321, - "src": "21458:914:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4902, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4901, - "src": "22398:14:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$4901", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 4903, - "nodeType": "InheritanceSpecifier", - "src": "22398:14:4" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4904, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4785, - "src": "22414:28:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$4785", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 4905, - "nodeType": "InheritanceSpecifier", - "src": "22414:28:4" - } - ], - "contractDependencies": [ - 4280, - 4392, - 4785, - 4901 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5320, - "linearizedBaseContracts": [ - 5320, - 4785, - 4392, - 4280, - 4901 - ], - "name": "YAMLENDPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4910, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22449:70:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 4906, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4460, - "src": "22449:6:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 4908, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22476:42:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4907, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4460, - "src": "22469:6:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$4460_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 4909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22469:50:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 4913, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22525:41:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4911, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22525:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 4912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22560:6:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4916, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22588:37:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4914, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22588:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 4915, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22615:10:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4919, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22669:31:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22669:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 4918, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22699:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4922, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22706:29:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4920, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22706:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 4921, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22734:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 4924, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22741:29:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4923, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22741:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 4926, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22776:35:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4925, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22776:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 4930, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22817:57:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 4929, - "keyType": { - "id": 4927, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22825:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22817:27:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 4928, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22836:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 4934, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 5320, - "src": "22880:42:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 4933, - "keyType": { - "id": 4931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22888:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22880:27:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 4932, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22899:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 4938, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 4937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4936, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 4938, - "src": "22947:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4935, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22947:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22946:16:4" - }, - "src": "22929:34:4" - }, - { - "anonymous": false, - "documentation": null, - "id": 4944, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 4943, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4940, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 4944, - "src": "22981:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4939, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22981:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4942, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4944, - "src": "23003:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4941, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22980:38:4" - }, - "src": "22968:51:4" - }, - { - "anonymous": false, - "documentation": null, - "id": 4950, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 4949, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4946, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 4950, - "src": "23040:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4945, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23040:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4948, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 4950, - "src": "23062:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4947, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23062:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23039:38:4" - }, - "src": "23024:54:4" - }, - { - "anonymous": false, - "documentation": null, - "id": 4956, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 4955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4952, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 4956, - "src": "23100:20:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4951, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23100:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4954, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 4956, - "src": "23122:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4953, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23122:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23099:38:4" - }, - "src": "23083:55:4" - }, - { - "body": { - "id": 4967, - "nodeType": "Block", - "src": "23166:77:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4959, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23184:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 4960, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23184:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4961, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "23203:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23184:28:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 4963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23213:11:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 4958, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23176:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23176:49:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4965, - "nodeType": "ExpressionStatement", - "src": "23176:49:4" - }, - { - "id": 4966, - "nodeType": "PlaceholderStatement", - "src": "23235:1:4" - } - ] - }, - "documentation": null, - "id": 4968, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4957, - "nodeType": "ParameterList", - "parameters": [], - "src": "23163:2:4" - }, - "src": "23144:99:4", - "visibility": "internal" - }, - { - "body": { - "id": 5004, - "nodeType": "Block", - "src": "23288:283:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4972, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23298:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4973, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5051, - "src": "23321:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 4974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23321:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23298:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4976, - "nodeType": "ExpressionStatement", - "src": "23298:39:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4977, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "23347:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 4978, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5018, - "src": "23364:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 4979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23364:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23347:43:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4981, - "nodeType": "ExpressionStatement", - "src": "23347:43:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4982, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23404:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4984, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23423:1:4", - "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": 4983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23415:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 4985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23415:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23404:21:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5002, - "nodeType": "IfStatement", - "src": "23400:154:4", - "trueBody": { - "id": 5001, - "nodeType": "Block", - "src": "23427:127:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4987, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4934, - "src": "23441:7:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4989, - "indexExpression": { - "argumentTypes": null, - "id": 4988, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23449:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23441:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4991, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23467:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4990, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5080, - "src": "23460:6:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 4992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23460:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23441:34:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4994, - "nodeType": "ExpressionStatement", - "src": "23441:34:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 4999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4995, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4930, - "src": "23489:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4997, - "indexExpression": { - "argumentTypes": null, - "id": 4996, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4970, - "src": "23512:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23489:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4998, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23523:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23489:54:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5000, - "nodeType": "ExpressionStatement", - "src": "23489:54:4" - } - ] - } - }, - { - "id": 5003, - "nodeType": "PlaceholderStatement", - "src": "23563:1:4" - } - ] - }, - "documentation": null, - "id": 5005, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 4971, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4970, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5005, - "src": "23271:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4969, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23271:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23270:17:4" - }, - "src": "23249:322:4", - "visibility": "internal" - }, - { - "body": { - "id": 5017, - "nodeType": "Block", - "src": "23643:63:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5012, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23669:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23669:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5014, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "23686:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5010, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4068, - "src": "23660:4:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$4068_$", - "typeString": "type(library Math)" - } - }, - "id": 5011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 4035, - "src": "23660:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 5015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23660:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5009, - "id": 5016, - "nodeType": "Return", - "src": "23653:46:4" - } - ] - }, - "documentation": null, - "id": 5018, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5006, - "nodeType": "ParameterList", - "parameters": [], - "src": "23610:2:4" - }, - "returnParameters": { - "id": 5009, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5008, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5018, - "src": "23634:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5007, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23634:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23633:9:4" - }, - "scope": 5320, - "src": "23577:129:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5050, - "nodeType": "Block", - "src": "23768:352:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5023, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4817, - "src": "23782:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23782:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5025, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23799:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23782:18:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5030, - "nodeType": "IfStatement", - "src": "23778:76:4", - "trueBody": { - "id": 5029, - "nodeType": "Block", - "src": "23802:52:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5027, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23823:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5022, - "id": 5028, - "nodeType": "Return", - "src": "23816:27:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5045, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4817, - "src": "24085:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24085:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 5042, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24054:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5039, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "24017:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5036, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "23976:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5033, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5018, - "src": "23924:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "23924:51:4", - "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": 5037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:67:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "23924:92:4", - "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": 5040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:104:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5041, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "23924:129:4", - "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": 5043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:135:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "23924:160:4", - "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": 5047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:175:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5031, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4926, - "src": "23882:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "23882:24:4", - "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": 5048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23882:231:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5022, - "id": 5049, - "nodeType": "Return", - "src": "23863:250:4" - } - ] - }, - "documentation": null, - "id": 5051, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5019, - "nodeType": "ParameterList", - "parameters": [], - "src": "23735:2:4" - }, - "returnParameters": { - "id": 5022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5021, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5051, - "src": "23759:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5020, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23759:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23758:9:4" - }, - "scope": 5320, - "src": "23712:408:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5079, - "nodeType": "Block", - "src": "24189:196:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5074, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4934, - "src": "24361:7:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5076, - "indexExpression": { - "argumentTypes": null, - "id": 5075, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5053, - "src": "24369:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24361:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 5071, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24334:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5065, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4930, - "src": "24279:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5067, - "indexExpression": { - "argumentTypes": null, - "id": 5066, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5053, - "src": "24302:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24279:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5062, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5051, - "src": "24258:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 5063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:16:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "24258:20:4", - "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": 5068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:53:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5059, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5053, - "src": "24228:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5058, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4829, - "src": "24218:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 5060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:18:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "24218:39:4", - "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": 5069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:94:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "24218:115:4", - "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": 5072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:121:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "24218:142:4", - "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": 5077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:160:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5057, - "id": 5078, - "nodeType": "Return", - "src": "24199:179:4" - } - ] - }, - "documentation": null, - "id": 5080, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5053, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5080, - "src": "24142:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5052, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24142:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24141:17:4" - }, - "returnParameters": { - "id": 5057, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5056, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5080, - "src": "24180:7:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5055, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24180:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24179:9:4" - }, - "scope": 5320, - "src": "24126:259:4", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5110, - "nodeType": "Block", - "src": "24547:124:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5092, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5082, - "src": "24565:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5093, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24574:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24565:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 5095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24577:16:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 5091, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24557:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24557:37:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5097, - "nodeType": "ExpressionStatement", - "src": "24557:37:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5101, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5082, - "src": "24616:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5098, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19346, - "src": "24604:5:4", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLENDPool_$5320", - "typeString": "contract super YAMLENDPool" - } - }, - "id": 5100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 4866, - "src": "24604:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24604:19:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5103, - "nodeType": "ExpressionStatement", - "src": "24604:19:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5105, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24645:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24645:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5107, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5082, - "src": "24657:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5104, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4944, - "src": "24638:6:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 5108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24638:26:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5109, - "nodeType": "EmitStatement", - "src": "24633:31:4" - } - ] - }, - "documentation": null, - "id": 5111, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5085, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24524:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24524:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5087, - "modifierName": { - "argumentTypes": null, - "id": 5084, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "24511:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24511:24:4" - }, - { - "arguments": null, - "id": 5089, - "modifierName": { - "argumentTypes": null, - "id": 5088, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4968, - "src": "24536:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24536:10:4" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5083, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5082, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5111, - "src": "24488:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5081, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24488:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24487:16:4" - }, - "returnParameters": { - "id": 5090, - "nodeType": "ParameterList", - "parameters": [], - "src": "24547:0:4" - }, - "scope": 5320, - "src": "24473:198:4", - "stateMutability": "nonpayable", - "superFunction": 4866, - "visibility": "public" - }, - { - "body": { - "id": 5141, - "nodeType": "Block", - "src": "24754:133:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5123, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5113, - "src": "24772:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5124, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24781:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24772:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 5126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24784:19:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 5122, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24764:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24764:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5128, - "nodeType": "ExpressionStatement", - "src": "24764:40:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5132, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5113, - "src": "24829:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5129, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19346, - "src": "24814:5:4", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLENDPool_$5320", - "typeString": "contract super YAMLENDPool" - } - }, - "id": 5131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 4900, - "src": "24814:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24814:22:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5134, - "nodeType": "ExpressionStatement", - "src": "24814:22:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5136, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24861:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24861:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5138, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5113, - "src": "24873:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5135, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4950, - "src": "24851:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 5139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24851:29:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5140, - "nodeType": "EmitStatement", - "src": "24846:34:4" - } - ] - }, - "documentation": null, - "id": 5142, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5116, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24731:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24731:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5118, - "modifierName": { - "argumentTypes": null, - "id": 5115, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "24718:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24718:24:4" - }, - { - "arguments": null, - "id": 5120, - "modifierName": { - "argumentTypes": null, - "id": 5119, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4968, - "src": "24743:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24743:10:4" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5113, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5142, - "src": "24695:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24695:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24694:16:4" - }, - "returnParameters": { - "id": 5121, - "nodeType": "ParameterList", - "parameters": [], - "src": "24754:0:4" - }, - "scope": 5320, - "src": "24677:210:4", - "stateMutability": "nonpayable", - "superFunction": 4900, - "visibility": "public" - }, - { - "body": { - "id": 5155, - "nodeType": "Block", - "src": "24918:69:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5147, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24947:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24947:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5146, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4829, - "src": "24937:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 5149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24937:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5145, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5142 - ], - "referencedDeclaration": 5142, - "src": "24928:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24928:31:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5151, - "nodeType": "ExpressionStatement", - "src": "24928:31:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5152, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5221, - "src": "24969:9:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 5153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:11:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5154, - "nodeType": "ExpressionStatement", - "src": "24969:11:4" - } - ] - }, - "documentation": null, - "id": 5156, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5143, - "nodeType": "ParameterList", - "parameters": [], - "src": "24906:2:4" - }, - "returnParameters": { - "id": 5144, - "nodeType": "ParameterList", - "parameters": [], - "src": "24918:0:4" - }, - "scope": 5320, - "src": "24893:94:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 5220, - "nodeType": "Block", - "src": "25057:379:4", - "statements": [ - { - "assignments": [ - 5166 - ], - "declarations": [ - { - "constant": false, - "id": 5166, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 5220, - "src": "25067:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25067:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5171, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5168, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25091:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25091:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5167, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5080, - "src": "25084:6:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 5170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25084:18:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25067:35:4" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5172, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5166, - "src": "25116:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5173, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25125:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25116:10:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5219, - "nodeType": "IfStatement", - "src": "25112:318:4", - "trueBody": { - "id": 5218, - "nodeType": "Block", - "src": "25128:302:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5175, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4934, - "src": "25142:7:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5178, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25150:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25150:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25142:19:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 5179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25164:1:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25142:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5181, - "nodeType": "ExpressionStatement", - "src": "25142:23:4" - }, - { - "assignments": [ - 5183 - ], - "declarations": [ - { - "constant": false, - "id": 5183, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 5218, - "src": "25179:21:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25179:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5191, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5186, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4910, - "src": "25215:3:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - ], - "id": 5185, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25207:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25207:12:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5184, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4792, - "src": "25203:3:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$4792_$", - "typeString": "type(contract YAM)" - } - }, - "id": 5188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:17:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$4792", - "typeString": "contract YAM" - } - }, - "id": 5189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 4791, - "src": "25203:35:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 5190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25179:61:4" - }, - { - "assignments": [ - 5193 - ], - "declarations": [ - { - "constant": false, - "id": 5193, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 5218, - "src": "25254:18:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5192, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25254:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5203, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 5201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 5199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 5200, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25309:2:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25305:6:4", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5196, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5183, - "src": "25286:13:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5194, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5166, - "src": "25275:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "25275:10:4", - "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": 5197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:25:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "25275:29:4", - "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": 5202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25254:58:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5207, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25343:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25343:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5209, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "25355:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5204, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4910, - "src": "25326:3:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$4460", - "typeString": "contract IERC20" - } - }, - "id": 5206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4563, - "src": "25326:16:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4460_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4460_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 5210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25326:40:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5211, - "nodeType": "ExpressionStatement", - "src": "25326:40:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5213, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25396:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25396:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5215, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5193, - "src": "25408:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5212, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4956, - "src": "25385:10:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 5216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:34:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5217, - "nodeType": "EmitStatement", - "src": "25380:39:4" - } - ] - } - } - ] - }, - "documentation": null, - "id": 5221, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5159, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25034:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25034:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5161, - "modifierName": { - "argumentTypes": null, - "id": 5158, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "25021:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25021:24:4" - }, - { - "arguments": null, - "id": 5163, - "modifierName": { - "argumentTypes": null, - "id": 5162, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4968, - "src": "25046:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25046:10:4" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5157, - "nodeType": "ParameterList", - "parameters": [], - "src": "25011:2:4" - }, - "returnParameters": { - "id": 5164, - "nodeType": "ParameterList", - "parameters": [], - "src": "25057:0:4" - }, - "scope": 5320, - "src": "24993:443:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5318, - "nodeType": "Block", - "src": "25571:703:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5233, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25585:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25585:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 5235, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "25603:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25585:27:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 5316, - "nodeType": "Block", - "src": "26088:180:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5294, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "26100:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5297, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "26124:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5295, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "26113:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "26113:10:4", - "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": 5298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26113:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5300, - "nodeType": "ExpressionStatement", - "src": "26100:33:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5301, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "26145:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5302, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "26162:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26145:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5304, - "nodeType": "ExpressionStatement", - "src": "26145:26:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5305, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "26183:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5308, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "26212:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5306, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4916, - "src": "26198:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "26198:13:4", - "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": 5309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26198:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26183:38:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5311, - "nodeType": "ExpressionStatement", - "src": "26183:38:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5313, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "26250:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5312, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4938, - "src": "26238:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26238:19:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5315, - "nodeType": "EmitStatement", - "src": "26233:24:4" - } - ] - }, - "id": 5317, - "nodeType": "IfStatement", - "src": "25581:687:4", - "trueBody": { - "id": 5293, - "nodeType": "Block", - "src": "25614:468:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5237, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25630:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25630:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5239, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "25649:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25630:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 5274, - "nodeType": "Block", - "src": "25731:205:4", - "statements": [ - { - "assignments": [ - 5250 - ], - "declarations": [ - { - "constant": false, - "id": 5250, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 5274, - "src": "25747:17:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25747:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5256, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5253, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25784:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25784:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5251, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "25767:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 4110, - "src": "25767:16:4", - "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": 5255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25767:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25747:53:4" - }, - { - "assignments": [ - 5258 - ], - "declarations": [ - { - "constant": false, - "id": 5258, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 5274, - "src": "25816:16:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25816:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5263, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5261, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "25849:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5259, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5250, - "src": "25835:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 4171, - "src": "25835:13:4", - "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": 5262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:25:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25816:44:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5264, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "25876:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5270, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "25914:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5267, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5258, - "src": "25900:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5265, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "25889:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "25889:10:4", - "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": 5268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "25889:24:4", - "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": 5271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:34:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25876:47:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5273, - "nodeType": "ExpressionStatement", - "src": "25876:47:4" - } - ] - }, - "id": 5275, - "nodeType": "IfStatement", - "src": "25626:310:4", - "trueBody": { - "id": 5248, - "nodeType": "Block", - "src": "25663:62:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5241, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4922, - "src": "25679:10:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5244, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "25703:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5242, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "25692:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4187, - "src": "25692:10:4", - "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": 5245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25692:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25679:33:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5247, - "nodeType": "ExpressionStatement", - "src": "25679:33:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 5279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5276, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4924, - "src": "25947:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5277, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25964:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25964:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25947:32:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5280, - "nodeType": "ExpressionStatement", - "src": "25947:32:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 5287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5281, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4919, - "src": "25991:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5285, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4913, - "src": "26026:8:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5282, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26006:5:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 5283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26006:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 4094, - "src": "26006:19:4", - "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": 5286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26006:29:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25991:44:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5288, - "nodeType": "ExpressionStatement", - "src": "25991:44:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5290, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5223, - "src": "26064:6:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5289, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4938, - "src": "26052:11:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 5291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:19:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5292, - "nodeType": "EmitStatement", - "src": "26047:24:4" - } - ] - } - } - ] - }, - "documentation": null, - "id": 5319, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5226, - "modifierName": { - "argumentTypes": null, - "id": 5225, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4772, - "src": "25511:22:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25511:22:4" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25563:1:4", - "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": 5228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25555:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25555:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 5231, - "modifierName": { - "argumentTypes": null, - "id": 5227, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5005, - "src": "25542:12:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25542:24:4" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5223, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 5319, - "src": "25470:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25470:7:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25469:16:4" - }, - "returnParameters": { - "id": 5232, - "nodeType": "ParameterList", - "parameters": [], - "src": "25571:0:4" - }, - "scope": 5320, - "src": "25442:832:4", - "stateMutability": "nonpayable", - "superFunction": 4760, - "visibility": "external" - } - ], - "scope": 5321, - "src": "22374:3902:4" - } - ], - "src": "1490:24787:4" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0x92970B7c3a5Fa9079996A530E9Bc4A463EF2146F", - "transactionHash": "0x0f3de97f761b6ecd5e41b6046806fd39bf2fa9aa0f64a1d9d4e140e9d9e818f2" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.666Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMLINKPool.json b/build/contracts/YAMLINKPool.json deleted file mode 100644 index 9b4f3b8..0000000 --- a/build/contracts/YAMLINKPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMLINKPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "link", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"link\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMLINKPool.sol\":\"YAMLINKPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMLINKPool.sol\":{\"keccak256\":\"0xb4e9beb49eef8c44aa42c6924809fc7454d7173e68e55b05c18ba98e56edb6ac\",\"urls\":[\"bzz-raw://7d3a2f64d6d933c7e5e38470170a982999a1e93881f18a75116be153adca213a\",\"dweb:/ipfs/QmWp238tve1qptNsQquSLmn7YVF5Np7iJFsneAoRJvJveY\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b031990811673514910771af9ca656af840dff83e8264ecf986ca17825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633c6b16ab116101355780633c6b16ab146102cd5780633d18b912146102ea57806370a08231146102f2578063715018a614610325576101ad565b80631be05289146102a05780631c4695f4146102a85780632e1a7d4d146102b0576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b6102326105b9565b61028e600480360360208110156102c657600080fd5b50356105d5565b61028e600480360360208110156102e357600080fd5b503561076d565b61028e6109ac565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b336105de610f09565b600a556105e9610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561064a5761061181610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544210156106bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161072a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61073382611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff1661078e6111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b6000610804610f09565b600a5561080f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108705761083781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442111561094057600754421061089e57610896826209896863ffffffff6110bf16565b6008556108ec565b6007546000906108b4904263ffffffff61100316565b905060006108cd6008548361104c90919063ffffffff16565b90506108e662098968610489868463ffffffff61110116565b60085550505b426009819055610905906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a16109a8565b610953826209896863ffffffff6110bf16565b6008556006546009819055610971906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b336109b5610f09565b600a556109c0610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a21576109e881610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a9257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a9d33610414565b905080156109a857336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b505050506040513d6020811015610b4957600080fd5b505190506000610b6b670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b989073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105d5565b610f7c6109ac565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582011b5dc843c5bc8217766f3b8d89ef095147b1786377ede88867ebee85726af3864736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637b0a47ee116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637b0a47ee1461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633c6b16ab116101355780633c6b16ab146102cd5780633d18b912146102ea57806370a08231146102f2578063715018a614610325576101ad565b80631be05289146102a05780631c4695f4146102a85780632e1a7d4d146102b0576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b6102326105b9565b61028e600480360360208110156102c657600080fd5b50356105d5565b61028e600480360360208110156102e357600080fd5b503561076d565b61028e6109ac565b6101e56004803603602081101561030857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bd4565b61028e610bfc565b6101e5610cde565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bd4565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b336105de610f09565b600a556105e9610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561064a5761061181610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544210156106bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161072a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61073382611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff1661078e6111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b6000610804610f09565b600a5561080f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108705761083781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442111561094057600754421061089e57610896826209896863ffffffff6110bf16565b6008556108ec565b6007546000906108b4904263ffffffff61100316565b905060006108cd6008548361104c90919063ffffffff16565b90506108e662098968610489868463ffffffff61110116565b60085550505b426009819055610905906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a16109a8565b610953826209896863ffffffff6110bf16565b6008556006546009819055610971906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b336109b5610f09565b600a556109c0610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a21576109e881610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a9257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a9d33610414565b905080156109a857336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b1f57600080fd5b505af1158015610b33573d6000803e3d6000fd5b505050506040513d6020811015610b4957600080fd5b505190506000610b6b670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b989073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610c04610d2b565b610c6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bd4565b6105d5565b610f7c6109ac565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582011b5dc843c5bc8217766f3b8d89ef095147b1786377ede88867ebee85726af3864736f6c63430005110032", - "sourceMap": "22374:3902:5:-;;;21553:71;;;-1:-1:-1;;;;;;21553:71:5;;;21581:42;21553:71;;;22449:70;;;;;;22476:42;22449:70;;;22615:10;22588:37;;22669:31;;;;22706:29;;9510:12;-1:-1:-1;;;;;9510:10:5;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:5;-1:-1:-1;;;;;9501:21:5;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:5;;-1:-1:-1;;9537:40:5;22374:3902;;8448:96;8527:10;8448:96;:::o;22374:3902::-;;;;;;;", - "deployedSourceMap": "22374:3902:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22374:3902:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24126:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24126:259:5;;;;:::i;:::-;;;;;;;;;;;;;;;;22880:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22880:42:5;;;;:::i;22449:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:5;;;;:::i;:::-;;20906:33;;;:::i;21717:89::-;;;:::i;22525:41::-;;;:::i;21553:71::-;;;:::i;24677:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24677:210:5;;:::i;25442:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25442:832:5;;:::i;24993:443::-;;;:::i;21812:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21812:108:5;;;;:::i;10445:137::-;;;:::i;22706:29::-;;;:::i;23577:129::-;;;:::i;22817:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22817:57:5;;;;:::i;22588:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;24473:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24473:198:5;;:::i;22741:29::-;;;:::i;23712:408::-;;;:::i;22776:35::-;;;:::i;24893:94::-;;;:::i;22669:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:5;;;;:::i;24126:259::-;24361:16;;;24180:7;24361:16;;;:7;:16;;;;;;;;;24279:22;:31;;;;;;24218:160;;24361:16;24218:121;;24334:4;;24218:94;;24258:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24218:18;24228:7;24218:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24199:179;24126:259;-1:-1:-1;;24126:259:5:o;22880:42::-;;;;;;;;;;;;;:::o;22449:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21717:89::-;21787:12;;21717:89;;:::o;22525:41::-;22560:6;22525:41;:::o;21553:71::-;;;;;;:::o;24677:210::-;24731:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24781:1;24772:6;:10;24764:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24814:22;24829:6;24814:14;:22::i;:::-;24851:29;;;;;;;;24861:10;;24851:29;;;;;;;;;;24677:210;;:::o;25442:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25563:1;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;25603:9;;25585:15;:27;25581:687;;;25649:12;;25630:15;:31;25626:310;;25692:20;:6;22560;25692:20;:10;:20;:::i;:::-;25679:10;:33;25626:310;;;25767:12;;25747:17;;25767:33;;25784:15;25767:33;:16;:33;:::i;:::-;25747:53;;25816:16;25835:25;25849:10;;25835:9;:13;;:25;;;;:::i;:::-;25816:44;-1:-1:-1;25889:34:5;22560:6;25889:20;:6;25816:44;25889:20;:10;:20;:::i;:34::-;25876:10;:47;-1:-1:-1;;25626:310:5;25964:15;25947:14;:32;;;26006:29;;22560:6;26006:29;:19;:29;:::i;:::-;25991:12;:44;26052:19;;;;;;;;;;;;;;;;;25581:687;;;26113:20;:6;22560;26113:20;:10;:20;:::i;:::-;26100:10;:33;26162:9;;26145:14;:26;;;26198:23;;22560:6;26198:23;:13;:23;:::i;:::-;26183:12;:38;26238:19;;;;;;;;;;;;;;;;;25581:687;21139:1;25442:832;:::o;24993:443::-;25034:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25067:14;25084:18;25091:10;25084:6;:18::i;:::-;25067:35;-1:-1:-1;25116:10:5;;25112:318;;25150:10;25164:1;25142:19;;;:7;:19;;;;;;;;:23;;;25215:3;;25203:37;;;;;;;25142:19;25215:3;;;;25203:35;;:37;;;;;;;;;;;25164:1;25215:3;25203:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25203:37:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25203:37:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25203:37:5;;-1:-1:-1;25254:18:5;25275:37;25305:6;25275:25;:6;25203:37;25275:25;:10;:25;:::i;:37::-;25326:3;;25254:58;;-1:-1:-1;25326:40:5;;:3;;25343:10;25254:58;25326:40;:16;:40;:::i;:::-;25385:34;;;;;;;;25396:10;;25385:34;;;;;;;;;;25112:318;;23235:1;24993:443;:::o;21812:108::-;21895:18;;21869:7;21895:18;;;:9;:18;;;;;;;21812:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22706:29::-;;;;:::o;23577:129::-;23634:7;23660:39;23669:15;23686:12;;23660:8;:39::i;:::-;23653:46;;23577:129;:::o;22817:57::-;;;;;;;;;;;;;:::o;22588:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;24473:198::-;24524:10;23321:16;:14;:16::i;:::-;23298:20;:39;23364:26;:24;:26::i;:::-;23347:14;:43;23404:21;;;;23400:154;;23460:15;23467:7;23460:6;:15::i;:::-;23441:16;;;;;;;:7;:16;;;;;;;;:34;;;;23523:20;;23489:22;:31;;;;;;:54;23400:154;23203:9;;23184:15;:28;;23176:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24574:1;24565:6;:10;24557:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24604:19;24616:6;24604:11;:19::i;:::-;24638:26;;;;;;;;24645:10;;24638:26;;;;;;;;;;24473:198;;:::o;22741:29::-;;;;:::o;23712:408::-;23759:7;23782:13;:11;:13::i;:::-;23778:76;;-1:-1:-1;23823:20:5;;23816:27;;23778:76;23882:231;23924:175;24085:13;:11;:13::i;:::-;23924:135;24054:4;23924:104;24017:10;;23924:67;23976:14;;23924:26;:24;:26::i;:175::-;23882:20;;;:231;:24;:231;:::i;22776:35::-;;;;:::o;24893:94::-;24928:31;24937:21;24947:10;24937:9;:21::i;:::-;24928:8;:31::i;:::-;24969:11;:9;:11::i;:::-;24893:94::o;22669:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:5:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:5;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22159:211;22225:12;;:24;;22242:6;22225:24;:16;:24;:::i;:::-;22210:12;:39;22293:10;22283:21;;;;:9;:21;;;;;;:33;;22309:6;22283:33;:25;:33;:::i;:::-;22269:10;22259:21;;;;:9;:21;;;;;:57;;;;22326:4;;:37;;22259:21;22326:4;;;;22356:6;22326:17;:37::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:5;;;;;;;;25:18:-1;;61:17;;17776:58:5;182:15:-1;17799:23:5;179:29:-1;160:49;;17750:85:5;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:5;;1848:104;-1:-1:-1;1848:104:5:o;21926:227::-;21989:12;;:24;;22006:6;21989:24;:16;:24;:::i;:::-;21974:12;:39;22057:10;22047:21;;;;:9;:21;;;;;;:33;;22073:6;22047:33;:25;:33;:::i;:::-;22033:10;22023:21;;;;:9;:21;;;;;:57;;;;22090:4;;:56;;22023:21;22090:4;;;;22132;22139:6;22090:21;:56::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:5;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:5;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:5:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:5;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:5;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:5;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:5;;;;;;;;25:18:-1;;61:17;;17974:68:5;182:15:-1;17997:27:5;179:29:-1;160:49;;17948:95:5;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:5:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public link = IERC20(0x514910771AF9Ca656af840dff83E8264EcF986CA);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n link.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n link.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMLINKPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart() {\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMLINKPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMLINKPool.sol", - "exportedSymbols": { - "Address": [ - 5855 - ], - "Context": [ - 5601 - ], - "IERC20": [ - 5781 - ], - "IRewardDistributionRecipient": [ - 6106 - ], - "LPTokenWrapper": [ - 6222 - ], - "Math": [ - 5389 - ], - "Ownable": [ - 5713 - ], - "SafeERC20": [ - 6071 - ], - "SafeMath": [ - 5575 - ], - "YAM": [ - 6113 - ], - "YAMLINKPool": [ - 6641 - ] - }, - "id": 6642, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 5322, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 5389, - "linearizedBaseContracts": [ - 5389 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5338, - "nodeType": "Block", - "src": "1739:38:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5331, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5324, - "src": "1756:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5332, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5326, - "src": "1761:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5335, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5326, - "src": "1769:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:5", - "trueExpression": { - "argumentTypes": null, - "id": 5334, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5324, - "src": "1765:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5330, - "id": 5337, - "nodeType": "Return", - "src": "1749:21:5" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 5339, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5324, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5339, - "src": "1685:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5323, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5326, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5339, - "src": "1696:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:5" - }, - "returnParameters": { - "id": 5330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5339, - "src": "1730:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5328, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:5" - }, - "scope": 5389, - "src": "1672:105:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5355, - "nodeType": "Block", - "src": "1915:37:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5348, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5341, - "src": "1932:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 5349, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5343, - "src": "1936:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5352, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5343, - "src": "1944:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:5", - "trueExpression": { - "argumentTypes": null, - "id": 5351, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5341, - "src": "1940:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5347, - "id": 5354, - "nodeType": "Return", - "src": "1925:20:5" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 5356, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5344, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5341, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5356, - "src": "1861:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5343, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5356, - "src": "1872:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5342, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:5" - }, - "returnParameters": { - "id": 5347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5346, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5356, - "src": "1906:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5345, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:5" - }, - "scope": 5389, - "src": "1848:104:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5387, - "nodeType": "Block", - "src": "2136:119:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5365, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5358, - "src": "2208:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5368, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5369, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5360, - "src": "2218:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5372, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5374, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5358, - "src": "2229:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5377, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5360, - "src": "2237:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5381, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5364, - "id": 5386, - "nodeType": "Return", - "src": "2200:48:5" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 5388, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5358, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5388, - "src": "2082:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5360, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5388, - "src": "2093:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5359, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:5" - }, - "returnParameters": { - "id": 5364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5363, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5388, - "src": "2127:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5362, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:5" - }, - "scope": 5389, - "src": "2065:190:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "1589:668:5" - }, - { - "id": 5390, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 5575, - "linearizedBaseContracts": [ - 5575 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5414, - "nodeType": "Block", - "src": "3212:109:5", - "statements": [ - { - "assignments": [ - 5400 - ], - "declarations": [ - { - "constant": false, - "id": 5400, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5414, - "src": "3222:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5399, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5404, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5401, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5392, - "src": "3234:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 5402, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5394, - "src": "3238:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5406, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5400, - "src": "3257:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5407, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5392, - "src": "3262:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 5409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 5405, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5411, - "nodeType": "ExpressionStatement", - "src": "3249:46:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5412, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5400, - "src": "3313:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5398, - "id": 5413, - "nodeType": "Return", - "src": "3306:8:5" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 5415, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5395, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5392, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5415, - "src": "3158:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5391, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5394, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5415, - "src": "3169:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5393, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:5" - }, - "returnParameters": { - "id": 5398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5397, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5415, - "src": "3203:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:5" - }, - "scope": 5575, - "src": "3145:176:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5430, - "nodeType": "Block", - "src": "3652:67:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5425, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5417, - "src": "3673:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5426, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5419, - "src": "3676:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 5427, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 5424, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5431, - 5458 - ], - "referencedDeclaration": 5458, - "src": "3669:3:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5423, - "id": 5429, - "nodeType": "Return", - "src": "3662:50:5" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 5431, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5417, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5431, - "src": "3598:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5416, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5419, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5431, - "src": "3609:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5418, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:5" - }, - "returnParameters": { - "id": 5423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5431, - "src": "3643:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5421, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:5" - }, - "scope": 5575, - "src": "3585:134:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5457, - "nodeType": "Block", - "src": "4138:92:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5443, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5435, - "src": "4156:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 5444, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5433, - "src": "4161:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5446, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5437, - "src": "4164:12:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5442, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5448, - "nodeType": "ExpressionStatement", - "src": "4148:29:5" - }, - { - "assignments": [ - 5450 - ], - "declarations": [ - { - "constant": false, - "id": 5450, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5457, - "src": "4187:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5449, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5454, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5451, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5433, - "src": "4199:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 5452, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5435, - "src": "4203:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5455, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5450, - "src": "4222:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5441, - "id": 5456, - "nodeType": "Return", - "src": "4215:8:5" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 5458, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5438, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5433, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4056:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5432, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5435, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4067:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5434, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5437, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4078:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5436, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:5" - }, - "returnParameters": { - "id": 5441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4129:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:5" - }, - "scope": 5575, - "src": "4043:187:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5491, - "nodeType": "Block", - "src": "4537:392:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5467, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5460, - "src": "4769:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5473, - "nodeType": "IfStatement", - "src": "4765:45:5", - "trueBody": { - "id": 5472, - "nodeType": "Block", - "src": "4777:33:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5466, - "id": 5471, - "nodeType": "Return", - "src": "4791:8:5" - } - ] - } - }, - { - "assignments": [ - 5475 - ], - "declarations": [ - { - "constant": false, - "id": 5475, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5491, - "src": "4820:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5479, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5476, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5460, - "src": "4832:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 5477, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5462, - "src": "4836:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5481, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5475, - "src": "4855:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5482, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5460, - "src": "4859:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5484, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5462, - "src": "4864:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 5486, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 5480, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5488, - "nodeType": "ExpressionStatement", - "src": "4847:56:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5489, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5475, - "src": "4921:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5466, - "id": 5490, - "nodeType": "Return", - "src": "4914:8:5" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 5492, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5463, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5460, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5492, - "src": "4483:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5459, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5462, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5492, - "src": "4494:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:5" - }, - "returnParameters": { - "id": 5466, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5465, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5492, - "src": "4528:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5464, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:5" - }, - "scope": 5575, - "src": "4470:459:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5507, - "nodeType": "Block", - "src": "5451:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5502, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5494, - "src": "5472:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5503, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5496, - "src": "5475:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 5504, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 5501, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5508, - 5535 - ], - "referencedDeclaration": 5535, - "src": "5468:3:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5500, - "id": 5506, - "nodeType": "Return", - "src": "5461:46:5" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5508, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5497, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5494, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5508, - "src": "5397:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5493, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5496, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5508, - "src": "5408:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5495, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:5" - }, - "returnParameters": { - "id": 5500, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5499, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5508, - "src": "5442:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5498, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:5" - }, - "scope": 5575, - "src": "5384:130:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5534, - "nodeType": "Block", - "src": "6124:243:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5520, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5512, - "src": "6208:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5523, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5514, - "src": "6215:12:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5519, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5525, - "nodeType": "ExpressionStatement", - "src": "6200:28:5" - }, - { - "assignments": [ - 5527 - ], - "declarations": [ - { - "constant": false, - "id": 5527, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5534, - "src": "6238:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5526, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5531, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5528, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5510, - "src": "6250:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5529, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5512, - "src": "6254:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5532, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5527, - "src": "6359:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5518, - "id": 5533, - "nodeType": "Return", - "src": "6352:8:5" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5535, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5515, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5510, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6042:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5512, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6053:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5511, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5514, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6064:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5513, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:5" - }, - "returnParameters": { - "id": 5518, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5517, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6115:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5516, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:5" - }, - "scope": 5575, - "src": "6029:338:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5550, - "nodeType": "Block", - "src": "6878:61:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5545, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5537, - "src": "6899:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5546, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5539, - "src": "6902:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 5547, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 5544, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5551, - 5574 - ], - "referencedDeclaration": 5574, - "src": "6895:3:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5543, - "id": 5549, - "nodeType": "Return", - "src": "6888:44:5" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5551, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5540, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5537, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5551, - "src": "6824:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5536, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5539, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5551, - "src": "6835:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:5" - }, - "returnParameters": { - "id": 5543, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5542, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5551, - "src": "6869:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5541, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:5" - }, - "scope": 5575, - "src": "6811:128:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5573, - "nodeType": "Block", - "src": "7538:68:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5563, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5555, - "src": "7556:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5564, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5566, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5557, - "src": "7564:12:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5562, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5568, - "nodeType": "ExpressionStatement", - "src": "7548:29:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5569, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5553, - "src": "7594:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 5570, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5555, - "src": "7598:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5561, - "id": 5572, - "nodeType": "Return", - "src": "7587:12:5" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5574, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5558, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5553, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7456:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5552, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5555, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7467:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5554, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5557, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7478:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5556, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:5" - }, - "returnParameters": { - "id": 5561, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5560, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7529:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5559, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:5" - }, - "scope": 5575, - "src": "7443:163:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "2900:4708:5" - }, - { - "id": 5576, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5601, - "linearizedBaseContracts": [ - 5601 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5579, - "nodeType": "Block", - "src": "8386:3:5", - "statements": [] - }, - "documentation": null, - "id": 5580, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5577, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:5" - }, - "returnParameters": { - "id": 5578, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:5" - }, - "scope": 5601, - "src": "8362:27:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5588, - "nodeType": "Block", - "src": "8510:34:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5585, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 5584, - "id": 5587, - "nodeType": "Return", - "src": "8520:17:5" - } - ] - }, - "documentation": null, - "id": 5589, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5581, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:5" - }, - "returnParameters": { - "id": 5584, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5583, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5589, - "src": "8493:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5582, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:5", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:5" - }, - "scope": 5601, - "src": "8448:96:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5599, - "nodeType": "Block", - "src": "8607:165:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5594, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19351, - "src": "8617:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5601", - "typeString": "contract Context" - } - }, - "id": 5595, - "nodeType": "ExpressionStatement", - "src": "8617:4:5" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5596, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 5593, - "id": 5598, - "nodeType": "Return", - "src": "8750:15:5" - } - ] - }, - "documentation": null, - "id": 5600, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:5" - }, - "returnParameters": { - "id": 5593, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5592, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5600, - "src": "8593:12:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5591, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:5" - }, - "scope": 5601, - "src": "8550:222:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "8185:589:5" - }, - { - "id": 5602, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:5" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 5603, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5601, - "src": "9238:7:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5601", - "typeString": "contract Context" - } - }, - "id": 5604, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:5" - } - ], - "contractDependencies": [ - 5601 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 5713, - "linearizedBaseContracts": [ - 5713, - 5601 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 5606, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 5713, - "src": "9252:22:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5605, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 5612, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 5611, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5608, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 5612, - "src": "9308:29:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5610, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5612, - "src": "9339:24:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5609, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:5" - }, - "src": "9281:84:5" - }, - { - "body": { - "id": 5627, - "nodeType": "Block", - "src": "9491:93:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5615, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "9501:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5616, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5589, - "src": "9510:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5619, - "nodeType": "ExpressionStatement", - "src": "9501:21:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5622, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:5", - "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": 5621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5624, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "9570:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5620, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5612, - "src": "9537:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5626, - "nodeType": "EmitStatement", - "src": "9532:45:5" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 5628, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5613, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:5" - }, - "returnParameters": { - "id": 5614, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:5" - }, - "scope": 5713, - "src": "9467:117:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5635, - "nodeType": "Block", - "src": "9707:30:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5633, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "9724:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 5632, - "id": 5634, - "nodeType": "Return", - "src": "9717:13:5" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 5636, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5629, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:5" - }, - "returnParameters": { - "id": 5632, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5636, - "src": "9698:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:5" - }, - "scope": 5713, - "src": "9660:77:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5645, - "nodeType": "Block", - "src": "9846:82:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5639, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5657, - "src": "9864:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 5640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 5641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 5638, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5643, - "nodeType": "ExpressionStatement", - "src": "9856:54:5" - }, - { - "id": 5644, - "nodeType": "PlaceholderStatement", - "src": "9920:1:5" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 5646, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 5637, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:5" - }, - "src": "9825:103:5", - "visibility": "internal" - }, - { - "body": { - "id": 5656, - "nodeType": "Block", - "src": "10057:46:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5651, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5589, - "src": "10074:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5653, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "10090:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5650, - "id": 5655, - "nodeType": "Return", - "src": "10067:29:5" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 5657, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5647, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:5" - }, - "returnParameters": { - "id": 5650, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5649, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5657, - "src": "10051:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5648, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:5" - }, - "scope": 5713, - "src": "10011:92:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5675, - "nodeType": "Block", - "src": "10491:91:5", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5663, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "10527:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:5", - "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": 5664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5662, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5612, - "src": "10506:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5668, - "nodeType": "EmitStatement", - "src": "10501:45:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5669, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "10556:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:5", - "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": 5670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5674, - "nodeType": "ExpressionStatement", - "src": "10556:19:5" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 5676, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5660, - "modifierName": { - "argumentTypes": null, - "id": 5659, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5646, - "src": "10481:9:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:5" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5658, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:5" - }, - "returnParameters": { - "id": 5661, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:5" - }, - "scope": 5713, - "src": "10445:137:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5687, - "nodeType": "Block", - "src": "10793:45:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5684, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5678, - "src": "10822:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5683, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5712, - "src": "10803:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5686, - "nodeType": "ExpressionStatement", - "src": "10803:28:5" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 5688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5681, - "modifierName": { - "argumentTypes": null, - "id": 5680, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5646, - "src": "10783:9:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:5" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5679, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5678, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "10758:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5677, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:5" - }, - "returnParameters": { - "id": 5682, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:5" - }, - "scope": 5713, - "src": "10731:107:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5711, - "nodeType": "Block", - "src": "10994:170:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5694, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5690, - "src": "11012:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:5", - "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": 5695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5697, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 5699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 5693, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5701, - "nodeType": "ExpressionStatement", - "src": "11004:73:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5703, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "11113:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5704, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5690, - "src": "11121:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5702, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5612, - "src": "11092:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5706, - "nodeType": "EmitStatement", - "src": "11087:43:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5707, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "11140:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5708, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5690, - "src": "11149:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5710, - "nodeType": "ExpressionStatement", - "src": "11140:17:5" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 5712, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5712, - "src": "10967:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:5" - }, - "returnParameters": { - "id": 5692, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:5" - }, - "scope": 5713, - "src": "10939:225:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "9218:1948:5" - }, - { - "id": 5714, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 5781, - "linearizedBaseContracts": [ - 5781 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 5719, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5715, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:5" - }, - "returnParameters": { - "id": 5718, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5717, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5719, - "src": "11541:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5716, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:5" - }, - "scope": 5781, - "src": "11495:55:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 5726, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5722, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5721, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5726, - "src": "11652:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5720, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:5" - }, - "returnParameters": { - "id": 5725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5724, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5726, - "src": "11692:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5723, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:5" - }, - "scope": 5781, - "src": "11633:68:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 5735, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5731, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5728, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 5735, - "src": "11939:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5727, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5730, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5735, - "src": "11958:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5729, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:5" - }, - "returnParameters": { - "id": 5734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5733, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5735, - "src": "11992:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5732, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:5" - }, - "scope": 5781, - "src": "11921:77:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 5744, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5740, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5737, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 5744, - "src": "12292:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5739, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5744, - "src": "12307:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5738, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:5" - }, - "returnParameters": { - "id": 5743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5742, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5744, - "src": "12347:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:5" - }, - "scope": 5781, - "src": "12273:83:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 5753, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5746, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5753, - "src": "13026:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5745, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5748, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5753, - "src": "13043:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5747, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:5" - }, - "returnParameters": { - "id": 5752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5751, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5753, - "src": "13077:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5750, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:5" - }, - "scope": 5781, - "src": "13009:74:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 5764, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5760, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5755, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13412:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5754, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5757, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13428:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5759, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13447:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5758, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:5" - }, - "returnParameters": { - "id": 5763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5762, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13481:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5761, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:5" - }, - "scope": 5781, - "src": "13390:97:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 5772, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 5771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5766, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 5772, - "src": "13671:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5765, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5768, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 5772, - "src": "13693:18:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5767, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5770, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5772, - "src": "13713:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5769, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:5" - }, - "src": "13656:72:5" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 5780, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 5779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5774, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 5780, - "src": "13902:21:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5776, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5780, - "src": "13925:23:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5778, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5780, - "src": "13950:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:5" - }, - "src": "13887:78:5" - } - ], - "scope": 6642, - "src": "11401:2566:5" - }, - { - "id": 5782, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 5855, - "linearizedBaseContracts": [ - 5855 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5806, - "nodeType": "Block", - "src": "14644:731:5", - "statements": [ - { - "assignments": [ - 5790 - ], - "declarations": [ - { - "constant": false, - "id": 5790, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 5806, - "src": "15083:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5789, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5791, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:5" - }, - { - "assignments": [ - 5793 - ], - "declarations": [ - { - "constant": false, - "id": 5793, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 5806, - "src": "15109:19:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5792, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5795, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 5794, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:5" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 5790, - "isOffset": false, - "isSlot": false, - "src": "15274:8:5", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 5784, - "isOffset": false, - "isSlot": false, - "src": "15298:7:5", - "valueSize": 1 - } - } - ], - "id": 5796, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:5" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 5803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 5799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5797, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5790, - "src": "15325:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 5798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 5802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5800, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5790, - "src": "15344:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 5801, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5793, - "src": "15356:11:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5804, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5788, - "id": 5805, - "nodeType": "Return", - "src": "15317:51:5" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 5807, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5785, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5784, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5807, - "src": "14598:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5783, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:5" - }, - "returnParameters": { - "id": 5788, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5787, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5807, - "src": "14638:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5786, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:5" - }, - "scope": 5855, - "src": "14578:797:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5820, - "nodeType": "Block", - "src": "15660:49:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5816, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5809, - "src": "15693:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 5817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 5814, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 5813, - "id": 5819, - "nodeType": "Return", - "src": "15670:32:5" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 5821, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5809, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5821, - "src": "15603:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5808, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:5" - }, - "returnParameters": { - "id": 5813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5812, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5821, - "src": "15643:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5811, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:5", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:5" - }, - "scope": 5855, - "src": "15584:125:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5853, - "nodeType": "Block", - "src": "16737:294:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5834, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5830, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19357, - "src": "16763:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$5855", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$5855", - "typeString": "library Address" - } - ], - "id": 5829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5833, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5825, - "src": "16780:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 5835, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 5828, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5837, - "nodeType": "ExpressionStatement", - "src": "16747:73:5" - }, - { - "assignments": [ - 5839, - null - ], - "declarations": [ - { - "constant": false, - "id": 5839, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 5853, - "src": "16886:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5838, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 5847, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 5845, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 5843, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5825, - "src": "16925:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5840, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5823, - "src": "16904:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 5841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:5", - "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": 5842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 5844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:5", - "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": 5846, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5849, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5839, - "src": "16954:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 5850, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 5848, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5852, - "nodeType": "ExpressionStatement", - "src": "16946:78:5" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 5854, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5826, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5823, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 5854, - "src": "16685:25:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5822, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:5", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5825, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5854, - "src": "16712:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5824, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:5" - }, - "returnParameters": { - "id": 5827, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:5" - }, - "scope": 5855, - "src": "16666:365:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "14114:2919:5" - }, - { - "id": 5856, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 6071, - "linearizedBaseContracts": [ - 6071 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 5859, - "libraryName": { - "contractScope": null, - "id": 5857, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5575, - "src": "17610:8:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5575", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:5", - "typeName": { - "id": 5858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 5862, - "libraryName": { - "contractScope": null, - "id": 5860, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5855, - "src": "17642:7:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$5855", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:5", - "typeName": { - "id": 5861, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 5883, - "nodeType": "Block", - "src": "17740:102:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5872, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5864, - "src": "17769:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5875, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5864, - "src": "17799:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 5735, - "src": "17799:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 5877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5878, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5866, - "src": "17824:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5879, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5868, - "src": "17828:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5873, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5874, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5871, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "17750:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5882, - "nodeType": "ExpressionStatement", - "src": "17750:85:5" - } - ] - }, - "documentation": null, - "id": 5884, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5864, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5884, - "src": "17690:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5863, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "17690:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5866, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 5884, - "src": "17704:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5865, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5868, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5884, - "src": "17716:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:5" - }, - "returnParameters": { - "id": 5870, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:5" - }, - "scope": 6071, - "src": "17668:174:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5908, - "nodeType": "Block", - "src": "17938:112:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5896, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5886, - "src": "17967:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5899, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5886, - "src": "17997:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 5764, - "src": "17997:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 5901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5902, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5888, - "src": "18026:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5903, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5890, - "src": "18032:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5904, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5892, - "src": "18036:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5897, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5895, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "17948:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5907, - "nodeType": "ExpressionStatement", - "src": "17948:95:5" - } - ] - }, - "documentation": null, - "id": 5909, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5893, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5886, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17874:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5885, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "17874:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5888, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17888:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5887, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5890, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17902:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5889, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5892, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17914:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:5" - }, - "returnParameters": { - "id": 5894, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:5" - }, - "scope": 6071, - "src": "17848:202:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5949, - "nodeType": "Block", - "src": "18132:536:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 5933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5919, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5915, - "src": "18421:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5922, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5926, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19359, - "src": "18461:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - ], - "id": 5925, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5928, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5913, - "src": "18468:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5923, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5911, - "src": "18437:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 5744, - "src": "18437:15:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 5929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5932, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 5934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 5918, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5936, - "nodeType": "ExpressionStatement", - "src": "18412:150:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5938, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5911, - "src": "18591:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5941, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5911, - "src": "18621:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 5753, - "src": "18621:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 5943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5944, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5913, - "src": "18645:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5945, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5915, - "src": "18654:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5939, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5940, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5937, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "18572:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5948, - "nodeType": "ExpressionStatement", - "src": "18572:89:5" - } - ] - }, - "documentation": null, - "id": 5950, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5916, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5911, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5950, - "src": "18077:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5910, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "18077:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5913, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5950, - "src": "18091:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5912, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5915, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5950, - "src": "18108:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5914, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:5" - }, - "returnParameters": { - "id": 5917, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:5" - }, - "scope": 6071, - "src": "18056:612:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5984, - "nodeType": "Block", - "src": "18760:196:5", - "statements": [ - { - "assignments": [ - 5960 - ], - "declarations": [ - { - "constant": false, - "id": 5960, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 5984, - "src": "18770:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5959, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5971, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5969, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5956, - "src": "18837:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5964, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19359, - "src": "18817:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - ], - "id": 5963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5966, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5954, - "src": "18824:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5961, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5952, - "src": "18793:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 5744, - "src": "18793:15:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 5967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "18793:43:5", - "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": 5970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5973, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5952, - "src": "18872:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5976, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5952, - "src": "18902:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 5753, - "src": "18902:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 5978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5979, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5954, - "src": "18926:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5980, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5960, - "src": "18935:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5974, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5975, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5972, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "18853:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5983, - "nodeType": "ExpressionStatement", - "src": "18853:96:5" - } - ] - }, - "documentation": null, - "id": 5985, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5957, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5952, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5985, - "src": "18705:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5951, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "18705:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5954, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5985, - "src": "18719:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5953, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5956, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5985, - "src": "18736:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5955, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:5" - }, - "returnParameters": { - "id": 5958, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:5" - }, - "scope": 6071, - "src": "18674:282:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6020, - "nodeType": "Block", - "src": "19048:241:5", - "statements": [ - { - "assignments": [ - 5995 - ], - "declarations": [ - { - "constant": false, - "id": 5995, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 6020, - "src": "19058:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5994, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6007, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6004, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5991, - "src": "19125:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 6005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5999, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19359, - "src": "19105:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - ], - "id": 5998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6001, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5989, - "src": "19112:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5996, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5987, - "src": "19081:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 5744, - "src": "19081:15:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5458, - "src": "19081:43:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6009, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5987, - "src": "19205:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6012, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5987, - "src": "19235:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 5753, - "src": "19235:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6015, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5989, - "src": "19259:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6016, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5995, - "src": "19268:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6010, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6008, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "19186:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6019, - "nodeType": "ExpressionStatement", - "src": "19186:96:5" - } - ] - }, - "documentation": null, - "id": 6021, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5987, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6021, - "src": "18993:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5986, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "18993:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5989, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6021, - "src": "19007:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5991, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6021, - "src": "19024:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5990, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:5" - }, - "returnParameters": { - "id": 5993, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:5" - }, - "scope": 6071, - "src": "18962:327:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6069, - "nodeType": "Block", - "src": "19741:1026:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6030, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6023, - "src": "20275:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - ], - "id": 6029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 5807, - "src": "20267:25:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 6033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 6034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 6028, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6036, - "nodeType": "ExpressionStatement", - "src": "20259:71:5" - }, - { - "assignments": [ - 6038, - 6040 - ], - "declarations": [ - { - "constant": false, - "id": 6038, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 6069, - "src": "20401:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6037, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6040, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 6069, - "src": "20415:23:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6039, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6047, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6045, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6025, - "src": "20462:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6042, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6023, - "src": "20450:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - ], - "id": 6041, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:5", - "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": 6046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6049, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6038, - "src": "20485:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 6050, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 6048, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6052, - "nodeType": "ExpressionStatement", - "src": "20477:52:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6056, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6053, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6040, - "src": "20544:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 6054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6055, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6068, - "nodeType": "IfStatement", - "src": "20540:221:5", - "trueBody": { - "id": 6067, - "nodeType": "Block", - "src": "20567:194:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6060, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6040, - "src": "20684:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 6061, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 6062, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 6058, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 6063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 6064, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 6057, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6066, - "nodeType": "ExpressionStatement", - "src": "20665:85:5" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 6070, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6023, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6070, - "src": "19700:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6022, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "19700:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6025, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6070, - "src": "19714:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6024, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:5" - }, - "returnParameters": { - "id": 6027, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:5" - }, - "scope": 6071, - "src": "19672:1095:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 6642, - "src": "17580:3189:5" - }, - { - "id": 6072, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:5" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6073, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5713, - "src": "20892:7:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$5713", - "typeString": "contract Ownable" - } - }, - "id": 6074, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:5" - } - ], - "contractDependencies": [ - 5601, - 5713 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 6106, - "linearizedBaseContracts": [ - 6106, - 5713, - 5601 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6076, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6106, - "src": "20906:33:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6075, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 6081, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6079, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6078, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6081, - "src": "20974:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6077, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:5" - }, - "returnParameters": { - "id": 6080, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:5" - }, - "scope": 6106, - "src": "20946:53:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6092, - "nodeType": "Block", - "src": "21039:108:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6084, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5589, - "src": "21057:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6086, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6076, - "src": "21073:18:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 6088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 6083, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6090, - "nodeType": "ExpressionStatement", - "src": "21049:80:5" - }, - { - "id": 6091, - "nodeType": "PlaceholderStatement", - "src": "21139:1:5" - } - ] - }, - "documentation": null, - "id": 6093, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6082, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:5" - }, - "src": "21005:142:5", - "visibility": "internal" - }, - { - "body": { - "id": 6104, - "nodeType": "Block", - "src": "21252:57:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6100, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6076, - "src": "21262:18:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6101, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6095, - "src": "21283:19:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6103, - "nodeType": "ExpressionStatement", - "src": "21262:40:5" - } - ] - }, - "documentation": null, - "id": 6105, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6098, - "modifierName": { - "argumentTypes": null, - "id": 6097, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5646, - "src": "21238:9:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:5" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6096, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6095, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6105, - "src": "21184:27:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:5" - }, - "returnParameters": { - "id": 6099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:5" - }, - "scope": 6106, - "src": "21153:156:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6642, - "src": "20851:460:5" - }, - { - "id": 6107, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 6113, - "linearizedBaseContracts": [ - 6113 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 6112, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6108, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:5" - }, - "returnParameters": { - "id": 6111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6110, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6112, - "src": "21443:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6109, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:5" - }, - "scope": 6113, - "src": "21396:56:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6642, - "src": "21376:78:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6222, - "linearizedBaseContracts": [ - 6222 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6116, - "libraryName": { - "contractScope": null, - "id": 6114, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5575, - "src": "21494:8:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5575", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:5", - "typeName": { - "id": 6115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 6119, - "libraryName": { - "contractScope": null, - "id": 6117, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6071, - "src": "21526:9:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:5", - "typeName": { - "contractScope": null, - "id": 6118, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "21540:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 6124, - "name": "link", - "nodeType": "VariableDeclaration", - "scope": 6222, - "src": "21553:71:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6120, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "21553:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307835313439313037373141463943613635366166383430646666383345383236344563463938364341", - "id": 6122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x514910771AF9Ca656af840dff83E8264EcF986CA" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6121, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5781, - "src": "21574:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$5781_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6126, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 6222, - "src": "21631:28:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6125, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 6130, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 6222, - "src": "21665:45:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6129, - "keyType": { - "id": 6127, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 6137, - "nodeType": "Block", - "src": "21770:36:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6135, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "21787:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6134, - "id": 6136, - "nodeType": "Return", - "src": "21780:19:5" - } - ] - }, - "documentation": null, - "id": 6138, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6131, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:5" - }, - "returnParameters": { - "id": 6134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6133, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6138, - "src": "21761:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:5" - }, - "scope": 6222, - "src": "21717:89:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6149, - "nodeType": "Block", - "src": "21878:42:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6145, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "21895:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6147, - "indexExpression": { - "argumentTypes": null, - "id": 6146, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6140, - "src": "21905:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6144, - "id": 6148, - "nodeType": "Return", - "src": "21888:25:5" - } - ] - }, - "documentation": null, - "id": 6150, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6141, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6140, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6150, - "src": "21831:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6139, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:5" - }, - "returnParameters": { - "id": 6144, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6143, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6150, - "src": "21869:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6142, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:5" - }, - "scope": 6222, - "src": "21812:108:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6186, - "nodeType": "Block", - "src": "21964:189:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6155, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "21974:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6158, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6152, - "src": "22006:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6156, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "21989:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "21989:16:5", - "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": 6159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6161, - "nodeType": "ExpressionStatement", - "src": "21974:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6162, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22023:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6165, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6163, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6152, - "src": "22073:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6166, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22047:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6169, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6167, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "22047:25:5", - "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": 6172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6174, - "nodeType": "ExpressionStatement", - "src": "22023:57:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6178, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6181, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19365, - "src": "22132:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6222", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6222", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 6180, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6183, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6152, - "src": "22139:6:5", - "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, - "id": 6175, - "name": "link", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6124, - "src": "22090:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 5909, - "src": "22090:21:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5781_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 6184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6185, - "nodeType": "ExpressionStatement", - "src": "22090:56:5" - } - ] - }, - "documentation": null, - "id": 6187, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6152, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6187, - "src": "21941:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6151, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:5" - }, - "returnParameters": { - "id": 6154, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:5" - }, - "scope": 6222, - "src": "21926:227:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6220, - "nodeType": "Block", - "src": "22200:170:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6192, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "22210:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6195, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6189, - "src": "22242:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6193, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "22225:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "22225:16:5", - "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": 6196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6198, - "nodeType": "ExpressionStatement", - "src": "22210:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6199, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22259:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6202, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6200, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6189, - "src": "22309:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6203, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22283:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6206, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6204, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "22283:25:5", - "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": 6209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6211, - "nodeType": "ExpressionStatement", - "src": "22259:57:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6215, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6217, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6189, - "src": "22356:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6212, - "name": "link", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6124, - "src": "22326:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 5884, - "src": "22326:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5781_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6219, - "nodeType": "ExpressionStatement", - "src": "22326:37:5" - } - ] - }, - "documentation": null, - "id": 6221, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6189, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6221, - "src": "22177:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:5" - }, - "returnParameters": { - "id": 6191, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:5" - }, - "scope": 6222, - "src": "22159:211:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 6642, - "src": "21458:914:5" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6223, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6222, - "src": "22398:14:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6222", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 6224, - "nodeType": "InheritanceSpecifier", - "src": "22398:14:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6225, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6106, - "src": "22414:28:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$6106", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 6226, - "nodeType": "InheritanceSpecifier", - "src": "22414:28:5" - } - ], - "contractDependencies": [ - 5601, - 5713, - 6106, - 6222 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6641, - "linearizedBaseContracts": [ - 6641, - 6106, - 5713, - 5601, - 6222 - ], - "name": "YAMLINKPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6231, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22449:70:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6227, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "22449:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 6229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22476:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6228, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5781, - "src": "22469:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$5781_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22469:50:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 6234, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22525:41:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22525:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 6233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22560:6:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6237, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22588:37:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22588:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 6236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22615:10:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6240, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22669:31:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6238, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22669:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6239, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22699:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6243, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22706:29:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6241, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22706:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22734:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6245, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22741:29:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6244, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22741:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6247, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22776:35:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6246, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22776:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6251, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22817:57:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6250, - "keyType": { - "id": 6248, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22825:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22817:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22836:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6255, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22880:42:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6254, - "keyType": { - "id": 6252, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22888:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22880:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22899:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6259, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 6258, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6257, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6259, - "src": "22947:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6256, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22947:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22946:16:5" - }, - "src": "22929:34:5" - }, - { - "anonymous": false, - "documentation": null, - "id": 6265, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 6264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6261, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6265, - "src": "22981:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6260, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22981:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6263, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6265, - "src": "23003:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22980:38:5" - }, - "src": "22968:51:5" - }, - { - "anonymous": false, - "documentation": null, - "id": 6271, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 6270, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6267, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "23040:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6266, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23040:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6269, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "23062:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6268, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23062:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23039:38:5" - }, - "src": "23024:54:5" - }, - { - "anonymous": false, - "documentation": null, - "id": 6277, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 6276, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6273, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6277, - "src": "23100:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23100:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6275, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6277, - "src": "23122:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6274, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23122:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23099:38:5" - }, - "src": "23083:55:5" - }, - { - "body": { - "id": 6288, - "nodeType": "Block", - "src": "23166:77:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6280, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23184:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23184:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6282, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "23203:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23184:28:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 6284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23213:11:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 6279, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23176:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23176:49:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6286, - "nodeType": "ExpressionStatement", - "src": "23176:49:5" - }, - { - "id": 6287, - "nodeType": "PlaceholderStatement", - "src": "23235:1:5" - } - ] - }, - "documentation": null, - "id": 6289, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6278, - "nodeType": "ParameterList", - "parameters": [], - "src": "23163:2:5" - }, - "src": "23144:99:5", - "visibility": "internal" - }, - { - "body": { - "id": 6325, - "nodeType": "Block", - "src": "23288:283:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6293, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23298:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6294, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6372, - "src": "23321:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23321:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23298:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6297, - "nodeType": "ExpressionStatement", - "src": "23298:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6298, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "23347:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6299, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6339, - "src": "23364:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23364:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23347:43:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6302, - "nodeType": "ExpressionStatement", - "src": "23347:43:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6303, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23404:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23423:1:5", - "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": 6304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23415:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23415:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23404:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6323, - "nodeType": "IfStatement", - "src": "23400:154:5", - "trueBody": { - "id": 6322, - "nodeType": "Block", - "src": "23427:127:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6308, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6255, - "src": "23441:7:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6310, - "indexExpression": { - "argumentTypes": null, - "id": 6309, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23449:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23441:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6312, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23467:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6311, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6401, - "src": "23460:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23460:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23441:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6315, - "nodeType": "ExpressionStatement", - "src": "23441:34:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6316, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6251, - "src": "23489:22:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6318, - "indexExpression": { - "argumentTypes": null, - "id": 6317, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23512:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23489:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6319, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23523:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23489:54:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6321, - "nodeType": "ExpressionStatement", - "src": "23489:54:5" - } - ] - } - }, - { - "id": 6324, - "nodeType": "PlaceholderStatement", - "src": "23563:1:5" - } - ] - }, - "documentation": null, - "id": 6326, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6291, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6326, - "src": "23271:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6290, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23271:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23270:17:5" - }, - "src": "23249:322:5", - "visibility": "internal" - }, - { - "body": { - "id": 6338, - "nodeType": "Block", - "src": "23643:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6333, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23669:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23669:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6335, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "23686:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6331, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5389, - "src": "23660:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$5389_$", - "typeString": "type(library Math)" - } - }, - "id": 6332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 5356, - "src": "23660:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 6336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23660:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6330, - "id": 6337, - "nodeType": "Return", - "src": "23653:46:5" - } - ] - }, - "documentation": null, - "id": 6339, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6327, - "nodeType": "ParameterList", - "parameters": [], - "src": "23610:2:5" - }, - "returnParameters": { - "id": 6330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6339, - "src": "23634:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6328, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23634:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23633:9:5" - }, - "scope": 6641, - "src": "23577:129:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6371, - "nodeType": "Block", - "src": "23768:352:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6344, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6138, - "src": "23782:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23782:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23799:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23782:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6351, - "nodeType": "IfStatement", - "src": "23778:76:5", - "trueBody": { - "id": 6350, - "nodeType": "Block", - "src": "23802:52:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6348, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23823:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6343, - "id": 6349, - "nodeType": "Return", - "src": "23816:27:5" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6366, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6138, - "src": "24085:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24085:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6363, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24054:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6360, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "24017:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6357, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "23976:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6354, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6339, - "src": "23924:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "23924:51:5", - "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": 6358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:67:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "23924:92:5", - "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": 6361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:104:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "23924:129:5", - "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": 6364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:135:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "23924:160:5", - "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": 6368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:175:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6352, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23882:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "23882:24:5", - "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": 6369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23882:231:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6343, - "id": 6370, - "nodeType": "Return", - "src": "23863:250:5" - } - ] - }, - "documentation": null, - "id": 6372, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6340, - "nodeType": "ParameterList", - "parameters": [], - "src": "23735:2:5" - }, - "returnParameters": { - "id": 6343, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6342, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6372, - "src": "23759:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6341, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23759:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23758:9:5" - }, - "scope": 6641, - "src": "23712:408:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6400, - "nodeType": "Block", - "src": "24189:196:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6395, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6255, - "src": "24361:7:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6397, - "indexExpression": { - "argumentTypes": null, - "id": 6396, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6374, - "src": "24369:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24361:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24334:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6386, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6251, - "src": "24279:22:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6388, - "indexExpression": { - "argumentTypes": null, - "id": 6387, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6374, - "src": "24302:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24279:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6383, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6372, - "src": "24258:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "24258:20:5", - "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": 6389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:53:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6380, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6374, - "src": "24228:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6379, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6150, - "src": "24218:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "24218:39:5", - "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": 6390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:94:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "24218:115:5", - "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": 6393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:121:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "24218:142:5", - "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": 6398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:160:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6378, - "id": 6399, - "nodeType": "Return", - "src": "24199:179:5" - } - ] - }, - "documentation": null, - "id": 6401, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6375, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6374, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6401, - "src": "24142:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6373, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24142:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24141:17:5" - }, - "returnParameters": { - "id": 6378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6377, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6401, - "src": "24180:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6376, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24180:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24179:9:5" - }, - "scope": 6641, - "src": "24126:259:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6431, - "nodeType": "Block", - "src": "24547:124:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6413, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6403, - "src": "24565:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6414, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24574:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24565:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 6416, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24577:16:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 6412, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24557:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24557:37:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6418, - "nodeType": "ExpressionStatement", - "src": "24557:37:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6422, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6403, - "src": "24616:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6419, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19368, - "src": "24604:5:5", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLINKPool_$6641", - "typeString": "contract super YAMLINKPool" - } - }, - "id": 6421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 6187, - "src": "24604:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24604:19:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6424, - "nodeType": "ExpressionStatement", - "src": "24604:19:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6426, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24645:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24645:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6428, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6403, - "src": "24657:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6425, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6265, - "src": "24638:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24638:26:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6430, - "nodeType": "EmitStatement", - "src": "24633:31:5" - } - ] - }, - "documentation": null, - "id": 6432, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6406, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24524:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24524:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6408, - "modifierName": { - "argumentTypes": null, - "id": 6405, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "24511:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24511:24:5" - }, - { - "arguments": null, - "id": 6410, - "modifierName": { - "argumentTypes": null, - "id": 6409, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "24536:10:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24536:10:5" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6403, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6432, - "src": "24488:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6402, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24488:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24487:16:5" - }, - "returnParameters": { - "id": 6411, - "nodeType": "ParameterList", - "parameters": [], - "src": "24547:0:5" - }, - "scope": 6641, - "src": "24473:198:5", - "stateMutability": "nonpayable", - "superFunction": 6187, - "visibility": "public" - }, - { - "body": { - "id": 6462, - "nodeType": "Block", - "src": "24754:133:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6444, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6434, - "src": "24772:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24781:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24772:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 6447, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24784:19:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 6443, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24764:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24764:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6449, - "nodeType": "ExpressionStatement", - "src": "24764:40:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6453, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6434, - "src": "24829:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6450, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19368, - "src": "24814:5:5", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLINKPool_$6641", - "typeString": "contract super YAMLINKPool" - } - }, - "id": 6452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 6221, - "src": "24814:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24814:22:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6455, - "nodeType": "ExpressionStatement", - "src": "24814:22:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6457, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24861:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24861:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6459, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6434, - "src": "24873:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6456, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6271, - "src": "24851:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24851:29:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6461, - "nodeType": "EmitStatement", - "src": "24846:34:5" - } - ] - }, - "documentation": null, - "id": 6463, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6437, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24731:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24731:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6439, - "modifierName": { - "argumentTypes": null, - "id": 6436, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "24718:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24718:24:5" - }, - { - "arguments": null, - "id": 6441, - "modifierName": { - "argumentTypes": null, - "id": 6440, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "24743:10:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24743:10:5" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6434, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6463, - "src": "24695:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24695:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24694:16:5" - }, - "returnParameters": { - "id": 6442, - "nodeType": "ParameterList", - "parameters": [], - "src": "24754:0:5" - }, - "scope": 6641, - "src": "24677:210:5", - "stateMutability": "nonpayable", - "superFunction": 6221, - "visibility": "public" - }, - { - "body": { - "id": 6476, - "nodeType": "Block", - "src": "24918:69:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6468, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24947:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24947:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6467, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6150, - "src": "24937:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24937:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6466, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6463 - ], - "referencedDeclaration": 6463, - "src": "24928:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24928:31:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6472, - "nodeType": "ExpressionStatement", - "src": "24928:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6473, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6542, - "src": "24969:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 6474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:11:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6475, - "nodeType": "ExpressionStatement", - "src": "24969:11:5" - } - ] - }, - "documentation": null, - "id": 6477, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6464, - "nodeType": "ParameterList", - "parameters": [], - "src": "24906:2:5" - }, - "returnParameters": { - "id": 6465, - "nodeType": "ParameterList", - "parameters": [], - "src": "24918:0:5" - }, - "scope": 6641, - "src": "24893:94:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6541, - "nodeType": "Block", - "src": "25057:379:5", - "statements": [ - { - "assignments": [ - 6487 - ], - "declarations": [ - { - "constant": false, - "id": 6487, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6541, - "src": "25067:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25067:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6492, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6489, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25091:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25091:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6488, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6401, - "src": "25084:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25084:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25067:35:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6493, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6487, - "src": "25116:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25125:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25116:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6540, - "nodeType": "IfStatement", - "src": "25112:318:5", - "trueBody": { - "id": 6539, - "nodeType": "Block", - "src": "25128:302:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6496, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6255, - "src": "25142:7:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6499, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25150:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25150:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25142:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 6500, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25164:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25142:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6502, - "nodeType": "ExpressionStatement", - "src": "25142:23:5" - }, - { - "assignments": [ - 6504 - ], - "declarations": [ - { - "constant": false, - "id": 6504, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 6539, - "src": "25179:21:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6503, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25179:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6512, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6507, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6231, - "src": "25215:3:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - ], - "id": 6506, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25207:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25207:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6505, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6113, - "src": "25203:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$6113_$", - "typeString": "type(contract YAM)" - } - }, - "id": 6509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:17:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$6113", - "typeString": "contract YAM" - } - }, - "id": 6510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 6112, - "src": "25203:35:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 6511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25179:61:5" - }, - { - "assignments": [ - 6514 - ], - "declarations": [ - { - "constant": false, - "id": 6514, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 6539, - "src": "25254:18:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6513, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25254:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6524, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 6522, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6520, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 6521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25309:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25305:6:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6517, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6504, - "src": "25286:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6515, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6487, - "src": "25275:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "25275:10:5", - "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": 6518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "25275:29:5", - "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": 6523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25254:58:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25343:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25343:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6530, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6514, - "src": "25355:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6525, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6231, - "src": "25326:3:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 5884, - "src": "25326:16:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5781_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25326:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6532, - "nodeType": "ExpressionStatement", - "src": "25326:40:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6534, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25396:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25396:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6536, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6514, - "src": "25408:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6533, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6277, - "src": "25385:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:34:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6538, - "nodeType": "EmitStatement", - "src": "25380:39:5" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6542, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6480, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25034:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25034:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6482, - "modifierName": { - "argumentTypes": null, - "id": 6479, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "25021:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25021:24:5" - }, - { - "arguments": null, - "id": 6484, - "modifierName": { - "argumentTypes": null, - "id": 6483, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "25046:10:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25046:10:5" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6478, - "nodeType": "ParameterList", - "parameters": [], - "src": "25011:2:5" - }, - "returnParameters": { - "id": 6485, - "nodeType": "ParameterList", - "parameters": [], - "src": "25057:0:5" - }, - "scope": 6641, - "src": "24993:443:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6639, - "nodeType": "Block", - "src": "25571:703:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6554, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25585:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25585:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 6556, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "25603:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25585:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 6637, - "nodeType": "Block", - "src": "26088:180:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6615, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "26100:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6618, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "26124:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6616, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "26113:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "26113:10:5", - "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": 6619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26113:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6621, - "nodeType": "ExpressionStatement", - "src": "26100:33:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6622, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "26145:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6623, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "26162:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26145:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6625, - "nodeType": "ExpressionStatement", - "src": "26145:26:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6626, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "26183:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6629, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "26212:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6627, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "26198:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "26198:13:5", - "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": 6630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26198:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26183:38:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6632, - "nodeType": "ExpressionStatement", - "src": "26183:38:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6634, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "26250:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6633, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "26238:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26238:19:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6636, - "nodeType": "EmitStatement", - "src": "26233:24:5" - } - ] - }, - "id": 6638, - "nodeType": "IfStatement", - "src": "25581:687:5", - "trueBody": { - "id": 6614, - "nodeType": "Block", - "src": "25614:468:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6558, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25630:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25630:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6560, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "25649:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25630:31:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 6595, - "nodeType": "Block", - "src": "25731:205:5", - "statements": [ - { - "assignments": [ - 6571 - ], - "declarations": [ - { - "constant": false, - "id": 6571, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 6595, - "src": "25747:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6570, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25747:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6577, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6574, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25784:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25784:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6572, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "25767:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "25767:16:5", - "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": 6576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25767:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25747:53:5" - }, - { - "assignments": [ - 6579 - ], - "declarations": [ - { - "constant": false, - "id": 6579, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 6595, - "src": "25816:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25816:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6584, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6582, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "25849:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6580, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6571, - "src": "25835:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "25835:13:5", - "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": 6583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25816:44:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6585, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "25876:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6591, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "25914:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6588, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6579, - "src": "25900:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6586, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "25889:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "25889:10:5", - "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": 6589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "25889:24:5", - "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": 6592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25876:47:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6594, - "nodeType": "ExpressionStatement", - "src": "25876:47:5" - } - ] - }, - "id": 6596, - "nodeType": "IfStatement", - "src": "25626:310:5", - "trueBody": { - "id": 6569, - "nodeType": "Block", - "src": "25663:62:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6562, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "25679:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6565, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "25703:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6563, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "25692:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "25692:10:5", - "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": 6566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25692:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25679:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6568, - "nodeType": "ExpressionStatement", - "src": "25679:33:5" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 6600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6597, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "25947:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6598, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25964:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25964:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25947:32:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6601, - "nodeType": "ExpressionStatement", - "src": "25947:32:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6602, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "25991:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6606, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "26026:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6603, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26006:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26006:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "26006:19:5", - "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": 6607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26006:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25991:44:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6609, - "nodeType": "ExpressionStatement", - "src": "25991:44:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6611, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "26064:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6610, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "26052:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:19:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6613, - "nodeType": "EmitStatement", - "src": "26047:24:5" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6640, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6547, - "modifierName": { - "argumentTypes": null, - "id": 6546, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6093, - "src": "25511:22:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25511:22:5" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25563:1:5", - "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": 6549, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25555:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25555:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6552, - "modifierName": { - "argumentTypes": null, - "id": 6548, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "25542:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25542:24:5" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6544, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6640, - "src": "25470:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25470:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25469:16:5" - }, - "returnParameters": { - "id": 6553, - "nodeType": "ParameterList", - "parameters": [], - "src": "25571:0:5" - }, - "scope": 6641, - "src": "25442:832:5", - "stateMutability": "nonpayable", - "superFunction": 6081, - "visibility": "external" - } - ], - "scope": 6642, - "src": "22374:3902:5" - } - ], - "src": "1490:24787:5" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMLINKPool.sol", - "exportedSymbols": { - "Address": [ - 5855 - ], - "Context": [ - 5601 - ], - "IERC20": [ - 5781 - ], - "IRewardDistributionRecipient": [ - 6106 - ], - "LPTokenWrapper": [ - 6222 - ], - "Math": [ - 5389 - ], - "Ownable": [ - 5713 - ], - "SafeERC20": [ - 6071 - ], - "SafeMath": [ - 5575 - ], - "YAM": [ - 6113 - ], - "YAMLINKPool": [ - 6641 - ] - }, - "id": 6642, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 5322, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 5389, - "linearizedBaseContracts": [ - 5389 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5338, - "nodeType": "Block", - "src": "1739:38:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5331, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5324, - "src": "1756:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5332, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5326, - "src": "1761:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5335, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5326, - "src": "1769:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:5", - "trueExpression": { - "argumentTypes": null, - "id": 5334, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5324, - "src": "1765:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5330, - "id": 5337, - "nodeType": "Return", - "src": "1749:21:5" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 5339, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5324, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5339, - "src": "1685:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5323, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5326, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5339, - "src": "1696:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:5" - }, - "returnParameters": { - "id": 5330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5339, - "src": "1730:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5328, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:5" - }, - "scope": 5389, - "src": "1672:105:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5355, - "nodeType": "Block", - "src": "1915:37:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5348, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5341, - "src": "1932:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 5349, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5343, - "src": "1936:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 5352, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5343, - "src": "1944:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:5", - "trueExpression": { - "argumentTypes": null, - "id": 5351, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5341, - "src": "1940:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5347, - "id": 5354, - "nodeType": "Return", - "src": "1925:20:5" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 5356, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5344, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5341, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5356, - "src": "1861:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5343, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5356, - "src": "1872:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5342, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:5" - }, - "returnParameters": { - "id": 5347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5346, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5356, - "src": "1906:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5345, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:5" - }, - "scope": 5389, - "src": "1848:104:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5387, - "nodeType": "Block", - "src": "2136:119:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5365, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5358, - "src": "2208:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5368, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5369, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5360, - "src": "2218:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5372, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5374, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5358, - "src": "2229:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5377, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5360, - "src": "2237:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5381, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5364, - "id": 5386, - "nodeType": "Return", - "src": "2200:48:5" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 5388, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5358, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5388, - "src": "2082:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5360, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5388, - "src": "2093:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5359, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:5" - }, - "returnParameters": { - "id": 5364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5363, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5388, - "src": "2127:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5362, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:5" - }, - "scope": 5389, - "src": "2065:190:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "1589:668:5" - }, - { - "id": 5390, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 5575, - "linearizedBaseContracts": [ - 5575 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5414, - "nodeType": "Block", - "src": "3212:109:5", - "statements": [ - { - "assignments": [ - 5400 - ], - "declarations": [ - { - "constant": false, - "id": 5400, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5414, - "src": "3222:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5399, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5404, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5401, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5392, - "src": "3234:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 5402, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5394, - "src": "3238:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5406, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5400, - "src": "3257:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5407, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5392, - "src": "3262:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 5409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 5405, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5411, - "nodeType": "ExpressionStatement", - "src": "3249:46:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5412, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5400, - "src": "3313:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5398, - "id": 5413, - "nodeType": "Return", - "src": "3306:8:5" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 5415, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5395, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5392, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5415, - "src": "3158:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5391, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5394, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5415, - "src": "3169:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5393, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:5" - }, - "returnParameters": { - "id": 5398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5397, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5415, - "src": "3203:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:5" - }, - "scope": 5575, - "src": "3145:176:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5430, - "nodeType": "Block", - "src": "3652:67:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5425, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5417, - "src": "3673:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5426, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5419, - "src": "3676:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 5427, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 5424, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5431, - 5458 - ], - "referencedDeclaration": 5458, - "src": "3669:3:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5423, - "id": 5429, - "nodeType": "Return", - "src": "3662:50:5" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 5431, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5417, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5431, - "src": "3598:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5416, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5419, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5431, - "src": "3609:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5418, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:5" - }, - "returnParameters": { - "id": 5423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5431, - "src": "3643:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5421, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:5" - }, - "scope": 5575, - "src": "3585:134:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5457, - "nodeType": "Block", - "src": "4138:92:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5443, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5435, - "src": "4156:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 5444, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5433, - "src": "4161:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5446, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5437, - "src": "4164:12:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5442, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5448, - "nodeType": "ExpressionStatement", - "src": "4148:29:5" - }, - { - "assignments": [ - 5450 - ], - "declarations": [ - { - "constant": false, - "id": 5450, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5457, - "src": "4187:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5449, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5454, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5451, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5433, - "src": "4199:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 5452, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5435, - "src": "4203:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5455, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5450, - "src": "4222:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5441, - "id": 5456, - "nodeType": "Return", - "src": "4215:8:5" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 5458, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5438, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5433, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4056:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5432, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5435, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4067:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5434, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5437, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4078:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5436, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:5" - }, - "returnParameters": { - "id": 5441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5458, - "src": "4129:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:5" - }, - "scope": 5575, - "src": "4043:187:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5491, - "nodeType": "Block", - "src": "4537:392:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5467, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5460, - "src": "4769:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5473, - "nodeType": "IfStatement", - "src": "4765:45:5", - "trueBody": { - "id": 5472, - "nodeType": "Block", - "src": "4777:33:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5466, - "id": 5471, - "nodeType": "Return", - "src": "4791:8:5" - } - ] - } - }, - { - "assignments": [ - 5475 - ], - "declarations": [ - { - "constant": false, - "id": 5475, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5491, - "src": "4820:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5479, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5476, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5460, - "src": "4832:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 5477, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5462, - "src": "4836:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5481, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5475, - "src": "4855:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5482, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5460, - "src": "4859:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5484, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5462, - "src": "4864:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 5486, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 5480, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5488, - "nodeType": "ExpressionStatement", - "src": "4847:56:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5489, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5475, - "src": "4921:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5466, - "id": 5490, - "nodeType": "Return", - "src": "4914:8:5" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 5492, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5463, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5460, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5492, - "src": "4483:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5459, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5462, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5492, - "src": "4494:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:5" - }, - "returnParameters": { - "id": 5466, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5465, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5492, - "src": "4528:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5464, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:5" - }, - "scope": 5575, - "src": "4470:459:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5507, - "nodeType": "Block", - "src": "5451:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5502, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5494, - "src": "5472:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5503, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5496, - "src": "5475:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 5504, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 5501, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5508, - 5535 - ], - "referencedDeclaration": 5535, - "src": "5468:3:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5500, - "id": 5506, - "nodeType": "Return", - "src": "5461:46:5" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5508, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5497, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5494, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5508, - "src": "5397:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5493, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5496, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5508, - "src": "5408:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5495, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:5" - }, - "returnParameters": { - "id": 5500, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5499, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5508, - "src": "5442:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5498, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:5" - }, - "scope": 5575, - "src": "5384:130:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5534, - "nodeType": "Block", - "src": "6124:243:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5520, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5512, - "src": "6208:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5523, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5514, - "src": "6215:12:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5519, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5525, - "nodeType": "ExpressionStatement", - "src": "6200:28:5" - }, - { - "assignments": [ - 5527 - ], - "declarations": [ - { - "constant": false, - "id": 5527, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 5534, - "src": "6238:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5526, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5531, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5528, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5510, - "src": "6250:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 5529, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5512, - "src": "6254:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5532, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5527, - "src": "6359:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5518, - "id": 5533, - "nodeType": "Return", - "src": "6352:8:5" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5535, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5515, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5510, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6042:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5512, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6053:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5511, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5514, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6064:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5513, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:5" - }, - "returnParameters": { - "id": 5518, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5517, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5535, - "src": "6115:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5516, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:5" - }, - "scope": 5575, - "src": "6029:338:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5550, - "nodeType": "Block", - "src": "6878:61:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5545, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5537, - "src": "6899:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5546, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5539, - "src": "6902:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 5547, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 5544, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 5551, - 5574 - ], - "referencedDeclaration": 5574, - "src": "6895:3:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 5548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5543, - "id": 5549, - "nodeType": "Return", - "src": "6888:44:5" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 5551, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5540, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5537, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5551, - "src": "6824:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5536, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5539, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5551, - "src": "6835:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5538, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:5" - }, - "returnParameters": { - "id": 5543, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5542, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5551, - "src": "6869:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5541, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:5" - }, - "scope": 5575, - "src": "6811:128:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5573, - "nodeType": "Block", - "src": "7538:68:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5563, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5555, - "src": "7556:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5564, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5566, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5557, - "src": "7564:12:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 5562, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5568, - "nodeType": "ExpressionStatement", - "src": "7548:29:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5569, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5553, - "src": "7594:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 5570, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5555, - "src": "7598:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5561, - "id": 5572, - "nodeType": "Return", - "src": "7587:12:5" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 5574, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5558, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5553, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7456:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5552, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5555, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7467:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5554, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5557, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7478:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5556, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:5" - }, - "returnParameters": { - "id": 5561, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5560, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5574, - "src": "7529:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5559, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:5" - }, - "scope": 5575, - "src": "7443:163:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "2900:4708:5" - }, - { - "id": 5576, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5601, - "linearizedBaseContracts": [ - 5601 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5579, - "nodeType": "Block", - "src": "8386:3:5", - "statements": [] - }, - "documentation": null, - "id": 5580, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5577, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:5" - }, - "returnParameters": { - "id": 5578, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:5" - }, - "scope": 5601, - "src": "8362:27:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5588, - "nodeType": "Block", - "src": "8510:34:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5585, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 5584, - "id": 5587, - "nodeType": "Return", - "src": "8520:17:5" - } - ] - }, - "documentation": null, - "id": 5589, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5581, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:5" - }, - "returnParameters": { - "id": 5584, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5583, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5589, - "src": "8493:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5582, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:5", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:5" - }, - "scope": 5601, - "src": "8448:96:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5599, - "nodeType": "Block", - "src": "8607:165:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5594, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19351, - "src": "8617:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5601", - "typeString": "contract Context" - } - }, - "id": 5595, - "nodeType": "ExpressionStatement", - "src": "8617:4:5" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5596, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 5593, - "id": 5598, - "nodeType": "Return", - "src": "8750:15:5" - } - ] - }, - "documentation": null, - "id": 5600, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5590, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:5" - }, - "returnParameters": { - "id": 5593, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5592, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5600, - "src": "8593:12:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5591, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:5" - }, - "scope": 5601, - "src": "8550:222:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "8185:589:5" - }, - { - "id": 5602, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:5" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 5603, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5601, - "src": "9238:7:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$5601", - "typeString": "contract Context" - } - }, - "id": 5604, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:5" - } - ], - "contractDependencies": [ - 5601 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 5713, - "linearizedBaseContracts": [ - 5713, - 5601 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 5606, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 5713, - "src": "9252:22:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5605, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 5612, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 5611, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5608, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 5612, - "src": "9308:29:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5610, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5612, - "src": "9339:24:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5609, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:5" - }, - "src": "9281:84:5" - }, - { - "body": { - "id": 5627, - "nodeType": "Block", - "src": "9491:93:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5615, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "9501:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5616, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5589, - "src": "9510:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5619, - "nodeType": "ExpressionStatement", - "src": "9501:21:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5622, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:5", - "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": 5621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5624, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "9570:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5620, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5612, - "src": "9537:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5626, - "nodeType": "EmitStatement", - "src": "9532:45:5" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 5628, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5613, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:5" - }, - "returnParameters": { - "id": 5614, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:5" - }, - "scope": 5713, - "src": "9467:117:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5635, - "nodeType": "Block", - "src": "9707:30:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5633, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "9724:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 5632, - "id": 5634, - "nodeType": "Return", - "src": "9717:13:5" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 5636, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5629, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:5" - }, - "returnParameters": { - "id": 5632, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5636, - "src": "9698:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:5" - }, - "scope": 5713, - "src": "9660:77:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5645, - "nodeType": "Block", - "src": "9846:82:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5639, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5657, - "src": "9864:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 5640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 5641, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 5638, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5643, - "nodeType": "ExpressionStatement", - "src": "9856:54:5" - }, - { - "id": 5644, - "nodeType": "PlaceholderStatement", - "src": "9920:1:5" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 5646, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 5637, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:5" - }, - "src": "9825:103:5", - "visibility": "internal" - }, - { - "body": { - "id": 5656, - "nodeType": "Block", - "src": "10057:46:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 5651, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5589, - "src": "10074:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 5652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 5653, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "10090:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5650, - "id": 5655, - "nodeType": "Return", - "src": "10067:29:5" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 5657, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5647, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:5" - }, - "returnParameters": { - "id": 5650, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5649, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5657, - "src": "10051:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5648, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:5" - }, - "scope": 5713, - "src": "10011:92:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5675, - "nodeType": "Block", - "src": "10491:91:5", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5663, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "10527:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:5", - "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": 5664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5662, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5612, - "src": "10506:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5668, - "nodeType": "EmitStatement", - "src": "10501:45:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5669, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "10556:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:5", - "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": 5670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5674, - "nodeType": "ExpressionStatement", - "src": "10556:19:5" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 5676, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5660, - "modifierName": { - "argumentTypes": null, - "id": 5659, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5646, - "src": "10481:9:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:5" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5658, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:5" - }, - "returnParameters": { - "id": 5661, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:5" - }, - "scope": 5713, - "src": "10445:137:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5687, - "nodeType": "Block", - "src": "10793:45:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5684, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5678, - "src": "10822:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5683, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5712, - "src": "10803:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5686, - "nodeType": "ExpressionStatement", - "src": "10803:28:5" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 5688, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5681, - "modifierName": { - "argumentTypes": null, - "id": 5680, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5646, - "src": "10783:9:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:5" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5679, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5678, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5688, - "src": "10758:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5677, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:5" - }, - "returnParameters": { - "id": 5682, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:5" - }, - "scope": 5713, - "src": "10731:107:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 5711, - "nodeType": "Block", - "src": "10994:170:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5694, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5690, - "src": "11012:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 5696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:5", - "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": 5695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5697, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 5699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 5693, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5701, - "nodeType": "ExpressionStatement", - "src": "11004:73:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5703, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "11113:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5704, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5690, - "src": "11121:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5702, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5612, - "src": "11092:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 5705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5706, - "nodeType": "EmitStatement", - "src": "11087:43:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 5709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5707, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5606, - "src": "11140:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5708, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5690, - "src": "11149:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5710, - "nodeType": "ExpressionStatement", - "src": "11140:17:5" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 5712, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5691, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5690, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 5712, - "src": "10967:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:5" - }, - "returnParameters": { - "id": 5692, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:5" - }, - "scope": 5713, - "src": "10939:225:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "9218:1948:5" - }, - { - "id": 5714, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 5781, - "linearizedBaseContracts": [ - 5781 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 5719, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5715, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:5" - }, - "returnParameters": { - "id": 5718, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5717, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5719, - "src": "11541:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5716, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:5" - }, - "scope": 5781, - "src": "11495:55:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 5726, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5722, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5721, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5726, - "src": "11652:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5720, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:5" - }, - "returnParameters": { - "id": 5725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5724, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5726, - "src": "11692:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5723, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:5" - }, - "scope": 5781, - "src": "11633:68:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 5735, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5731, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5728, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 5735, - "src": "11939:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5727, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5730, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5735, - "src": "11958:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5729, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:5" - }, - "returnParameters": { - "id": 5734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5733, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5735, - "src": "11992:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5732, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:5" - }, - "scope": 5781, - "src": "11921:77:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 5744, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5740, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5737, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 5744, - "src": "12292:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5739, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5744, - "src": "12307:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5738, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:5" - }, - "returnParameters": { - "id": 5743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5742, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5744, - "src": "12347:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5741, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:5" - }, - "scope": 5781, - "src": "12273:83:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 5753, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5746, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5753, - "src": "13026:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5745, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5748, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5753, - "src": "13043:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5747, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:5" - }, - "returnParameters": { - "id": 5752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5751, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5753, - "src": "13077:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5750, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:5" - }, - "scope": 5781, - "src": "13009:74:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 5764, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5760, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5755, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13412:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5754, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5757, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13428:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5759, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13447:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5758, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:5" - }, - "returnParameters": { - "id": 5763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5762, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5764, - "src": "13481:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5761, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:5" - }, - "scope": 5781, - "src": "13390:97:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 5772, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 5771, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5766, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 5772, - "src": "13671:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5765, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5768, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 5772, - "src": "13693:18:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5767, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5770, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5772, - "src": "13713:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5769, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:5" - }, - "src": "13656:72:5" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 5780, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 5779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5774, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 5780, - "src": "13902:21:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5776, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5780, - "src": "13925:23:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5775, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5778, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5780, - "src": "13950:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5777, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:5" - }, - "src": "13887:78:5" - } - ], - "scope": 6642, - "src": "11401:2566:5" - }, - { - "id": 5782, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 5855, - "linearizedBaseContracts": [ - 5855 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 5806, - "nodeType": "Block", - "src": "14644:731:5", - "statements": [ - { - "assignments": [ - 5790 - ], - "declarations": [ - { - "constant": false, - "id": 5790, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 5806, - "src": "15083:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5789, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5791, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:5" - }, - { - "assignments": [ - 5793 - ], - "declarations": [ - { - "constant": false, - "id": 5793, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 5806, - "src": "15109:19:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5792, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5795, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 5794, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:5" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 5790, - "isOffset": false, - "isSlot": false, - "src": "15274:8:5", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 5784, - "isOffset": false, - "isSlot": false, - "src": "15298:7:5", - "valueSize": 1 - } - } - ], - "id": 5796, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:5" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 5803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 5799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5797, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5790, - "src": "15325:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 5798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 5802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5800, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5790, - "src": "15344:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 5801, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5793, - "src": "15356:11:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5804, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5788, - "id": 5805, - "nodeType": "Return", - "src": "15317:51:5" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 5807, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5785, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5784, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5807, - "src": "14598:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5783, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:5" - }, - "returnParameters": { - "id": 5788, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5787, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5807, - "src": "14638:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5786, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:5" - }, - "scope": 5855, - "src": "14578:797:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5820, - "nodeType": "Block", - "src": "15660:49:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5816, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5809, - "src": "15693:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 5817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 5814, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 5813, - "id": 5819, - "nodeType": "Return", - "src": "15670:32:5" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 5821, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5809, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 5821, - "src": "15603:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5808, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:5" - }, - "returnParameters": { - "id": 5813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5812, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5821, - "src": "15643:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5811, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:5", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:5" - }, - "scope": 5855, - "src": "15584:125:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5853, - "nodeType": "Block", - "src": "16737:294:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5834, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5830, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19357, - "src": "16763:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$5855", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$5855", - "typeString": "library Address" - } - ], - "id": 5829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 5833, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5825, - "src": "16780:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 5835, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 5828, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5837, - "nodeType": "ExpressionStatement", - "src": "16747:73:5" - }, - { - "assignments": [ - 5839, - null - ], - "declarations": [ - { - "constant": false, - "id": 5839, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 5853, - "src": "16886:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5838, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 5847, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 5845, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 5843, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5825, - "src": "16925:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5840, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5823, - "src": "16904:9:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 5841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:5", - "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": 5842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 5844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:5", - "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": 5846, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5849, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5839, - "src": "16954:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 5850, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 5848, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5852, - "nodeType": "ExpressionStatement", - "src": "16946:78:5" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 5854, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5826, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5823, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 5854, - "src": "16685:25:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 5822, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:5", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5825, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 5854, - "src": "16712:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5824, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:5" - }, - "returnParameters": { - "id": 5827, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:5" - }, - "scope": 5855, - "src": "16666:365:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 6642, - "src": "14114:2919:5" - }, - { - "id": 5856, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 6071, - "linearizedBaseContracts": [ - 6071 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 5859, - "libraryName": { - "contractScope": null, - "id": 5857, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5575, - "src": "17610:8:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5575", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:5", - "typeName": { - "id": 5858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 5862, - "libraryName": { - "contractScope": null, - "id": 5860, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5855, - "src": "17642:7:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$5855", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:5", - "typeName": { - "id": 5861, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 5883, - "nodeType": "Block", - "src": "17740:102:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5872, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5864, - "src": "17769:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5875, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5864, - "src": "17799:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 5735, - "src": "17799:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 5877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5878, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5866, - "src": "17824:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5879, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5868, - "src": "17828:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5873, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5874, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5871, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "17750:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5882, - "nodeType": "ExpressionStatement", - "src": "17750:85:5" - } - ] - }, - "documentation": null, - "id": 5884, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5864, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5884, - "src": "17690:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5863, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "17690:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5866, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 5884, - "src": "17704:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5865, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5868, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5884, - "src": "17716:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5867, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:5" - }, - "returnParameters": { - "id": 5870, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:5" - }, - "scope": 6071, - "src": "17668:174:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5908, - "nodeType": "Block", - "src": "17938:112:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5896, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5886, - "src": "17967:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5899, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5886, - "src": "17997:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 5764, - "src": "17997:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 5901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5902, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5888, - "src": "18026:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5903, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5890, - "src": "18032:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5904, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5892, - "src": "18036:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5897, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5895, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "17948:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5907, - "nodeType": "ExpressionStatement", - "src": "17948:95:5" - } - ] - }, - "documentation": null, - "id": 5909, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5893, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5886, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17874:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5885, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "17874:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5888, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17888:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5887, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5890, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17902:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5889, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5892, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5909, - "src": "17914:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:5" - }, - "returnParameters": { - "id": 5894, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:5" - }, - "scope": 6071, - "src": "17848:202:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5949, - "nodeType": "Block", - "src": "18132:536:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 5933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5919, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5915, - "src": "18421:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5922, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5926, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19359, - "src": "18461:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - ], - "id": 5925, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5928, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5913, - "src": "18468:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5923, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5911, - "src": "18437:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 5744, - "src": "18437:15:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 5929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5932, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 5934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 5918, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5936, - "nodeType": "ExpressionStatement", - "src": "18412:150:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5938, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5911, - "src": "18591:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5941, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5911, - "src": "18621:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 5753, - "src": "18621:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 5943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5944, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5913, - "src": "18645:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5945, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5915, - "src": "18654:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5939, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5940, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5937, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "18572:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5948, - "nodeType": "ExpressionStatement", - "src": "18572:89:5" - } - ] - }, - "documentation": null, - "id": 5950, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5916, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5911, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5950, - "src": "18077:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5910, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "18077:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5913, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5950, - "src": "18091:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5912, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5915, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5950, - "src": "18108:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5914, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:5" - }, - "returnParameters": { - "id": 5917, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:5" - }, - "scope": 6071, - "src": "18056:612:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 5984, - "nodeType": "Block", - "src": "18760:196:5", - "statements": [ - { - "assignments": [ - 5960 - ], - "declarations": [ - { - "constant": false, - "id": 5960, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 5984, - "src": "18770:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5959, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5971, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5969, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5956, - "src": "18837:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5964, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19359, - "src": "18817:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - ], - "id": 5963, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 5965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5966, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5954, - "src": "18824:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5961, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5952, - "src": "18793:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 5744, - "src": "18793:15:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 5967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "18793:43:5", - "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": 5970, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5973, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5952, - "src": "18872:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5976, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5952, - "src": "18902:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 5753, - "src": "18902:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 5978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 5979, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5954, - "src": "18926:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5980, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5960, - "src": "18935:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5974, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 5975, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 5981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 5972, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "18853:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 5982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5983, - "nodeType": "ExpressionStatement", - "src": "18853:96:5" - } - ] - }, - "documentation": null, - "id": 5985, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5957, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5952, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 5985, - "src": "18705:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5951, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "18705:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5954, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 5985, - "src": "18719:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5953, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5956, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 5985, - "src": "18736:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5955, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:5" - }, - "returnParameters": { - "id": 5958, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:5" - }, - "scope": 6071, - "src": "18674:282:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6020, - "nodeType": "Block", - "src": "19048:241:5", - "statements": [ - { - "assignments": [ - 5995 - ], - "declarations": [ - { - "constant": false, - "id": 5995, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 6020, - "src": "19058:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5994, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6007, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6004, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5991, - "src": "19125:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 6005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5999, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19359, - "src": "19105:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - ], - "id": 5998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6001, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5989, - "src": "19112:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5996, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5987, - "src": "19081:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 5997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 5744, - "src": "19081:15:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 6002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5458, - "src": "19081:43:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6009, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5987, - "src": "19205:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6012, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5987, - "src": "19235:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 5753, - "src": "19235:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 6014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 6015, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5989, - "src": "19259:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6016, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5995, - "src": "19268:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6010, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6011, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 6017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 6008, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "19186:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 6018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6019, - "nodeType": "ExpressionStatement", - "src": "19186:96:5" - } - ] - }, - "documentation": null, - "id": 6021, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5987, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6021, - "src": "18993:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 5986, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "18993:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5989, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 6021, - "src": "19007:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5991, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 6021, - "src": "19024:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5990, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:5" - }, - "returnParameters": { - "id": 5993, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:5" - }, - "scope": 6071, - "src": "18962:327:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6069, - "nodeType": "Block", - "src": "19741:1026:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6030, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6023, - "src": "20275:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - ], - "id": 6029, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 5807, - "src": "20267:25:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 6033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 6034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 6028, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6036, - "nodeType": "ExpressionStatement", - "src": "20259:71:5" - }, - { - "assignments": [ - 6038, - 6040 - ], - "declarations": [ - { - "constant": false, - "id": 6038, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 6069, - "src": "20401:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6037, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6040, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 6069, - "src": "20415:23:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6039, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6047, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6045, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6025, - "src": "20462:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6042, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6023, - "src": "20450:5:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - ], - "id": 6041, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:5", - "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": 6046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6049, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6038, - "src": "20485:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 6050, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 6048, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6052, - "nodeType": "ExpressionStatement", - "src": "20477:52:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6056, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6053, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6040, - "src": "20544:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 6054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6055, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6068, - "nodeType": "IfStatement", - "src": "20540:221:5", - "trueBody": { - "id": 6067, - "nodeType": "Block", - "src": "20567:194:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6060, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6040, - "src": "20684:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 6061, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 6062, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 6058, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 6059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 6063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 6064, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 6057, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6066, - "nodeType": "ExpressionStatement", - "src": "20665:85:5" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 6070, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6023, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 6070, - "src": "19700:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6022, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "19700:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6025, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 6070, - "src": "19714:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6024, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:5" - }, - "returnParameters": { - "id": 6027, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:5" - }, - "scope": 6071, - "src": "19672:1095:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 6642, - "src": "17580:3189:5" - }, - { - "id": 6072, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:5" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6073, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5713, - "src": "20892:7:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$5713", - "typeString": "contract Ownable" - } - }, - "id": 6074, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:5" - } - ], - "contractDependencies": [ - 5601, - 5713 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 6106, - "linearizedBaseContracts": [ - 6106, - 5713, - 5601 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6076, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6106, - "src": "20906:33:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6075, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 6081, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6079, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6078, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6081, - "src": "20974:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6077, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:5" - }, - "returnParameters": { - "id": 6080, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:5" - }, - "scope": 6106, - "src": "20946:53:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6092, - "nodeType": "Block", - "src": "21039:108:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6084, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5589, - "src": "21057:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6086, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6076, - "src": "21073:18:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 6088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 6083, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6090, - "nodeType": "ExpressionStatement", - "src": "21049:80:5" - }, - { - "id": 6091, - "nodeType": "PlaceholderStatement", - "src": "21139:1:5" - } - ] - }, - "documentation": null, - "id": 6093, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6082, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:5" - }, - "src": "21005:142:5", - "visibility": "internal" - }, - { - "body": { - "id": 6104, - "nodeType": "Block", - "src": "21252:57:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6100, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6076, - "src": "21262:18:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6101, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6095, - "src": "21283:19:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6103, - "nodeType": "ExpressionStatement", - "src": "21262:40:5" - } - ] - }, - "documentation": null, - "id": 6105, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6098, - "modifierName": { - "argumentTypes": null, - "id": 6097, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5646, - "src": "21238:9:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:5" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6096, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6095, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 6105, - "src": "21184:27:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:5" - }, - "returnParameters": { - "id": 6099, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:5" - }, - "scope": 6106, - "src": "21153:156:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6642, - "src": "20851:460:5" - }, - { - "id": 6107, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 6113, - "linearizedBaseContracts": [ - 6113 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 6112, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6108, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:5" - }, - "returnParameters": { - "id": 6111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6110, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6112, - "src": "21443:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6109, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:5" - }, - "scope": 6113, - "src": "21396:56:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 6642, - "src": "21376:78:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6222, - "linearizedBaseContracts": [ - 6222 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 6116, - "libraryName": { - "contractScope": null, - "id": 6114, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5575, - "src": "21494:8:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$5575", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:5", - "typeName": { - "id": 6115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 6119, - "libraryName": { - "contractScope": null, - "id": 6117, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6071, - "src": "21526:9:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$6071", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:5", - "typeName": { - "contractScope": null, - "id": 6118, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "21540:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 6124, - "name": "link", - "nodeType": "VariableDeclaration", - "scope": 6222, - "src": "21553:71:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6120, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "21553:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307835313439313037373141463943613635366166383430646666383345383236344563463938364341", - "id": 6122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21581:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x514910771AF9Ca656af840dff83E8264EcF986CA" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6121, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5781, - "src": "21574:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$5781_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21574:50:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6126, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 6222, - "src": "21631:28:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6125, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21631:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 6130, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 6222, - "src": "21665:45:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6129, - "keyType": { - "id": 6127, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21673:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21665:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21684:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 6137, - "nodeType": "Block", - "src": "21770:36:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6135, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "21787:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6134, - "id": 6136, - "nodeType": "Return", - "src": "21780:19:5" - } - ] - }, - "documentation": null, - "id": 6138, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6131, - "nodeType": "ParameterList", - "parameters": [], - "src": "21737:2:5" - }, - "returnParameters": { - "id": 6134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6133, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6138, - "src": "21761:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6132, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21761:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21760:9:5" - }, - "scope": 6222, - "src": "21717:89:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6149, - "nodeType": "Block", - "src": "21878:42:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6145, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "21895:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6147, - "indexExpression": { - "argumentTypes": null, - "id": 6146, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6140, - "src": "21905:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21895:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6144, - "id": 6148, - "nodeType": "Return", - "src": "21888:25:5" - } - ] - }, - "documentation": null, - "id": 6150, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6141, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6140, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6150, - "src": "21831:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6139, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21831:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21830:17:5" - }, - "returnParameters": { - "id": 6144, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6143, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6150, - "src": "21869:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6142, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21869:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21868:9:5" - }, - "scope": 6222, - "src": "21812:108:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6186, - "nodeType": "Block", - "src": "21964:189:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6155, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "21974:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6158, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6152, - "src": "22006:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6156, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "21989:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "21989:16:5", - "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": 6159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21989:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21974:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6161, - "nodeType": "ExpressionStatement", - "src": "21974:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6162, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22023:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6165, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6163, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22033:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22033:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22023:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6152, - "src": "22073:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6166, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22047:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6169, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6167, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22057:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22057:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22047:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "22047:25:5", - "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": 6172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22047:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22023:57:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6174, - "nodeType": "ExpressionStatement", - "src": "22023:57:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6178, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22112:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22112:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6181, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19365, - "src": "22132:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6222", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6222", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 6180, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22124:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22124:13:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6183, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6152, - "src": "22139:6:5", - "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, - "id": 6175, - "name": "link", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6124, - "src": "22090:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 5909, - "src": "22090:21:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5781_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 6184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22090:56:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6185, - "nodeType": "ExpressionStatement", - "src": "22090:56:5" - } - ] - }, - "documentation": null, - "id": 6187, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6152, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6187, - "src": "21941:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6151, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21941:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21940:16:5" - }, - "returnParameters": { - "id": 6154, - "nodeType": "ParameterList", - "parameters": [], - "src": "21964:0:5" - }, - "scope": 6222, - "src": "21926:227:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6220, - "nodeType": "Block", - "src": "22200:170:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6192, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "22210:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6195, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6189, - "src": "22242:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6193, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6126, - "src": "22225:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "22225:16:5", - "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": 6196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22225:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22210:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6198, - "nodeType": "ExpressionStatement", - "src": "22210:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6199, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22259:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6202, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6200, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22269:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22269:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22259:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6208, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6189, - "src": "22309:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6203, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6130, - "src": "22283:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6206, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6204, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22293:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22293:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22283:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "22283:25:5", - "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": 6209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22283:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22259:57:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6211, - "nodeType": "ExpressionStatement", - "src": "22259:57:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6215, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22344:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22344:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6217, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6189, - "src": "22356:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6212, - "name": "link", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6124, - "src": "22326:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 5884, - "src": "22326:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5781_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22326:37:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6219, - "nodeType": "ExpressionStatement", - "src": "22326:37:5" - } - ] - }, - "documentation": null, - "id": 6221, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6189, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6221, - "src": "22177:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22177:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22176:16:5" - }, - "returnParameters": { - "id": 6191, - "nodeType": "ParameterList", - "parameters": [], - "src": "22200:0:5" - }, - "scope": 6222, - "src": "22159:211:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 6642, - "src": "21458:914:5" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6223, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6222, - "src": "22398:14:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$6222", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 6224, - "nodeType": "InheritanceSpecifier", - "src": "22398:14:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6225, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6106, - "src": "22414:28:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$6106", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 6226, - "nodeType": "InheritanceSpecifier", - "src": "22414:28:5" - } - ], - "contractDependencies": [ - 5601, - 5713, - 6106, - 6222 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6641, - "linearizedBaseContracts": [ - 6641, - 6106, - 5713, - 5601, - 6222 - ], - "name": "YAMLINKPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6231, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22449:70:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 6227, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5781, - "src": "22449:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 6229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22476:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6228, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5781, - "src": "22469:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$5781_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 6230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22469:50:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 6234, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22525:41:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22525:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 6233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22560:6:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6237, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22588:37:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22588:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 6236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22615:10:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6240, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22669:31:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6238, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22669:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6239, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22699:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6243, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22706:29:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6241, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22706:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 6242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22734:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 6245, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22741:29:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6244, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22741:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6247, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22776:35:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6246, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22776:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6251, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22817:57:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6250, - "keyType": { - "id": 6248, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22825:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22817:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22836:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 6255, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 6641, - "src": "22880:42:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 6254, - "keyType": { - "id": 6252, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22888:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22880:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22899:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6259, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 6258, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6257, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6259, - "src": "22947:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6256, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22947:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22946:16:5" - }, - "src": "22929:34:5" - }, - { - "anonymous": false, - "documentation": null, - "id": 6265, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 6264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6261, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6265, - "src": "22981:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6260, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22981:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6263, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6265, - "src": "23003:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23003:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22980:38:5" - }, - "src": "22968:51:5" - }, - { - "anonymous": false, - "documentation": null, - "id": 6271, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 6270, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6267, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "23040:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6266, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23040:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6269, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "23062:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6268, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23062:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23039:38:5" - }, - "src": "23024:54:5" - }, - { - "anonymous": false, - "documentation": null, - "id": 6277, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 6276, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6273, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 6277, - "src": "23100:20:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23100:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6275, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6277, - "src": "23122:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6274, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23122:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23099:38:5" - }, - "src": "23083:55:5" - }, - { - "body": { - "id": 6288, - "nodeType": "Block", - "src": "23166:77:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6280, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23184:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23184:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6282, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "23203:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23184:28:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 6284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23213:11:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 6279, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23176:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23176:49:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6286, - "nodeType": "ExpressionStatement", - "src": "23176:49:5" - }, - { - "id": 6287, - "nodeType": "PlaceholderStatement", - "src": "23235:1:5" - } - ] - }, - "documentation": null, - "id": 6289, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6278, - "nodeType": "ParameterList", - "parameters": [], - "src": "23163:2:5" - }, - "src": "23144:99:5", - "visibility": "internal" - }, - { - "body": { - "id": 6325, - "nodeType": "Block", - "src": "23288:283:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6293, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23298:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6294, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6372, - "src": "23321:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23321:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23298:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6297, - "nodeType": "ExpressionStatement", - "src": "23298:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6298, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "23347:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6299, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6339, - "src": "23364:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23364:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23347:43:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6302, - "nodeType": "ExpressionStatement", - "src": "23347:43:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6303, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23404:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23423:1:5", - "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": 6304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23415:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23415:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23404:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6323, - "nodeType": "IfStatement", - "src": "23400:154:5", - "trueBody": { - "id": 6322, - "nodeType": "Block", - "src": "23427:127:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6308, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6255, - "src": "23441:7:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6310, - "indexExpression": { - "argumentTypes": null, - "id": 6309, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23449:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23441:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6312, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23467:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6311, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6401, - "src": "23460:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23460:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23441:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6315, - "nodeType": "ExpressionStatement", - "src": "23441:34:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6316, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6251, - "src": "23489:22:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6318, - "indexExpression": { - "argumentTypes": null, - "id": 6317, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "23512:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23489:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6319, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23523:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23489:54:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6321, - "nodeType": "ExpressionStatement", - "src": "23489:54:5" - } - ] - } - }, - { - "id": 6324, - "nodeType": "PlaceholderStatement", - "src": "23563:1:5" - } - ] - }, - "documentation": null, - "id": 6326, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6291, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6326, - "src": "23271:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6290, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23271:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23270:17:5" - }, - "src": "23249:322:5", - "visibility": "internal" - }, - { - "body": { - "id": 6338, - "nodeType": "Block", - "src": "23643:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6333, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23669:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23669:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6335, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "23686:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6331, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5389, - "src": "23660:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$5389_$", - "typeString": "type(library Math)" - } - }, - "id": 6332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 5356, - "src": "23660:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 6336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23660:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6330, - "id": 6337, - "nodeType": "Return", - "src": "23653:46:5" - } - ] - }, - "documentation": null, - "id": 6339, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6327, - "nodeType": "ParameterList", - "parameters": [], - "src": "23610:2:5" - }, - "returnParameters": { - "id": 6330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6339, - "src": "23634:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6328, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23634:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23633:9:5" - }, - "scope": 6641, - "src": "23577:129:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6371, - "nodeType": "Block", - "src": "23768:352:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6344, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6138, - "src": "23782:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23782:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23799:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23782:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6351, - "nodeType": "IfStatement", - "src": "23778:76:5", - "trueBody": { - "id": 6350, - "nodeType": "Block", - "src": "23802:52:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6348, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23823:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6343, - "id": 6349, - "nodeType": "Return", - "src": "23816:27:5" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6366, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6138, - "src": "24085:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24085:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6363, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24054:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6360, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "24017:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6357, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "23976:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6354, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6339, - "src": "23924:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "23924:51:5", - "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": 6358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:67:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "23924:92:5", - "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": 6361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:104:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "23924:129:5", - "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": 6364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:135:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "23924:160:5", - "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": 6368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23924:175:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6352, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "23882:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "23882:24:5", - "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": 6369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23882:231:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6343, - "id": 6370, - "nodeType": "Return", - "src": "23863:250:5" - } - ] - }, - "documentation": null, - "id": 6372, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6340, - "nodeType": "ParameterList", - "parameters": [], - "src": "23735:2:5" - }, - "returnParameters": { - "id": 6343, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6342, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6372, - "src": "23759:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6341, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23759:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23758:9:5" - }, - "scope": 6641, - "src": "23712:408:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6400, - "nodeType": "Block", - "src": "24189:196:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6395, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6255, - "src": "24361:7:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6397, - "indexExpression": { - "argumentTypes": null, - "id": 6396, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6374, - "src": "24369:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24361:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 6392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24334:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6386, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6251, - "src": "24279:22:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6388, - "indexExpression": { - "argumentTypes": null, - "id": 6387, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6374, - "src": "24302:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24279:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6383, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6372, - "src": "24258:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 6384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "24258:20:5", - "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": 6389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24258:53:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6380, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6374, - "src": "24228:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6379, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6150, - "src": "24218:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "24218:39:5", - "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": 6390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:94:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "24218:115:5", - "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": 6393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:121:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "24218:142:5", - "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": 6398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24218:160:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6378, - "id": 6399, - "nodeType": "Return", - "src": "24199:179:5" - } - ] - }, - "documentation": null, - "id": 6401, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6375, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6374, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 6401, - "src": "24142:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6373, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24142:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24141:17:5" - }, - "returnParameters": { - "id": 6378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6377, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6401, - "src": "24180:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6376, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24180:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24179:9:5" - }, - "scope": 6641, - "src": "24126:259:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6431, - "nodeType": "Block", - "src": "24547:124:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6413, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6403, - "src": "24565:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6414, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24574:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24565:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 6416, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24577:16:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 6412, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24557:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24557:37:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6418, - "nodeType": "ExpressionStatement", - "src": "24557:37:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6422, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6403, - "src": "24616:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6419, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19368, - "src": "24604:5:5", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLINKPool_$6641", - "typeString": "contract super YAMLINKPool" - } - }, - "id": 6421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 6187, - "src": "24604:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24604:19:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6424, - "nodeType": "ExpressionStatement", - "src": "24604:19:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6426, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24645:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24645:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6428, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6403, - "src": "24657:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6425, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6265, - "src": "24638:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24638:26:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6430, - "nodeType": "EmitStatement", - "src": "24633:31:5" - } - ] - }, - "documentation": null, - "id": 6432, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6406, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24524:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24524:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6408, - "modifierName": { - "argumentTypes": null, - "id": 6405, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "24511:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24511:24:5" - }, - { - "arguments": null, - "id": 6410, - "modifierName": { - "argumentTypes": null, - "id": 6409, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "24536:10:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24536:10:5" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6403, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6432, - "src": "24488:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6402, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24488:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24487:16:5" - }, - "returnParameters": { - "id": 6411, - "nodeType": "ParameterList", - "parameters": [], - "src": "24547:0:5" - }, - "scope": 6641, - "src": "24473:198:5", - "stateMutability": "nonpayable", - "superFunction": 6187, - "visibility": "public" - }, - { - "body": { - "id": 6462, - "nodeType": "Block", - "src": "24754:133:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6444, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6434, - "src": "24772:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6445, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24781:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24772:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 6447, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24784:19:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 6443, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24764:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24764:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6449, - "nodeType": "ExpressionStatement", - "src": "24764:40:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6453, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6434, - "src": "24829:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6450, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19368, - "src": "24814:5:5", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMLINKPool_$6641", - "typeString": "contract super YAMLINKPool" - } - }, - "id": 6452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 6221, - "src": "24814:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24814:22:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6455, - "nodeType": "ExpressionStatement", - "src": "24814:22:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6457, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24861:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24861:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6459, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6434, - "src": "24873:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6456, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6271, - "src": "24851:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24851:29:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6461, - "nodeType": "EmitStatement", - "src": "24846:34:5" - } - ] - }, - "documentation": null, - "id": 6463, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6437, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24731:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24731:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6439, - "modifierName": { - "argumentTypes": null, - "id": 6436, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "24718:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24718:24:5" - }, - { - "arguments": null, - "id": 6441, - "modifierName": { - "argumentTypes": null, - "id": 6440, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "24743:10:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24743:10:5" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6434, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 6463, - "src": "24695:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24695:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24694:16:5" - }, - "returnParameters": { - "id": 6442, - "nodeType": "ParameterList", - "parameters": [], - "src": "24754:0:5" - }, - "scope": 6641, - "src": "24677:210:5", - "stateMutability": "nonpayable", - "superFunction": 6221, - "visibility": "public" - }, - { - "body": { - "id": 6476, - "nodeType": "Block", - "src": "24918:69:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6468, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24947:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24947:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6467, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6150, - "src": "24937:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24937:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6466, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6463 - ], - "referencedDeclaration": 6463, - "src": "24928:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24928:31:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6472, - "nodeType": "ExpressionStatement", - "src": "24928:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6473, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6542, - "src": "24969:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 6474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24969:11:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6475, - "nodeType": "ExpressionStatement", - "src": "24969:11:5" - } - ] - }, - "documentation": null, - "id": 6477, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6464, - "nodeType": "ParameterList", - "parameters": [], - "src": "24906:2:5" - }, - "returnParameters": { - "id": 6465, - "nodeType": "ParameterList", - "parameters": [], - "src": "24918:0:5" - }, - "scope": 6641, - "src": "24893:94:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 6541, - "nodeType": "Block", - "src": "25057:379:5", - "statements": [ - { - "assignments": [ - 6487 - ], - "declarations": [ - { - "constant": false, - "id": 6487, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6541, - "src": "25067:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6486, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25067:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6492, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6489, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25091:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25091:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6488, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6401, - "src": "25084:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 6491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25084:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25067:35:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6493, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6487, - "src": "25116:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25125:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25116:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6540, - "nodeType": "IfStatement", - "src": "25112:318:5", - "trueBody": { - "id": 6539, - "nodeType": "Block", - "src": "25128:302:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 6496, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6255, - "src": "25142:7:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 6499, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25150:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25150:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25142:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 6500, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25164:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25142:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6502, - "nodeType": "ExpressionStatement", - "src": "25142:23:5" - }, - { - "assignments": [ - 6504 - ], - "declarations": [ - { - "constant": false, - "id": 6504, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 6539, - "src": "25179:21:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6503, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25179:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6512, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6507, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6231, - "src": "25215:3:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - ], - "id": 6506, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25207:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25207:12:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6505, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6113, - "src": "25203:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$6113_$", - "typeString": "type(contract YAM)" - } - }, - "id": 6509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:17:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$6113", - "typeString": "contract YAM" - } - }, - "id": 6510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 6112, - "src": "25203:35:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 6511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25179:61:5" - }, - { - "assignments": [ - 6514 - ], - "declarations": [ - { - "constant": false, - "id": 6514, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 6539, - "src": "25254:18:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6513, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25254:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6524, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 6522, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6520, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 6521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25309:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25305:6:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6517, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6504, - "src": "25286:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6515, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6487, - "src": "25275:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "25275:10:5", - "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": 6518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "25275:29:5", - "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": 6523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25275:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25254:58:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6528, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25343:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25343:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6530, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6514, - "src": "25355:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6525, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6231, - "src": "25326:3:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5781", - "typeString": "contract IERC20" - } - }, - "id": 6527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 5884, - "src": "25326:16:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5781_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5781_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 6531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25326:40:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6532, - "nodeType": "ExpressionStatement", - "src": "25326:40:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6534, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25396:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25396:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6536, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6514, - "src": "25408:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6533, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6277, - "src": "25385:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25385:34:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6538, - "nodeType": "EmitStatement", - "src": "25380:39:5" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6542, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6480, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25034:3:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25034:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6482, - "modifierName": { - "argumentTypes": null, - "id": 6479, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "25021:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25021:24:5" - }, - { - "arguments": null, - "id": 6484, - "modifierName": { - "argumentTypes": null, - "id": 6483, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "25046:10:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25046:10:5" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6478, - "nodeType": "ParameterList", - "parameters": [], - "src": "25011:2:5" - }, - "returnParameters": { - "id": 6485, - "nodeType": "ParameterList", - "parameters": [], - "src": "25057:0:5" - }, - "scope": 6641, - "src": "24993:443:5", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6639, - "nodeType": "Block", - "src": "25571:703:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6554, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25585:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25585:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 6556, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "25603:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25585:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 6637, - "nodeType": "Block", - "src": "26088:180:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6615, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "26100:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6618, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "26124:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6616, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "26113:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "26113:10:5", - "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": 6619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26113:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26100:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6621, - "nodeType": "ExpressionStatement", - "src": "26100:33:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6622, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "26145:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6623, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "26162:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26145:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6625, - "nodeType": "ExpressionStatement", - "src": "26145:26:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6626, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "26183:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6629, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "26212:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6627, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6237, - "src": "26198:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "26198:13:5", - "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": 6630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26198:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26183:38:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6632, - "nodeType": "ExpressionStatement", - "src": "26183:38:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6634, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "26250:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6633, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "26238:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26238:19:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6636, - "nodeType": "EmitStatement", - "src": "26233:24:5" - } - ] - }, - "id": 6638, - "nodeType": "IfStatement", - "src": "25581:687:5", - "trueBody": { - "id": 6614, - "nodeType": "Block", - "src": "25614:468:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6558, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25630:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25630:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6560, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "25649:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25630:31:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 6595, - "nodeType": "Block", - "src": "25731:205:5", - "statements": [ - { - "assignments": [ - 6571 - ], - "declarations": [ - { - "constant": false, - "id": 6571, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 6595, - "src": "25747:17:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6570, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25747:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6577, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6574, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25784:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25784:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6572, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "25767:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 5431, - "src": "25767:16:5", - "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": 6576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25767:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25747:53:5" - }, - { - "assignments": [ - 6579 - ], - "declarations": [ - { - "constant": false, - "id": 6579, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 6595, - "src": "25816:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25816:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6584, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6582, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "25849:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6580, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6571, - "src": "25835:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 5492, - "src": "25835:13:5", - "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": 6583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25835:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25816:44:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6585, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "25876:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6591, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "25914:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6588, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6579, - "src": "25900:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6586, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "25889:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "25889:10:5", - "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": 6589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "25889:24:5", - "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": 6592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25889:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25876:47:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6594, - "nodeType": "ExpressionStatement", - "src": "25876:47:5" - } - ] - }, - "id": 6596, - "nodeType": "IfStatement", - "src": "25626:310:5", - "trueBody": { - "id": 6569, - "nodeType": "Block", - "src": "25663:62:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6562, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6243, - "src": "25679:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6565, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "25703:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6563, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "25692:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 5508, - "src": "25692:10:5", - "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": 6566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25692:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25679:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6568, - "nodeType": "ExpressionStatement", - "src": "25679:33:5" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 6600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6597, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6245, - "src": "25947:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6598, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25964:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25964:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25947:32:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6601, - "nodeType": "ExpressionStatement", - "src": "25947:32:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 6608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6602, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6240, - "src": "25991:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6606, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "26026:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6603, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26006:5:5", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 6604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26006:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 5415, - "src": "26006:19:5", - "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": 6607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26006:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25991:44:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6609, - "nodeType": "ExpressionStatement", - "src": "25991:44:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6611, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6544, - "src": "26064:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6610, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "26052:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 6612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26052:19:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6613, - "nodeType": "EmitStatement", - "src": "26047:24:5" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6640, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6547, - "modifierName": { - "argumentTypes": null, - "id": 6546, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6093, - "src": "25511:22:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25511:22:5" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25563:1:5", - "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": 6549, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25555:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25555:10:5", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 6552, - "modifierName": { - "argumentTypes": null, - "id": 6548, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6326, - "src": "25542:12:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25542:24:5" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6544, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 6640, - "src": "25470:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25470:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25469:16:5" - }, - "returnParameters": { - "id": 6553, - "nodeType": "ParameterList", - "parameters": [], - "src": "25571:0:5" - }, - "scope": 6641, - "src": "25442:832:5", - "stateMutability": "nonpayable", - "superFunction": 6081, - "visibility": "external" - } - ], - "scope": 6642, - "src": "22374:3902:5" - } - ], - "src": "1490:24787:5" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0xA7FEEe9E857e8A268f1fEDa32b0bfDe48c2562D5", - "transactionHash": "0x28abbdf0eae586927db8216b0f82ec09a2b3581c33bfaae04495c5d0fc8385db" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.618Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMMKRPool.json b/build/contracts/YAMMKRPool.json deleted file mode 100644 index bff18e5..0000000 --- a/build/contracts/YAMMKRPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMMKRPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mkr", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"mkr\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMMKRPool.sol\":\"YAMMKRPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMMKRPool.sol\":{\"keccak256\":\"0x97110af66e47a9f08f180269383515c0393a51bc7bf11f85b6419270afca3c51\",\"urls\":[\"bzz-raw://4044f477865460f25acd37a14abcda6a58e007bb3997749c05de1f06dbb698da\",\"dweb:/ipfs/QmYwccK3uJ5hnzxfLfbxCACYmcMrYj3n5qZbpFKKM3QDoh\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b0319908116739f8f72aa9304c8b593d555f12ef6589cc3a579a217825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637e992cb8116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637e992cb81461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b610232610cc8565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d2b565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158200e23624e7551638401431618274b07a12be7c922c4c442e061bf06ba398496e464736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c80637e992cb8116100ee578063a694fc3a11610097578063df136d6511610071578063df136d65146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063a694fc3a1461039c578063c8f33c91146103b9578063cd3daf9d146103c1576101ad565b80638da58897116100c85780638da58897146103705780638da5cb5b146103785780638f32d59b14610380576101ad565b80637e992cb81461032d57806380faa57d146103355780638b8763471461033d576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b610232610cc8565b6101e5610ce4565b6101e56004803603602081101561035357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cf7565b6101e5610d09565b610232610d0f565b610388610d2b565b604080519115158252519081900360200190f35b61028e600480360360208110156103b257600080fd5b5035610d6b565b6101e5610f03565b6101e5610f09565b6101e5610f5d565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610f09565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d2b565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610f09565b600a556105cd610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610f09565b600a556107f3610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610f09565b600a556109a4610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d2b565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000610cf242600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d4f6111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d74610f09565b600a55610d7f610ce4565b60095573ffffffffffffffffffffffffffffffffffffffff811615610de057610da781610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ec057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ec98261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610f136105ab565b610f205750600a546105af565b610cf2610f4e610f2e6105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610ce4565b600a549063ffffffff61110116565b600a5481565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d2b565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158200e23624e7551638401431618274b07a12be7c922c4c442e061bf06ba398496e464736f6c63430005110032", - "sourceMap": "22371:3901:6:-;;;21553:70;;;-1:-1:-1;;;;;;21553:70:6;;;21580:42;21553:70;;;22445;;;;;;22472:42;22445:70;;;22611:10;22584:37;;22665:31;;;;22702:29;;9510:12;-1:-1:-1;;;;;9510:10:6;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:6;-1:-1:-1;;;;;9501:21:6;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:6;;-1:-1:-1;;9537:40:6;22371:3901;;8448:96;8527:10;8448:96;:::o;22371:3901::-;;;;;;;", - "deployedSourceMap": "22371:3901:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22371:3901:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24122:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24122:259:6;;;;:::i;:::-;;;;;;;;;;;;;;;;22876:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22876:42:6;;;;:::i;22445:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:6;;;;:::i;:::-;;20906:33;;;:::i;21716:89::-;;;:::i;22521:41::-;;;:::i;24673:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24673:210:6;;:::i;25438:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25438:832:6;;:::i;24989:443::-;;;:::i;21811:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21811:108:6;;;;:::i;10445:137::-;;;:::i;22702:29::-;;;:::i;21553:70::-;;;:::i;23573:129::-;;;:::i;22813:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22813:57:6;;;;:::i;22584:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;24469:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24469:198:6;;:::i;22737:29::-;;;:::i;23708:408::-;;;:::i;22772:35::-;;;:::i;24889:94::-;;;:::i;22665:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:6;;;;:::i;24122:259::-;24357:16;;;24176:7;24357:16;;;:7;:16;;;;;;;;;24275:22;:31;;;;;;24214:160;;24357:16;24214:121;;24330:4;;24214:94;;24254:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24214:18;24224:7;24214:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24195:179;24122:259;-1:-1:-1;;24122:259:6:o;22876:42::-;;;;;;;;;;;;;:::o;22445:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21716:89::-;21786:12;;21716:89;;:::o;22521:41::-;22556:6;22521:41;:::o;24673:210::-;24727:10;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;23199:9;;23180:15;:28;;23172:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24777:1;24768:6;:10;24760:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24810:22;24825:6;24810:14;:22::i;:::-;24847:29;;;;;;;;24857:10;;24847:29;;;;;;;;;;24673:210;;:::o;25438:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25559:1;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;25599:9;;25581:15;:27;25577:687;;;25645:12;;25626:15;:31;25622:310;;25688:20;:6;22556;25688:20;:10;:20;:::i;:::-;25675:10;:33;25622:310;;;25763:12;;25743:17;;25763:33;;25780:15;25763:33;:16;:33;:::i;:::-;25743:53;;25812:16;25831:25;25845:10;;25831:9;:13;;:25;;;;:::i;:::-;25812:44;-1:-1:-1;25885:34:6;22556:6;25885:20;:6;25812:44;25885:20;:10;:20;:::i;:34::-;25872:10;:47;-1:-1:-1;;25622:310:6;25960:15;25943:14;:32;;;26002:29;;22556:6;26002:29;:19;:29;:::i;:::-;25987:12;:44;26048:19;;;;;;;;;;;;;;;;;25577:687;;;26109:20;:6;22556;26109:20;:10;:20;:::i;:::-;26096:10;:33;26158:9;;26141:14;:26;;;26194:23;;22556:6;26194:23;:13;:23;:::i;:::-;26179:12;:38;26234:19;;;;;;;;;;;;;;;;;25577:687;21139:1;25438:832;:::o;24989:443::-;25030:10;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;23199:9;;23180:15;:28;;23172:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25063:14;25080:18;25087:10;25080:6;:18::i;:::-;25063:35;-1:-1:-1;25112:10:6;;25108:318;;25146:10;25160:1;25138:19;;;:7;:19;;;;;;;;:23;;;25211:3;;25199:37;;;;;;;25138:19;25211:3;;;;25199:35;;:37;;;;;;;;;;;25160:1;25211:3;25199:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25199:37:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25199:37:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25199:37:6;;-1:-1:-1;25250:18:6;25271:37;25301:6;25271:25;:6;25199:37;25271:25;:10;:25;:::i;:37::-;25322:3;;25250:58;;-1:-1:-1;25322:40:6;;:3;;25339:10;25250:58;25322:40;:16;:40;:::i;:::-;25381:34;;;;;;;;25392:10;;25381:34;;;;;;;;;;25108:318;;23231:1;24989:443;:::o;21811:108::-;21894:18;;21868:7;21894:18;;;:9;:18;;;;;;;21811:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22702:29::-;;;;:::o;21553:70::-;;;;;;:::o;23573:129::-;23630:7;23656:39;23665:15;23682:12;;23656:8;:39::i;:::-;23649:46;;23573:129;:::o;22813:57::-;;;;;;;;;;;;;:::o;22584:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;24469:198::-;24520:10;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;23199:9;;23180:15;:28;;23172:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24570:1;24561:6;:10;24553:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24600:19;24612:6;24600:11;:19::i;:::-;24634:26;;;;;;;;24641:10;;24634:26;;;;;;;;;;24469:198;;:::o;22737:29::-;;;;:::o;23708:408::-;23755:7;23778:13;:11;:13::i;:::-;23774:76;;-1:-1:-1;23819:20:6;;23812:27;;23774:76;23878:231;23920:175;24081:13;:11;:13::i;:::-;23920:135;24050:4;23920:104;24013:10;;23920:67;23972:14;;23920:26;:24;:26::i;:175::-;23878:20;;;:231;:24;:231;:::i;22772:35::-;;;;:::o;24889:94::-;24924:31;24933:21;24943:10;24933:9;:21::i;:::-;24924:8;:31::i;:::-;24965:11;:9;:11::i;:::-;24889:94::o;22665:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:6:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:6;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22157:210;22223:12;;:24;;22240:6;22223:24;:16;:24;:::i;:::-;22208:12;:39;22291:10;22281:21;;;;:9;:21;;;;;;:33;;22307:6;22281:33;:25;:33;:::i;:::-;22267:10;22257:21;;;;:9;:21;;;;;:57;;;;22324:3;;:36;;22257:21;22324:3;;;;22353:6;22324:16;:36::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:6;;;;;;;;25:18:-1;;61:17;;17776:58:6;182:15:-1;17799:23:6;179:29:-1;160:49;;17750:85:6;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:6;;1848:104;-1:-1:-1;1848:104:6:o;21925:226::-;21988:12;;:24;;22005:6;21988:24;:16;:24;:::i;:::-;21973:12;:39;22056:10;22046:21;;;;:9;:21;;;;;;:33;;22072:6;22046:33;:25;:33;:::i;:::-;22032:10;22022:21;;;;:9;:21;;;;;:57;;;;22089:3;;:55;;22022:21;22089:3;;;;22130:4;22137:6;22089:20;:55::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:6;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:6;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:6:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:6;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:6;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:6;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:6;;;;;;;;25:18:-1;;61:17;;17974:68:6;182:15:-1;17997:27:6;179:29:-1;160:49;;17948:95:6;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:6:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public mkr = IERC20(0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n mkr.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n mkr.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMMKRPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart() {\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMMKRPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMMKRPool.sol", - "exportedSymbols": { - "Address": [ - 7176 - ], - "Context": [ - 6922 - ], - "IERC20": [ - 7102 - ], - "IRewardDistributionRecipient": [ - 7427 - ], - "LPTokenWrapper": [ - 7543 - ], - "Math": [ - 6710 - ], - "Ownable": [ - 7034 - ], - "SafeERC20": [ - 7392 - ], - "SafeMath": [ - 6896 - ], - "YAM": [ - 7434 - ], - "YAMMKRPool": [ - 7962 - ] - }, - "id": 7963, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6643, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 6710, - "linearizedBaseContracts": [ - 6710 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6659, - "nodeType": "Block", - "src": "1739:38:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6652, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6645, - "src": "1756:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6653, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6647, - "src": "1761:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 6656, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6647, - "src": "1769:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:6", - "trueExpression": { - "argumentTypes": null, - "id": 6655, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6645, - "src": "1765:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6651, - "id": 6658, - "nodeType": "Return", - "src": "1749:21:6" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 6660, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6648, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6645, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6660, - "src": "1685:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6644, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6647, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6660, - "src": "1696:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6646, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:6" - }, - "returnParameters": { - "id": 6651, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6650, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6660, - "src": "1730:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6649, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:6" - }, - "scope": 6710, - "src": "1672:105:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6676, - "nodeType": "Block", - "src": "1915:37:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6669, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6662, - "src": "1932:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 6670, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6664, - "src": "1936:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 6673, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6664, - "src": "1944:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:6", - "trueExpression": { - "argumentTypes": null, - "id": 6672, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6662, - "src": "1940:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6668, - "id": 6675, - "nodeType": "Return", - "src": "1925:20:6" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 6677, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6665, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6662, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6677, - "src": "1861:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6661, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6664, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6677, - "src": "1872:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6663, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:6" - }, - "returnParameters": { - "id": 6668, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6667, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6677, - "src": "1906:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6666, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:6" - }, - "scope": 6710, - "src": "1848:104:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6708, - "nodeType": "Block", - "src": "2136:119:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6686, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6679, - "src": "2208:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6687, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6689, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6690, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6681, - "src": "2218:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6691, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6693, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6695, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6679, - "src": "2229:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6698, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6681, - "src": "2237:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6702, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6705, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6685, - "id": 6707, - "nodeType": "Return", - "src": "2200:48:6" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 6709, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6682, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6679, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6709, - "src": "2082:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6681, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6709, - "src": "2093:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6680, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:6" - }, - "returnParameters": { - "id": 6685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6684, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6709, - "src": "2127:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:6" - }, - "scope": 6710, - "src": "2065:190:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "1589:668:6" - }, - { - "id": 6711, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 6896, - "linearizedBaseContracts": [ - 6896 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6735, - "nodeType": "Block", - "src": "3212:109:6", - "statements": [ - { - "assignments": [ - 6721 - ], - "declarations": [ - { - "constant": false, - "id": 6721, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6735, - "src": "3222:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6720, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6725, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6722, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6713, - "src": "3234:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 6723, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6715, - "src": "3238:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6727, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6721, - "src": "3257:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6728, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6713, - "src": "3262:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 6730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 6726, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6732, - "nodeType": "ExpressionStatement", - "src": "3249:46:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6733, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6721, - "src": "3313:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6719, - "id": 6734, - "nodeType": "Return", - "src": "3306:8:6" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 6736, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6716, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6713, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6736, - "src": "3158:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6712, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6715, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6736, - "src": "3169:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:6" - }, - "returnParameters": { - "id": 6719, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6718, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6736, - "src": "3203:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6717, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:6" - }, - "scope": 6896, - "src": "3145:176:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6751, - "nodeType": "Block", - "src": "3652:67:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6746, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6738, - "src": "3673:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6747, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6740, - "src": "3676:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 6748, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 6745, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6752, - 6779 - ], - "referencedDeclaration": 6779, - "src": "3669:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6744, - "id": 6750, - "nodeType": "Return", - "src": "3662:50:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 6752, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6738, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6752, - "src": "3598:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6737, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6740, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6752, - "src": "3609:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6739, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:6" - }, - "returnParameters": { - "id": 6744, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6743, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6752, - "src": "3643:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6742, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:6" - }, - "scope": 6896, - "src": "3585:134:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6778, - "nodeType": "Block", - "src": "4138:92:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6764, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6756, - "src": "4156:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 6765, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6754, - "src": "4161:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 6767, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6758, - "src": "4164:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 6763, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6769, - "nodeType": "ExpressionStatement", - "src": "4148:29:6" - }, - { - "assignments": [ - 6771 - ], - "declarations": [ - { - "constant": false, - "id": 6771, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6778, - "src": "4187:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6770, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6775, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6772, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6754, - "src": "4199:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 6773, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6756, - "src": "4203:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6776, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6771, - "src": "4222:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6762, - "id": 6777, - "nodeType": "Return", - "src": "4215:8:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 6779, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6754, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4056:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6753, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6756, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4067:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6755, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6758, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4078:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:6" - }, - "returnParameters": { - "id": 6762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4129:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:6" - }, - "scope": 6896, - "src": "4043:187:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6812, - "nodeType": "Block", - "src": "4537:392:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6788, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6781, - "src": "4769:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6794, - "nodeType": "IfStatement", - "src": "4765:45:6", - "trueBody": { - "id": 6793, - "nodeType": "Block", - "src": "4777:33:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6791, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 6787, - "id": 6792, - "nodeType": "Return", - "src": "4791:8:6" - } - ] - } - }, - { - "assignments": [ - 6796 - ], - "declarations": [ - { - "constant": false, - "id": 6796, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6812, - "src": "4820:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6795, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6800, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6797, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6781, - "src": "4832:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 6798, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6783, - "src": "4836:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6802, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6796, - "src": "4855:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 6803, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6781, - "src": "4859:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6805, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6783, - "src": "4864:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 6807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 6801, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6809, - "nodeType": "ExpressionStatement", - "src": "4847:56:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6810, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6796, - "src": "4921:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6787, - "id": 6811, - "nodeType": "Return", - "src": "4914:8:6" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 6813, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6784, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6781, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6813, - "src": "4483:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6780, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6783, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6813, - "src": "4494:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:6" - }, - "returnParameters": { - "id": 6787, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6786, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6813, - "src": "4528:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6785, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:6" - }, - "scope": 6896, - "src": "4470:459:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6828, - "nodeType": "Block", - "src": "5451:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6823, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6815, - "src": "5472:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6824, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6817, - "src": "5475:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 6825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 6822, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6829, - 6856 - ], - "referencedDeclaration": 6856, - "src": "5468:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6821, - "id": 6827, - "nodeType": "Return", - "src": "5461:46:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 6829, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6818, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6815, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6829, - "src": "5397:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6814, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6817, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6829, - "src": "5408:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6816, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:6" - }, - "returnParameters": { - "id": 6821, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6820, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6829, - "src": "5442:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6819, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:6" - }, - "scope": 6896, - "src": "5384:130:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6855, - "nodeType": "Block", - "src": "6124:243:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6841, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6833, - "src": "6208:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 6844, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6835, - "src": "6215:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 6840, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6846, - "nodeType": "ExpressionStatement", - "src": "6200:28:6" - }, - { - "assignments": [ - 6848 - ], - "declarations": [ - { - "constant": false, - "id": 6848, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6855, - "src": "6238:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6847, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6852, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6849, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6831, - "src": "6250:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 6850, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6833, - "src": "6254:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6853, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6848, - "src": "6359:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6839, - "id": 6854, - "nodeType": "Return", - "src": "6352:8:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 6856, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6836, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6831, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6042:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6833, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6053:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6832, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6835, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6064:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6834, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:6" - }, - "returnParameters": { - "id": 6839, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6838, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6115:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6837, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:6" - }, - "scope": 6896, - "src": "6029:338:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6871, - "nodeType": "Block", - "src": "6878:61:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6866, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6858, - "src": "6899:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6867, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6860, - "src": "6902:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 6868, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 6865, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6872, - 6895 - ], - "referencedDeclaration": 6895, - "src": "6895:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6864, - "id": 6870, - "nodeType": "Return", - "src": "6888:44:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 6872, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6861, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6858, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6872, - "src": "6824:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6857, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6860, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6872, - "src": "6835:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6859, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:6" - }, - "returnParameters": { - "id": 6864, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6863, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6872, - "src": "6869:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6862, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:6" - }, - "scope": 6896, - "src": "6811:128:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6894, - "nodeType": "Block", - "src": "7538:68:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6884, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6876, - "src": "7556:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 6887, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6878, - "src": "7564:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 6883, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6889, - "nodeType": "ExpressionStatement", - "src": "7548:29:6" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6890, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6874, - "src": "7594:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 6891, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6876, - "src": "7598:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6882, - "id": 6893, - "nodeType": "Return", - "src": "7587:12:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 6895, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6874, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7456:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6876, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7467:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6875, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6878, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7478:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6877, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:6" - }, - "returnParameters": { - "id": 6882, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6881, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7529:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6880, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:6" - }, - "scope": 6896, - "src": "7443:163:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "2900:4708:6" - }, - { - "id": 6897, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6922, - "linearizedBaseContracts": [ - 6922 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6900, - "nodeType": "Block", - "src": "8386:3:6", - "statements": [] - }, - "documentation": null, - "id": 6901, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6898, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:6" - }, - "returnParameters": { - "id": 6899, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:6" - }, - "scope": 6922, - "src": "8362:27:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6909, - "nodeType": "Block", - "src": "8510:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6906, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 6905, - "id": 6908, - "nodeType": "Return", - "src": "8520:17:6" - } - ] - }, - "documentation": null, - "id": 6910, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6902, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:6" - }, - "returnParameters": { - "id": 6905, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6904, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6910, - "src": "8493:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 6903, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:6" - }, - "scope": 6922, - "src": "8448:96:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6920, - "nodeType": "Block", - "src": "8607:165:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6915, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19373, - "src": "8617:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$6922", - "typeString": "contract Context" - } - }, - "id": 6916, - "nodeType": "ExpressionStatement", - "src": "8617:4:6" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6917, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 6914, - "id": 6919, - "nodeType": "Return", - "src": "8750:15:6" - } - ] - }, - "documentation": null, - "id": 6921, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6911, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:6" - }, - "returnParameters": { - "id": 6914, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6913, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6921, - "src": "8593:12:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6912, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:6" - }, - "scope": 6922, - "src": "8550:222:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "8185:589:6" - }, - { - "id": 6923, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6924, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6922, - "src": "9238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$6922", - "typeString": "contract Context" - } - }, - "id": 6925, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:6" - } - ], - "contractDependencies": [ - 6922 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 7034, - "linearizedBaseContracts": [ - 7034, - 6922 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6927, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 7034, - "src": "9252:22:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6926, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 6933, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 6932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6929, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 6933, - "src": "9308:29:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6928, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6931, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 6933, - "src": "9339:24:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6930, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:6" - }, - "src": "9281:84:6" - }, - { - "body": { - "id": 6948, - "nodeType": "Block", - "src": "9491:93:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6936, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "9501:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6937, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6910, - "src": "9510:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6940, - "nodeType": "ExpressionStatement", - "src": "9501:21:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6943, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:6", - "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": 6942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6945, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "9570:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6941, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6933, - "src": "9537:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 6946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6947, - "nodeType": "EmitStatement", - "src": "9532:45:6" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 6949, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6934, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:6" - }, - "returnParameters": { - "id": 6935, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:6" - }, - "scope": 7034, - "src": "9467:117:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6956, - "nodeType": "Block", - "src": "9707:30:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6954, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "9724:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 6953, - "id": 6955, - "nodeType": "Return", - "src": "9717:13:6" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 6957, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6950, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:6" - }, - "returnParameters": { - "id": 6953, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6952, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6957, - "src": "9698:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6951, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:6" - }, - "scope": 7034, - "src": "9660:77:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6966, - "nodeType": "Block", - "src": "9846:82:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6960, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6978, - "src": "9864:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 6961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 6962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 6959, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6964, - "nodeType": "ExpressionStatement", - "src": "9856:54:6" - }, - { - "id": 6965, - "nodeType": "PlaceholderStatement", - "src": "9920:1:6" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 6967, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6958, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:6" - }, - "src": "9825:103:6", - "visibility": "internal" - }, - { - "body": { - "id": 6977, - "nodeType": "Block", - "src": "10057:46:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6972, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6910, - "src": "10074:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6974, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "10090:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 6971, - "id": 6976, - "nodeType": "Return", - "src": "10067:29:6" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 6978, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6968, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:6" - }, - "returnParameters": { - "id": 6971, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6970, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6978, - "src": "10051:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6969, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:6" - }, - "scope": 7034, - "src": "10011:92:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6996, - "nodeType": "Block", - "src": "10491:91:6", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6984, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "10527:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6986, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:6", - "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": 6985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6987, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6983, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6933, - "src": "10506:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 6988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6989, - "nodeType": "EmitStatement", - "src": "10501:45:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6990, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "10556:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:6", - "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": 6991, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6993, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6995, - "nodeType": "ExpressionStatement", - "src": "10556:19:6" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 6997, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6981, - "modifierName": { - "argumentTypes": null, - "id": 6980, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6967, - "src": "10481:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:6" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6979, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:6" - }, - "returnParameters": { - "id": 6982, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:6" - }, - "scope": 7034, - "src": "10445:137:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7008, - "nodeType": "Block", - "src": "10793:45:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7005, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6999, - "src": "10822:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7004, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "10803:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 7006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7007, - "nodeType": "ExpressionStatement", - "src": "10803:28:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 7009, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7002, - "modifierName": { - "argumentTypes": null, - "id": 7001, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6967, - "src": "10783:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:6" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6999, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 7009, - "src": "10758:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:6" - }, - "returnParameters": { - "id": 7003, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:6" - }, - "scope": 7034, - "src": "10731:107:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7032, - "nodeType": "Block", - "src": "10994:170:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7015, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7011, - "src": "11012:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:6", - "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": 7016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7018, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 7020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 7014, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7022, - "nodeType": "ExpressionStatement", - "src": "11004:73:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7024, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "11113:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7025, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7011, - "src": "11121:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7023, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6933, - "src": "11092:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7027, - "nodeType": "EmitStatement", - "src": "11087:43:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7028, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "11140:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7029, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7011, - "src": "11149:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7031, - "nodeType": "ExpressionStatement", - "src": "11140:17:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 7033, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7011, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 7033, - "src": "10967:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7010, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:6" - }, - "returnParameters": { - "id": 7013, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:6" - }, - "scope": 7034, - "src": "10939:225:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "9218:1948:6" - }, - { - "id": 7035, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 7102, - "linearizedBaseContracts": [ - 7102 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 7040, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7036, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:6" - }, - "returnParameters": { - "id": 7039, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7038, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7040, - "src": "11541:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7037, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:6" - }, - "scope": 7102, - "src": "11495:55:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 7047, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7042, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7047, - "src": "11652:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7041, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:6" - }, - "returnParameters": { - "id": 7046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7045, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7047, - "src": "11692:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:6" - }, - "scope": 7102, - "src": "11633:68:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 7056, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7052, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7049, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 7056, - "src": "11939:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7048, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7051, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7056, - "src": "11958:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7050, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:6" - }, - "returnParameters": { - "id": 7055, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7054, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7056, - "src": "11992:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7053, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:6" - }, - "scope": 7102, - "src": "11921:77:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 7065, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7061, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7058, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 7065, - "src": "12292:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7060, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7065, - "src": "12307:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7059, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:6" - }, - "returnParameters": { - "id": 7064, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7063, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7065, - "src": "12347:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7062, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:6" - }, - "scope": 7102, - "src": "12273:83:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 7074, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7070, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7067, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7074, - "src": "13026:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7066, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7069, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7074, - "src": "13043:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7068, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:6" - }, - "returnParameters": { - "id": 7073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7072, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7074, - "src": "13077:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7071, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:6" - }, - "scope": 7102, - "src": "13009:74:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 7085, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7081, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7076, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13412:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7075, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7078, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13428:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7080, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13447:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7079, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:6" - }, - "returnParameters": { - "id": 7084, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7083, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13481:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7082, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:6" - }, - "scope": 7102, - "src": "13390:97:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 7093, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 7092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7087, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 7093, - "src": "13671:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7086, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7089, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 7093, - "src": "13693:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7088, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7091, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7093, - "src": "13713:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7090, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:6" - }, - "src": "13656:72:6" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 7101, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 7100, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7095, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 7101, - "src": "13902:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7097, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7101, - "src": "13925:23:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7096, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7099, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7101, - "src": "13950:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7098, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:6" - }, - "src": "13887:78:6" - } - ], - "scope": 7963, - "src": "11401:2566:6" - }, - { - "id": 7103, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 7176, - "linearizedBaseContracts": [ - 7176 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 7127, - "nodeType": "Block", - "src": "14644:731:6", - "statements": [ - { - "assignments": [ - 7111 - ], - "declarations": [ - { - "constant": false, - "id": 7111, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 7127, - "src": "15083:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 7110, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7112, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:6" - }, - { - "assignments": [ - 7114 - ], - "declarations": [ - { - "constant": false, - "id": 7114, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 7127, - "src": "15109:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 7113, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7116, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 7115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:6" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 7111, - "isOffset": false, - "isSlot": false, - "src": "15274:8:6", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 7105, - "isOffset": false, - "isSlot": false, - "src": "15298:7:6", - "valueSize": 1 - } - } - ], - "id": 7117, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:6" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 7124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 7120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7118, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7111, - "src": "15325:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 7119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 7123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7121, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7111, - "src": "15344:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 7122, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7114, - "src": "15356:11:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 7125, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 7109, - "id": 7126, - "nodeType": "Return", - "src": "15317:51:6" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 7128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7106, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7105, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7128, - "src": "14598:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7104, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:6" - }, - "returnParameters": { - "id": 7109, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7108, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7128, - "src": "14638:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7107, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:6" - }, - "scope": 7176, - "src": "14578:797:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7141, - "nodeType": "Block", - "src": "15660:49:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7137, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7130, - "src": "15693:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 7138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 7135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 7134, - "id": 7140, - "nodeType": "Return", - "src": "15670:32:6" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 7142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7130, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7142, - "src": "15603:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:6" - }, - "returnParameters": { - "id": 7134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7133, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7142, - "src": "15643:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 7132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:6" - }, - "scope": 7176, - "src": "15584:125:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7174, - "nodeType": "Block", - "src": "16737:294:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7151, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19379, - "src": "16763:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$7176", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$7176", - "typeString": "library Address" - } - ], - "id": 7150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7154, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7146, - "src": "16780:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 7156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 7149, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7158, - "nodeType": "ExpressionStatement", - "src": "16747:73:6" - }, - { - "assignments": [ - 7160, - null - ], - "declarations": [ - { - "constant": false, - "id": 7160, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 7174, - "src": "16886:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7159, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 7168, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 7166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 7164, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7146, - "src": "16925:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7161, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7144, - "src": "16904:9:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 7162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:6", - "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": 7163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 7165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:6", - "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": 7167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7170, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7160, - "src": "16954:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 7171, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 7169, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7173, - "nodeType": "ExpressionStatement", - "src": "16946:78:6" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 7175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7144, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 7175, - "src": "16685:25:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 7143, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7146, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7175, - "src": "16712:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:6" - }, - "returnParameters": { - "id": 7148, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:6" - }, - "scope": 7176, - "src": "16666:365:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "14114:2919:6" - }, - { - "id": 7177, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 7392, - "linearizedBaseContracts": [ - 7392 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 7180, - "libraryName": { - "contractScope": null, - "id": 7178, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6896, - "src": "17610:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$6896", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:6", - "typeName": { - "id": 7179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 7183, - "libraryName": { - "contractScope": null, - "id": 7181, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7176, - "src": "17642:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$7176", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:6", - "typeName": { - "id": 7182, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 7204, - "nodeType": "Block", - "src": "17740:102:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7193, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7185, - "src": "17769:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7196, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7185, - "src": "17799:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 7056, - "src": "17799:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7199, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7187, - "src": "17824:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7200, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7189, - "src": "17828:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7194, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7195, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7192, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "17750:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7203, - "nodeType": "ExpressionStatement", - "src": "17750:85:6" - } - ] - }, - "documentation": null, - "id": 7205, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7185, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7205, - "src": "17690:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7184, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "17690:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7187, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 7205, - "src": "17704:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7186, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7189, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7205, - "src": "17716:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:6" - }, - "returnParameters": { - "id": 7191, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:6" - }, - "scope": 7392, - "src": "17668:174:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7229, - "nodeType": "Block", - "src": "17938:112:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7217, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7207, - "src": "17967:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7220, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7207, - "src": "17997:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 7085, - "src": "17997:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 7222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7223, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7209, - "src": "18026:4:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7224, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7211, - "src": "18032:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7225, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7213, - "src": "18036:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7218, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7219, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7216, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "17948:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7228, - "nodeType": "ExpressionStatement", - "src": "17948:95:6" - } - ] - }, - "documentation": null, - "id": 7230, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7214, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7207, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17874:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7206, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "17874:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7209, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17888:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7208, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7211, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17902:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7210, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7213, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17914:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7212, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:6" - }, - "returnParameters": { - "id": 7215, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:6" - }, - "scope": 7392, - "src": "17848:202:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7270, - "nodeType": "Block", - "src": "18132:536:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 7254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7240, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7236, - "src": "18421:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 7243, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7247, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19381, - "src": "18461:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - ], - "id": 7246, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7249, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7234, - "src": "18468:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7244, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7232, - "src": "18437:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 7065, - "src": "18437:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 7250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 7253, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 7255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 7239, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7257, - "nodeType": "ExpressionStatement", - "src": "18412:150:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7259, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7232, - "src": "18591:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7262, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7232, - "src": "18621:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 7074, - "src": "18621:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7265, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7234, - "src": "18645:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7266, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7236, - "src": "18654:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7260, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7258, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "18572:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7269, - "nodeType": "ExpressionStatement", - "src": "18572:89:6" - } - ] - }, - "documentation": null, - "id": 7271, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7232, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "18077:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7231, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "18077:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7234, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "18091:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7233, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7236, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "18108:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:6" - }, - "returnParameters": { - "id": 7238, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:6" - }, - "scope": 7392, - "src": "18056:612:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7305, - "nodeType": "Block", - "src": "18760:196:6", - "statements": [ - { - "assignments": [ - 7281 - ], - "declarations": [ - { - "constant": false, - "id": 7281, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 7305, - "src": "18770:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7292, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7290, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7277, - "src": "18837:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7285, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19381, - "src": "18817:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - ], - "id": 7284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7287, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7275, - "src": "18824:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7282, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7273, - "src": "18793:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 7065, - "src": "18793:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 7288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "18793:43:6", - "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": 7291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7294, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7273, - "src": "18872:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7297, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7273, - "src": "18902:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 7074, - "src": "18902:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7300, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7275, - "src": "18926:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7301, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7281, - "src": "18935:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7295, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7293, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "18853:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7304, - "nodeType": "ExpressionStatement", - "src": "18853:96:6" - } - ] - }, - "documentation": null, - "id": 7306, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7278, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7273, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7306, - "src": "18705:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7272, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "18705:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7275, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7306, - "src": "18719:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7274, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7277, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7306, - "src": "18736:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7276, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:6" - }, - "returnParameters": { - "id": 7279, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:6" - }, - "scope": 7392, - "src": "18674:282:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7341, - "nodeType": "Block", - "src": "19048:241:6", - "statements": [ - { - "assignments": [ - 7316 - ], - "declarations": [ - { - "constant": false, - "id": 7316, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 7341, - "src": "19058:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7315, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7328, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7325, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7312, - "src": "19125:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 7326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7320, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19381, - "src": "19105:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - ], - "id": 7319, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7322, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7310, - "src": "19112:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7317, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7308, - "src": "19081:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 7065, - "src": "19081:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 7323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6779, - "src": "19081:43:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 7327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7330, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7308, - "src": "19205:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7333, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7308, - "src": "19235:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 7074, - "src": "19235:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7336, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7310, - "src": "19259:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7337, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7316, - "src": "19268:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7331, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7329, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "19186:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7340, - "nodeType": "ExpressionStatement", - "src": "19186:96:6" - } - ] - }, - "documentation": null, - "id": 7342, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7313, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7308, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7342, - "src": "18993:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7307, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "18993:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7310, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7342, - "src": "19007:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7312, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7342, - "src": "19024:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7311, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:6" - }, - "returnParameters": { - "id": 7314, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:6" - }, - "scope": 7392, - "src": "18962:327:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7390, - "nodeType": "Block", - "src": "19741:1026:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7351, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7344, - "src": "20275:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - ], - "id": 7350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 7128, - "src": "20267:25:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 7354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 7355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 7349, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7357, - "nodeType": "ExpressionStatement", - "src": "20259:71:6" - }, - { - "assignments": [ - 7359, - 7361 - ], - "declarations": [ - { - "constant": false, - "id": 7359, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 7390, - "src": "20401:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7358, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7361, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 7390, - "src": "20415:23:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 7360, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7368, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7366, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7346, - "src": "20462:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7363, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7344, - "src": "20450:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - ], - "id": 7362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:6", - "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": 7367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7370, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7359, - "src": "20485:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 7371, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 7369, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7373, - "nodeType": "ExpressionStatement", - "src": "20477:52:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7374, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7361, - "src": "20544:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 7375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7376, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7389, - "nodeType": "IfStatement", - "src": "20540:221:6", - "trueBody": { - "id": 7388, - "nodeType": "Block", - "src": "20567:194:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7381, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7361, - "src": "20684:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 7382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 7383, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 7379, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 7384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 7385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 7378, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7387, - "nodeType": "ExpressionStatement", - "src": "20665:85:6" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 7391, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7344, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7391, - "src": "19700:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7343, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "19700:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7346, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 7391, - "src": "19714:17:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 7345, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:6" - }, - "returnParameters": { - "id": 7348, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:6" - }, - "scope": 7392, - "src": "19672:1095:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 7963, - "src": "17580:3189:6" - }, - { - "id": 7393, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 7394, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7034, - "src": "20892:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$7034", - "typeString": "contract Ownable" - } - }, - "id": 7395, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:6" - } - ], - "contractDependencies": [ - 6922, - 7034 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 7427, - "linearizedBaseContracts": [ - 7427, - 7034, - 6922 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7397, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 7427, - "src": "20906:33:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7396, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 7402, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7400, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7399, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7402, - "src": "20974:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7398, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:6" - }, - "returnParameters": { - "id": 7401, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:6" - }, - "scope": 7427, - "src": "20946:53:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7413, - "nodeType": "Block", - "src": "21039:108:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7405, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6910, - "src": "21057:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 7406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7407, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7397, - "src": "21073:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 7409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 7404, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7411, - "nodeType": "ExpressionStatement", - "src": "21049:80:6" - }, - { - "id": 7412, - "nodeType": "PlaceholderStatement", - "src": "21139:1:6" - } - ] - }, - "documentation": null, - "id": 7414, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 7403, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:6" - }, - "src": "21005:142:6", - "visibility": "internal" - }, - { - "body": { - "id": 7425, - "nodeType": "Block", - "src": "21252:57:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7421, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7397, - "src": "21262:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7422, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7416, - "src": "21283:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7424, - "nodeType": "ExpressionStatement", - "src": "21262:40:6" - } - ] - }, - "documentation": null, - "id": 7426, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7419, - "modifierName": { - "argumentTypes": null, - "id": 7418, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6967, - "src": "21238:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:6" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7417, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7416, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 7426, - "src": "21184:27:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7415, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:6" - }, - "returnParameters": { - "id": 7420, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:6" - }, - "scope": 7427, - "src": "21153:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 7963, - "src": "20851:460:6" - }, - { - "id": 7428, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 7434, - "linearizedBaseContracts": [ - 7434 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 7433, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7429, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:6" - }, - "returnParameters": { - "id": 7432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7431, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7433, - "src": "21443:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:6" - }, - "scope": 7434, - "src": "21396:56:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 7963, - "src": "21376:78:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 7543, - "linearizedBaseContracts": [ - 7543 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 7437, - "libraryName": { - "contractScope": null, - "id": 7435, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6896, - "src": "21494:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$6896", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:6", - "typeName": { - "id": 7436, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 7440, - "libraryName": { - "contractScope": null, - "id": 7438, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7392, - "src": "21526:9:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:6", - "typeName": { - "contractScope": null, - "id": 7439, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "21540:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 7445, - "name": "mkr", - "nodeType": "VariableDeclaration", - "scope": 7543, - "src": "21553:70:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7441, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "21553:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307839663846373261413933303463384235393364353535463132654636353839634333413537394132", - "id": 7443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21580:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7442, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7102, - "src": "21573:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$7102_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21573:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7447, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 7543, - "src": "21630:28:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21630:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 7451, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 7543, - "src": "21664:45:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7450, - "keyType": { - "id": 7448, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21672:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21664:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 7449, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21683:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 7458, - "nodeType": "Block", - "src": "21769:36:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7456, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "21786:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7455, - "id": 7457, - "nodeType": "Return", - "src": "21779:19:6" - } - ] - }, - "documentation": null, - "id": 7459, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7452, - "nodeType": "ParameterList", - "parameters": [], - "src": "21736:2:6" - }, - "returnParameters": { - "id": 7455, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7454, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7459, - "src": "21760:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7453, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21760:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21759:9:6" - }, - "scope": 7543, - "src": "21716:89:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7470, - "nodeType": "Block", - "src": "21877:42:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7466, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "21894:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7468, - "indexExpression": { - "argumentTypes": null, - "id": 7467, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7461, - "src": "21904:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21894:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7465, - "id": 7469, - "nodeType": "Return", - "src": "21887:25:6" - } - ] - }, - "documentation": null, - "id": 7471, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7461, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7471, - "src": "21830:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21830:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21829:17:6" - }, - "returnParameters": { - "id": 7465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7464, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7471, - "src": "21868:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7463, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21868:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21867:9:6" - }, - "scope": 7543, - "src": "21811:108:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7507, - "nodeType": "Block", - "src": "21963:188:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7476, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "21973:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7479, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7473, - "src": "22005:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7477, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "21988:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "21988:16:6", - "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": 7480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21988:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21973:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7482, - "nodeType": "ExpressionStatement", - "src": "21973:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7483, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22022:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7486, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7484, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22032:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22032:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22022:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7492, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7473, - "src": "22072:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7487, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22046:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7490, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7488, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22056:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22056:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22046:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "22046:25:6", - "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": 7493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22046:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22022:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7495, - "nodeType": "ExpressionStatement", - "src": "22022:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7499, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22110:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22110:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7502, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19387, - "src": "22130:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$7543", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$7543", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 7501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22122:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22122:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7504, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7473, - "src": "22137:6:6", - "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, - "id": 7496, - "name": "mkr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7445, - "src": "22089:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 7230, - "src": "22089:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7102_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 7505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22089:55:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7506, - "nodeType": "ExpressionStatement", - "src": "22089:55:6" - } - ] - }, - "documentation": null, - "id": 7508, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7474, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7473, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7508, - "src": "21940:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7472, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21940:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21939:16:6" - }, - "returnParameters": { - "id": 7475, - "nodeType": "ParameterList", - "parameters": [], - "src": "21963:0:6" - }, - "scope": 7543, - "src": "21925:226:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7541, - "nodeType": "Block", - "src": "22198:169:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7513, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "22208:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7516, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7510, - "src": "22240:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7514, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "22223:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "22223:16:6", - "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": 7517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22223:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22208:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7519, - "nodeType": "ExpressionStatement", - "src": "22208:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7520, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22257:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7523, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7521, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22267:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22267:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22257:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7529, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7510, - "src": "22307:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7524, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22281:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7527, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7525, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22291:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22291:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22281:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "22281:25:6", - "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": 7530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22281:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22257:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7532, - "nodeType": "ExpressionStatement", - "src": "22257:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22341:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22341:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7538, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7510, - "src": "22353:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7533, - "name": "mkr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7445, - "src": "22324:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 7205, - "src": "22324:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7102_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22324:36:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7540, - "nodeType": "ExpressionStatement", - "src": "22324:36:6" - } - ] - }, - "documentation": null, - "id": 7542, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7510, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7542, - "src": "22175:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22175:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22174:16:6" - }, - "returnParameters": { - "id": 7512, - "nodeType": "ParameterList", - "parameters": [], - "src": "22198:0:6" - }, - "scope": 7543, - "src": "22157:210:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 7963, - "src": "21458:911:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 7544, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7543, - "src": "22394:14:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$7543", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 7545, - "nodeType": "InheritanceSpecifier", - "src": "22394:14:6" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 7546, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7427, - "src": "22410:28:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$7427", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 7547, - "nodeType": "InheritanceSpecifier", - "src": "22410:28:6" - } - ], - "contractDependencies": [ - 6922, - 7034, - 7427, - 7543 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 7962, - "linearizedBaseContracts": [ - 7962, - 7427, - 7034, - 6922, - 7543 - ], - "name": "YAMMKRPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7552, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22445:70:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7548, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "22445:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 7550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22472:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7549, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7102, - "src": "22465:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$7102_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22465:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 7555, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22521:41:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22521:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 7554, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22556:6:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7558, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22584:37:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7556, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22584:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 7557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22611:10:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7561, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22665:31:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7559, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22665:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 7560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22695:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7564, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22702:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7562, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22702:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 7563, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22730:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7566, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22737:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7565, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22737:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7568, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22772:35:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7567, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22772:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7572, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22813:57:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7571, - "keyType": { - "id": 7569, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22821:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22813:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 7570, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22832:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7576, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22876:42:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7575, - "keyType": { - "id": 7573, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22884:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22876:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 7574, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22895:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 7580, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 7579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7578, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7580, - "src": "22943:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22943:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22942:16:6" - }, - "src": "22925:34:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 7586, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 7585, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7582, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 7586, - "src": "22977:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22977:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7584, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7586, - "src": "22999:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7583, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22999:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22976:38:6" - }, - "src": "22964:51:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 7592, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 7591, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7588, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 7592, - "src": "23036:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7587, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23036:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7590, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7592, - "src": "23058:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23058:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23035:38:6" - }, - "src": "23020:54:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 7598, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 7597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7594, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 7598, - "src": "23096:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7593, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23096:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7596, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7598, - "src": "23118:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7595, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23118:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23095:38:6" - }, - "src": "23079:55:6" - }, - { - "body": { - "id": 7609, - "nodeType": "Block", - "src": "23162:77:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7601, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23180:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23180:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7603, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "23199:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23180:28:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 7605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23209:11:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 7600, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23172:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23172:49:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7607, - "nodeType": "ExpressionStatement", - "src": "23172:49:6" - }, - { - "id": 7608, - "nodeType": "PlaceholderStatement", - "src": "23231:1:6" - } - ] - }, - "documentation": null, - "id": 7610, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 7599, - "nodeType": "ParameterList", - "parameters": [], - "src": "23159:2:6" - }, - "src": "23140:99:6", - "visibility": "internal" - }, - { - "body": { - "id": 7646, - "nodeType": "Block", - "src": "23284:283:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7614, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23294:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7615, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7693, - "src": "23317:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23317:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23294:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7618, - "nodeType": "ExpressionStatement", - "src": "23294:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7619, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "23343:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7620, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7660, - "src": "23360:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23360:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23343:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7623, - "nodeType": "ExpressionStatement", - "src": "23343:43:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7624, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23400:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23419:1:6", - "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": 7625, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23411:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7627, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23411:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23400:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7644, - "nodeType": "IfStatement", - "src": "23396:154:6", - "trueBody": { - "id": 7643, - "nodeType": "Block", - "src": "23423:127:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7629, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7576, - "src": "23437:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7631, - "indexExpression": { - "argumentTypes": null, - "id": 7630, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23445:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23437:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7633, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23463:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7632, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7722, - "src": "23456:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23456:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23437:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7636, - "nodeType": "ExpressionStatement", - "src": "23437:34:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7637, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7572, - "src": "23485:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7639, - "indexExpression": { - "argumentTypes": null, - "id": 7638, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23508:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23485:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7640, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23519:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23485:54:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7642, - "nodeType": "ExpressionStatement", - "src": "23485:54:6" - } - ] - } - }, - { - "id": 7645, - "nodeType": "PlaceholderStatement", - "src": "23559:1:6" - } - ] - }, - "documentation": null, - "id": 7647, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 7613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7612, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7647, - "src": "23267:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7611, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23267:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23266:17:6" - }, - "src": "23245:322:6", - "visibility": "internal" - }, - { - "body": { - "id": 7659, - "nodeType": "Block", - "src": "23639:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7654, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23665:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23665:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7656, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "23682:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7652, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6710, - "src": "23656:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$6710_$", - "typeString": "type(library Math)" - } - }, - "id": 7653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 6677, - "src": "23656:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 7657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23656:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7651, - "id": 7658, - "nodeType": "Return", - "src": "23649:46:6" - } - ] - }, - "documentation": null, - "id": 7660, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7648, - "nodeType": "ParameterList", - "parameters": [], - "src": "23606:2:6" - }, - "returnParameters": { - "id": 7651, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7650, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7660, - "src": "23630:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7649, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23630:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23629:9:6" - }, - "scope": 7962, - "src": "23573:129:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7692, - "nodeType": "Block", - "src": "23764:352:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7665, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7459, - "src": "23778:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23778:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23795:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23778:18:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7672, - "nodeType": "IfStatement", - "src": "23774:76:6", - "trueBody": { - "id": 7671, - "nodeType": "Block", - "src": "23798:52:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7669, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23819:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7664, - "id": 7670, - "nodeType": "Return", - "src": "23812:27:6" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7687, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7459, - "src": "24081:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24081:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 7684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24050:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7681, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "24013:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7678, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "23972:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7675, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7660, - "src": "23920:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "23920:51:6", - "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": 7679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:67:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "23920:92:6", - "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": 7682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:104:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "23920:129:6", - "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": 7685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:135:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "23920:160:6", - "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": 7689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:175:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7673, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23878:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "23878:24:6", - "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": 7690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23878:231:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7664, - "id": 7691, - "nodeType": "Return", - "src": "23859:250:6" - } - ] - }, - "documentation": null, - "id": 7693, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7661, - "nodeType": "ParameterList", - "parameters": [], - "src": "23731:2:6" - }, - "returnParameters": { - "id": 7664, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7663, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7693, - "src": "23755:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7662, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23755:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23754:9:6" - }, - "scope": 7962, - "src": "23708:408:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7721, - "nodeType": "Block", - "src": "24185:196:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7716, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7576, - "src": "24357:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7718, - "indexExpression": { - "argumentTypes": null, - "id": 7717, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7695, - "src": "24365:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24357:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 7713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24330:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7707, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7572, - "src": "24275:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7709, - "indexExpression": { - "argumentTypes": null, - "id": 7708, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7695, - "src": "24298:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24275:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7704, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7693, - "src": "24254:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "24254:20:6", - "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": 7710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:53:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7701, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7695, - "src": "24224:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7700, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7471, - "src": "24214:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "24214:39:6", - "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": 7711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:94:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "24214:115:6", - "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": 7714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:121:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "24214:142:6", - "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": 7719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:160:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7699, - "id": 7720, - "nodeType": "Return", - "src": "24195:179:6" - } - ] - }, - "documentation": null, - "id": 7722, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7696, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7695, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7722, - "src": "24138:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7694, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24138:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24137:17:6" - }, - "returnParameters": { - "id": 7699, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7698, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7722, - "src": "24176:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7697, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24176:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24175:9:6" - }, - "scope": 7962, - "src": "24122:259:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7752, - "nodeType": "Block", - "src": "24543:124:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7734, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7724, - "src": "24561:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24570:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24561:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 7737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24573:16:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 7733, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24553:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24553:37:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7739, - "nodeType": "ExpressionStatement", - "src": "24553:37:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7743, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7724, - "src": "24612:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7740, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19390, - "src": "24600:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMMKRPool_$7962", - "typeString": "contract super YAMMKRPool" - } - }, - "id": 7742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 7508, - "src": "24600:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24600:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7745, - "nodeType": "ExpressionStatement", - "src": "24600:19:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7747, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24641:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24641:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7749, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7724, - "src": "24653:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7746, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7586, - "src": "24634:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 7750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24634:26:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7751, - "nodeType": "EmitStatement", - "src": "24629:31:6" - } - ] - }, - "documentation": null, - "id": 7753, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7727, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24520:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24520:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7729, - "modifierName": { - "argumentTypes": null, - "id": 7726, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "24507:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24507:24:6" - }, - { - "arguments": null, - "id": 7731, - "modifierName": { - "argumentTypes": null, - "id": 7730, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7610, - "src": "24532:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24532:10:6" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7724, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7753, - "src": "24484:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7723, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24484:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24483:16:6" - }, - "returnParameters": { - "id": 7732, - "nodeType": "ParameterList", - "parameters": [], - "src": "24543:0:6" - }, - "scope": 7962, - "src": "24469:198:6", - "stateMutability": "nonpayable", - "superFunction": 7508, - "visibility": "public" - }, - { - "body": { - "id": 7783, - "nodeType": "Block", - "src": "24750:133:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7765, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7755, - "src": "24768:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7766, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24777:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24768:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 7768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24780:19:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 7764, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24760:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24760:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7770, - "nodeType": "ExpressionStatement", - "src": "24760:40:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7774, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7755, - "src": "24825:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7771, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19390, - "src": "24810:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMMKRPool_$7962", - "typeString": "contract super YAMMKRPool" - } - }, - "id": 7773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 7542, - "src": "24810:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24810:22:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7776, - "nodeType": "ExpressionStatement", - "src": "24810:22:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7778, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24857:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24857:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7780, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7755, - "src": "24869:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7777, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7592, - "src": "24847:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 7781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24847:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7782, - "nodeType": "EmitStatement", - "src": "24842:34:6" - } - ] - }, - "documentation": null, - "id": 7784, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7758, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24727:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24727:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7760, - "modifierName": { - "argumentTypes": null, - "id": 7757, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "24714:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24714:24:6" - }, - { - "arguments": null, - "id": 7762, - "modifierName": { - "argumentTypes": null, - "id": 7761, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7610, - "src": "24739:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24739:10:6" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7756, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7755, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7784, - "src": "24691:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7754, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24691:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24690:16:6" - }, - "returnParameters": { - "id": 7763, - "nodeType": "ParameterList", - "parameters": [], - "src": "24750:0:6" - }, - "scope": 7962, - "src": "24673:210:6", - "stateMutability": "nonpayable", - "superFunction": 7542, - "visibility": "public" - }, - { - "body": { - "id": 7797, - "nodeType": "Block", - "src": "24914:69:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7789, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24943:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24943:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7788, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7471, - "src": "24933:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24933:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7787, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 7784 - ], - "referencedDeclaration": 7784, - "src": "24924:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24924:31:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7793, - "nodeType": "ExpressionStatement", - "src": "24924:31:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7794, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7863, - "src": "24965:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 7795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24965:11:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7796, - "nodeType": "ExpressionStatement", - "src": "24965:11:6" - } - ] - }, - "documentation": null, - "id": 7798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7785, - "nodeType": "ParameterList", - "parameters": [], - "src": "24902:2:6" - }, - "returnParameters": { - "id": 7786, - "nodeType": "ParameterList", - "parameters": [], - "src": "24914:0:6" - }, - "scope": 7962, - "src": "24889:94:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7862, - "nodeType": "Block", - "src": "25053:379:6", - "statements": [ - { - "assignments": [ - 7808 - ], - "declarations": [ - { - "constant": false, - "id": 7808, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7862, - "src": "25063:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7807, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25063:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7813, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7810, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25087:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25087:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7809, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7722, - "src": "25080:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25080:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25063:35:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7814, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7808, - "src": "25112:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25121:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25112:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7861, - "nodeType": "IfStatement", - "src": "25108:318:6", - "trueBody": { - "id": 7860, - "nodeType": "Block", - "src": "25124:302:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7817, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7576, - "src": "25138:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7820, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7818, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25146:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25146:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25138:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 7821, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25160:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25138:23:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7823, - "nodeType": "ExpressionStatement", - "src": "25138:23:6" - }, - { - "assignments": [ - 7825 - ], - "declarations": [ - { - "constant": false, - "id": 7825, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 7860, - "src": "25175:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7824, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25175:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7833, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7828, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7552, - "src": "25211:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - ], - "id": 7827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25203:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7826, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7434, - "src": "25199:3:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$7434_$", - "typeString": "type(contract YAM)" - } - }, - "id": 7830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:17:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$7434", - "typeString": "contract YAM" - } - }, - "id": 7831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 7433, - "src": "25199:35:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 7832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25175:61:6" - }, - { - "assignments": [ - 7835 - ], - "declarations": [ - { - "constant": false, - "id": 7835, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 7860, - "src": "25250:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7834, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25250:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7845, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7841, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25301:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25301:6:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7838, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7825, - "src": "25282:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7836, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7808, - "src": "25271:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "25271:10:6", - "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": 7839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "25271:29:6", - "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": 7844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25250:58:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7849, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25339:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25339:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7851, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7835, - "src": "25351:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7846, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7552, - "src": "25322:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 7205, - "src": "25322:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7102_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25322:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7853, - "nodeType": "ExpressionStatement", - "src": "25322:40:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7855, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25392:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25392:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7857, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7835, - "src": "25404:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7854, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7598, - "src": "25381:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 7858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25381:34:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7859, - "nodeType": "EmitStatement", - "src": "25376:39:6" - } - ] - } - } - ] - }, - "documentation": null, - "id": 7863, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7801, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25030:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25030:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7803, - "modifierName": { - "argumentTypes": null, - "id": 7800, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "25017:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25017:24:6" - }, - { - "arguments": null, - "id": 7805, - "modifierName": { - "argumentTypes": null, - "id": 7804, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7610, - "src": "25042:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25042:10:6" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7799, - "nodeType": "ParameterList", - "parameters": [], - "src": "25007:2:6" - }, - "returnParameters": { - "id": 7806, - "nodeType": "ParameterList", - "parameters": [], - "src": "25053:0:6" - }, - "scope": 7962, - "src": "24989:443:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7960, - "nodeType": "Block", - "src": "25567:703:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25581:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25581:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7877, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "25599:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25581:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7958, - "nodeType": "Block", - "src": "26084:180:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7936, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "26096:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7939, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "26120:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7937, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "26109:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "26109:10:6", - "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": 7940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26109:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26096:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7942, - "nodeType": "ExpressionStatement", - "src": "26096:33:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7943, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "26141:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7944, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "26158:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26141:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7946, - "nodeType": "ExpressionStatement", - "src": "26141:26:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7947, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "26179:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7950, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "26208:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7948, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "26194:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "26194:13:6", - "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": 7951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26194:23:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26179:38:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7953, - "nodeType": "ExpressionStatement", - "src": "26179:38:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7955, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "26246:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7954, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7580, - "src": "26234:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26234:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7957, - "nodeType": "EmitStatement", - "src": "26229:24:6" - } - ] - }, - "id": 7959, - "nodeType": "IfStatement", - "src": "25577:687:6", - "trueBody": { - "id": 7935, - "nodeType": "Block", - "src": "25610:468:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7879, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25626:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25626:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7881, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "25645:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25626:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7916, - "nodeType": "Block", - "src": "25727:205:6", - "statements": [ - { - "assignments": [ - 7892 - ], - "declarations": [ - { - "constant": false, - "id": 7892, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 7916, - "src": "25743:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25743:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7898, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7895, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25780:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25780:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7893, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "25763:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "25763:16:6", - "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": 7897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25763:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25743:53:6" - }, - { - "assignments": [ - 7900 - ], - "declarations": [ - { - "constant": false, - "id": 7900, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 7916, - "src": "25812:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7899, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25812:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7905, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7903, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "25845:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7901, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7892, - "src": "25831:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "25831:13:6", - "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": 7904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25831:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25812:44:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7906, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "25872:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7912, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "25910:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7909, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7900, - "src": "25896:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7907, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "25885:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "25885:10:6", - "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": 7910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "25885:24:6", - "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": 7913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25872:47:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7915, - "nodeType": "ExpressionStatement", - "src": "25872:47:6" - } - ] - }, - "id": 7917, - "nodeType": "IfStatement", - "src": "25622:310:6", - "trueBody": { - "id": 7890, - "nodeType": "Block", - "src": "25659:62:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7883, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "25675:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7886, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "25699:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7884, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "25688:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "25688:10:6", - "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": 7887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25688:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25675:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7889, - "nodeType": "ExpressionStatement", - "src": "25675:33:6" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 7921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7918, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "25943:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7919, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25960:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25960:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25943:32:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7922, - "nodeType": "ExpressionStatement", - "src": "25943:32:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7923, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "25987:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7927, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "26022:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7924, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26002:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26002:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "26002:19:6", - "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": 7928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26002:29:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25987:44:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7930, - "nodeType": "ExpressionStatement", - "src": "25987:44:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7932, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "26060:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7931, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7580, - "src": "26048:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26048:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7934, - "nodeType": "EmitStatement", - "src": "26043:24:6" - } - ] - } - } - ] - }, - "documentation": null, - "id": 7961, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7868, - "modifierName": { - "argumentTypes": null, - "id": 7867, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7414, - "src": "25507:22:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25507:22:6" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25559:1:6", - "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": 7870, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25551:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25551:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7873, - "modifierName": { - "argumentTypes": null, - "id": 7869, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "25538:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25538:24:6" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7865, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7961, - "src": "25466:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7864, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25466:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25465:16:6" - }, - "returnParameters": { - "id": 7874, - "nodeType": "ParameterList", - "parameters": [], - "src": "25567:0:6" - }, - "scope": 7962, - "src": "25438:832:6", - "stateMutability": "nonpayable", - "superFunction": 7402, - "visibility": "external" - } - ], - "scope": 7963, - "src": "22371:3901:6" - } - ], - "src": "1490:24783:6" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMMKRPool.sol", - "exportedSymbols": { - "Address": [ - 7176 - ], - "Context": [ - 6922 - ], - "IERC20": [ - 7102 - ], - "IRewardDistributionRecipient": [ - 7427 - ], - "LPTokenWrapper": [ - 7543 - ], - "Math": [ - 6710 - ], - "Ownable": [ - 7034 - ], - "SafeERC20": [ - 7392 - ], - "SafeMath": [ - 6896 - ], - "YAM": [ - 7434 - ], - "YAMMKRPool": [ - 7962 - ] - }, - "id": 7963, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6643, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 6710, - "linearizedBaseContracts": [ - 6710 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6659, - "nodeType": "Block", - "src": "1739:38:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6652, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6645, - "src": "1756:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6653, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6647, - "src": "1761:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 6656, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6647, - "src": "1769:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:6", - "trueExpression": { - "argumentTypes": null, - "id": 6655, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6645, - "src": "1765:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6651, - "id": 6658, - "nodeType": "Return", - "src": "1749:21:6" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 6660, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6648, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6645, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6660, - "src": "1685:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6644, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6647, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6660, - "src": "1696:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6646, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:6" - }, - "returnParameters": { - "id": 6651, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6650, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6660, - "src": "1730:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6649, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:6" - }, - "scope": 6710, - "src": "1672:105:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6676, - "nodeType": "Block", - "src": "1915:37:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6669, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6662, - "src": "1932:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 6670, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6664, - "src": "1936:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 6673, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6664, - "src": "1944:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:6", - "trueExpression": { - "argumentTypes": null, - "id": 6672, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6662, - "src": "1940:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6668, - "id": 6675, - "nodeType": "Return", - "src": "1925:20:6" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 6677, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6665, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6662, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6677, - "src": "1861:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6661, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6664, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6677, - "src": "1872:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6663, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:6" - }, - "returnParameters": { - "id": 6668, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6667, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6677, - "src": "1906:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6666, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:6" - }, - "scope": 6710, - "src": "1848:104:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6708, - "nodeType": "Block", - "src": "2136:119:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6686, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6679, - "src": "2208:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6687, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6689, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6690, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6681, - "src": "2218:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6691, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6693, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6695, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6679, - "src": "2229:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6698, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6681, - "src": "2237:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6702, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 6703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 6705, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6685, - "id": 6707, - "nodeType": "Return", - "src": "2200:48:6" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 6709, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6682, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6679, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6709, - "src": "2082:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6681, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6709, - "src": "2093:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6680, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:6" - }, - "returnParameters": { - "id": 6685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6684, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6709, - "src": "2127:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6683, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:6" - }, - "scope": 6710, - "src": "2065:190:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "1589:668:6" - }, - { - "id": 6711, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 6896, - "linearizedBaseContracts": [ - 6896 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6735, - "nodeType": "Block", - "src": "3212:109:6", - "statements": [ - { - "assignments": [ - 6721 - ], - "declarations": [ - { - "constant": false, - "id": 6721, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6735, - "src": "3222:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6720, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6725, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6722, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6713, - "src": "3234:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 6723, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6715, - "src": "3238:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6727, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6721, - "src": "3257:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 6728, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6713, - "src": "3262:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 6730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 6726, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6732, - "nodeType": "ExpressionStatement", - "src": "3249:46:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6733, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6721, - "src": "3313:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6719, - "id": 6734, - "nodeType": "Return", - "src": "3306:8:6" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 6736, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6716, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6713, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6736, - "src": "3158:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6712, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6715, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6736, - "src": "3169:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:6" - }, - "returnParameters": { - "id": 6719, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6718, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6736, - "src": "3203:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6717, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:6" - }, - "scope": 6896, - "src": "3145:176:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6751, - "nodeType": "Block", - "src": "3652:67:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6746, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6738, - "src": "3673:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6747, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6740, - "src": "3676:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 6748, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 6745, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6752, - 6779 - ], - "referencedDeclaration": 6779, - "src": "3669:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6744, - "id": 6750, - "nodeType": "Return", - "src": "3662:50:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 6752, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6738, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6752, - "src": "3598:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6737, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6740, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6752, - "src": "3609:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6739, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:6" - }, - "returnParameters": { - "id": 6744, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6743, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6752, - "src": "3643:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6742, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:6" - }, - "scope": 6896, - "src": "3585:134:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6778, - "nodeType": "Block", - "src": "4138:92:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6764, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6756, - "src": "4156:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 6765, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6754, - "src": "4161:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 6767, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6758, - "src": "4164:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 6763, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6769, - "nodeType": "ExpressionStatement", - "src": "4148:29:6" - }, - { - "assignments": [ - 6771 - ], - "declarations": [ - { - "constant": false, - "id": 6771, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6778, - "src": "4187:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6770, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6775, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6772, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6754, - "src": "4199:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 6773, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6756, - "src": "4203:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6776, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6771, - "src": "4222:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6762, - "id": 6777, - "nodeType": "Return", - "src": "4215:8:6" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 6779, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6759, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6754, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4056:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6753, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6756, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4067:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6755, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6758, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4078:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6757, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:6" - }, - "returnParameters": { - "id": 6762, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6761, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6779, - "src": "4129:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:6" - }, - "scope": 6896, - "src": "4043:187:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6812, - "nodeType": "Block", - "src": "4537:392:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6788, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6781, - "src": "4769:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6794, - "nodeType": "IfStatement", - "src": "4765:45:6", - "trueBody": { - "id": 6793, - "nodeType": "Block", - "src": "4777:33:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6791, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 6787, - "id": 6792, - "nodeType": "Return", - "src": "4791:8:6" - } - ] - } - }, - { - "assignments": [ - 6796 - ], - "declarations": [ - { - "constant": false, - "id": 6796, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6812, - "src": "4820:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6795, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6800, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6797, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6781, - "src": "4832:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 6798, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6783, - "src": "4836:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6802, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6796, - "src": "4855:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 6803, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6781, - "src": "4859:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6805, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6783, - "src": "4864:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 6807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 6801, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6809, - "nodeType": "ExpressionStatement", - "src": "4847:56:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6810, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6796, - "src": "4921:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6787, - "id": 6811, - "nodeType": "Return", - "src": "4914:8:6" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 6813, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6784, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6781, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6813, - "src": "4483:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6780, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6783, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6813, - "src": "4494:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6782, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:6" - }, - "returnParameters": { - "id": 6787, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6786, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6813, - "src": "4528:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6785, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:6" - }, - "scope": 6896, - "src": "4470:459:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6828, - "nodeType": "Block", - "src": "5451:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6823, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6815, - "src": "5472:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6824, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6817, - "src": "5475:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 6825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 6822, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6829, - 6856 - ], - "referencedDeclaration": 6856, - "src": "5468:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6821, - "id": 6827, - "nodeType": "Return", - "src": "5461:46:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 6829, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6818, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6815, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6829, - "src": "5397:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6814, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6817, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6829, - "src": "5408:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6816, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:6" - }, - "returnParameters": { - "id": 6821, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6820, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6829, - "src": "5442:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6819, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:6" - }, - "scope": 6896, - "src": "5384:130:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6855, - "nodeType": "Block", - "src": "6124:243:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6841, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6833, - "src": "6208:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 6844, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6835, - "src": "6215:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 6840, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6846, - "nodeType": "ExpressionStatement", - "src": "6200:28:6" - }, - { - "assignments": [ - 6848 - ], - "declarations": [ - { - "constant": false, - "id": 6848, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 6855, - "src": "6238:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6847, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6852, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6849, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6831, - "src": "6250:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 6850, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6833, - "src": "6254:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6853, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6848, - "src": "6359:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6839, - "id": 6854, - "nodeType": "Return", - "src": "6352:8:6" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 6856, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6836, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6831, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6042:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6833, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6053:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6832, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6835, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6064:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6834, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:6" - }, - "returnParameters": { - "id": 6839, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6838, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6856, - "src": "6115:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6837, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:6" - }, - "scope": 6896, - "src": "6029:338:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6871, - "nodeType": "Block", - "src": "6878:61:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6866, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6858, - "src": "6899:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6867, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6860, - "src": "6902:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 6868, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 6865, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 6872, - 6895 - ], - "referencedDeclaration": 6895, - "src": "6895:3:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 6869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6864, - "id": 6870, - "nodeType": "Return", - "src": "6888:44:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 6872, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6861, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6858, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6872, - "src": "6824:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6857, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6860, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6872, - "src": "6835:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6859, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:6" - }, - "returnParameters": { - "id": 6864, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6863, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6872, - "src": "6869:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6862, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:6" - }, - "scope": 6896, - "src": "6811:128:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6894, - "nodeType": "Block", - "src": "7538:68:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6884, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6876, - "src": "7556:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 6885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 6887, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6878, - "src": "7564:12:6", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 6883, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6889, - "nodeType": "ExpressionStatement", - "src": "7548:29:6" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6890, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6874, - "src": "7594:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 6891, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6876, - "src": "7598:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6882, - "id": 6893, - "nodeType": "Return", - "src": "7587:12:6" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 6895, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6874, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7456:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6876, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7467:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6875, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6878, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7478:26:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6877, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:6" - }, - "returnParameters": { - "id": 6882, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6881, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6895, - "src": "7529:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6880, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:6" - }, - "scope": 6896, - "src": "7443:163:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "2900:4708:6" - }, - { - "id": 6897, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6922, - "linearizedBaseContracts": [ - 6922 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6900, - "nodeType": "Block", - "src": "8386:3:6", - "statements": [] - }, - "documentation": null, - "id": 6901, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6898, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:6" - }, - "returnParameters": { - "id": 6899, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:6" - }, - "scope": 6922, - "src": "8362:27:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6909, - "nodeType": "Block", - "src": "8510:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6906, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 6905, - "id": 6908, - "nodeType": "Return", - "src": "8520:17:6" - } - ] - }, - "documentation": null, - "id": 6910, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6902, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:6" - }, - "returnParameters": { - "id": 6905, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6904, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6910, - "src": "8493:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 6903, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:6" - }, - "scope": 6922, - "src": "8448:96:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6920, - "nodeType": "Block", - "src": "8607:165:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6915, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19373, - "src": "8617:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$6922", - "typeString": "contract Context" - } - }, - "id": 6916, - "nodeType": "ExpressionStatement", - "src": "8617:4:6" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 6917, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 6918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 6914, - "id": 6919, - "nodeType": "Return", - "src": "8750:15:6" - } - ] - }, - "documentation": null, - "id": 6921, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6911, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:6" - }, - "returnParameters": { - "id": 6914, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6913, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6921, - "src": "8593:12:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6912, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:6" - }, - "scope": 6922, - "src": "8550:222:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "8185:589:6" - }, - { - "id": 6923, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6924, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6922, - "src": "9238:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$6922", - "typeString": "contract Context" - } - }, - "id": 6925, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:6" - } - ], - "contractDependencies": [ - 6922 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 7034, - "linearizedBaseContracts": [ - 7034, - 6922 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6927, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 7034, - "src": "9252:22:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6926, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 6933, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 6932, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6929, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 6933, - "src": "9308:29:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6928, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6931, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 6933, - "src": "9339:24:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6930, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:6" - }, - "src": "9281:84:6" - }, - { - "body": { - "id": 6948, - "nodeType": "Block", - "src": "9491:93:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6936, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "9501:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6937, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6910, - "src": "9510:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6940, - "nodeType": "ExpressionStatement", - "src": "9501:21:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6943, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:6", - "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": 6942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 6945, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "9570:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6941, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6933, - "src": "9537:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 6946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6947, - "nodeType": "EmitStatement", - "src": "9532:45:6" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 6949, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6934, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:6" - }, - "returnParameters": { - "id": 6935, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:6" - }, - "scope": 7034, - "src": "9467:117:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 6956, - "nodeType": "Block", - "src": "9707:30:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6954, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "9724:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 6953, - "id": 6955, - "nodeType": "Return", - "src": "9717:13:6" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 6957, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6950, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:6" - }, - "returnParameters": { - "id": 6953, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6952, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6957, - "src": "9698:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6951, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:6" - }, - "scope": 7034, - "src": "9660:77:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6966, - "nodeType": "Block", - "src": "9846:82:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6960, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6978, - "src": "9864:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 6961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 6962, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 6959, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 6963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6964, - "nodeType": "ExpressionStatement", - "src": "9856:54:6" - }, - { - "id": 6965, - "nodeType": "PlaceholderStatement", - "src": "9920:1:6" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 6967, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 6958, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:6" - }, - "src": "9825:103:6", - "visibility": "internal" - }, - { - "body": { - "id": 6977, - "nodeType": "Block", - "src": "10057:46:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 6975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 6972, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6910, - "src": "10074:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 6973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 6974, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "10090:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 6971, - "id": 6976, - "nodeType": "Return", - "src": "10067:29:6" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 6978, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6968, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:6" - }, - "returnParameters": { - "id": 6971, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6970, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6978, - "src": "10051:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6969, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:6" - }, - "scope": 7034, - "src": "10011:92:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6996, - "nodeType": "Block", - "src": "10491:91:6", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6984, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "10527:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6986, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:6", - "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": 6985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6987, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6983, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6933, - "src": "10506:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 6988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6989, - "nodeType": "EmitStatement", - "src": "10501:45:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 6994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6990, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "10556:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 6992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:6", - "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": 6991, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6993, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6995, - "nodeType": "ExpressionStatement", - "src": "10556:19:6" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 6997, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 6981, - "modifierName": { - "argumentTypes": null, - "id": 6980, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6967, - "src": "10481:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:6" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6979, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:6" - }, - "returnParameters": { - "id": 6982, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:6" - }, - "scope": 7034, - "src": "10445:137:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7008, - "nodeType": "Block", - "src": "10793:45:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7005, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6999, - "src": "10822:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7004, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7033, - "src": "10803:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 7006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7007, - "nodeType": "ExpressionStatement", - "src": "10803:28:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 7009, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7002, - "modifierName": { - "argumentTypes": null, - "id": 7001, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6967, - "src": "10783:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:6" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6999, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 7009, - "src": "10758:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:6" - }, - "returnParameters": { - "id": 7003, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:6" - }, - "scope": 7034, - "src": "10731:107:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7032, - "nodeType": "Block", - "src": "10994:170:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7015, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7011, - "src": "11012:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:6", - "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": 7016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7018, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 7020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 7014, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7022, - "nodeType": "ExpressionStatement", - "src": "11004:73:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7024, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "11113:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7025, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7011, - "src": "11121:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7023, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6933, - "src": "11092:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 7026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7027, - "nodeType": "EmitStatement", - "src": "11087:43:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7030, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7028, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6927, - "src": "11140:6:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7029, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7011, - "src": "11149:8:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7031, - "nodeType": "ExpressionStatement", - "src": "11140:17:6" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 7033, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7011, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 7033, - "src": "10967:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7010, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:6" - }, - "returnParameters": { - "id": 7013, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:6" - }, - "scope": 7034, - "src": "10939:225:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "9218:1948:6" - }, - { - "id": 7035, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 7102, - "linearizedBaseContracts": [ - 7102 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 7040, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7036, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:6" - }, - "returnParameters": { - "id": 7039, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7038, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7040, - "src": "11541:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7037, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:6" - }, - "scope": 7102, - "src": "11495:55:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 7047, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7042, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7047, - "src": "11652:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7041, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:6" - }, - "returnParameters": { - "id": 7046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7045, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7047, - "src": "11692:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:6" - }, - "scope": 7102, - "src": "11633:68:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 7056, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7052, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7049, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 7056, - "src": "11939:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7048, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7051, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7056, - "src": "11958:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7050, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:6" - }, - "returnParameters": { - "id": 7055, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7054, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7056, - "src": "11992:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7053, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:6" - }, - "scope": 7102, - "src": "11921:77:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 7065, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7061, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7058, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 7065, - "src": "12292:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7060, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7065, - "src": "12307:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7059, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:6" - }, - "returnParameters": { - "id": 7064, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7063, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7065, - "src": "12347:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7062, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:6" - }, - "scope": 7102, - "src": "12273:83:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 7074, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7070, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7067, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7074, - "src": "13026:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7066, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7069, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7074, - "src": "13043:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7068, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:6" - }, - "returnParameters": { - "id": 7073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7072, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7074, - "src": "13077:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7071, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:6" - }, - "scope": 7102, - "src": "13009:74:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 7085, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7081, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7076, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13412:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7075, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7078, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13428:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7080, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13447:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7079, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:6" - }, - "returnParameters": { - "id": 7084, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7083, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7085, - "src": "13481:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7082, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:6" - }, - "scope": 7102, - "src": "13390:97:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 7093, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 7092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7087, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 7093, - "src": "13671:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7086, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7089, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 7093, - "src": "13693:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7088, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7091, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7093, - "src": "13713:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7090, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:6" - }, - "src": "13656:72:6" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 7101, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 7100, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7095, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 7101, - "src": "13902:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7097, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7101, - "src": "13925:23:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7096, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7099, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7101, - "src": "13950:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7098, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:6" - }, - "src": "13887:78:6" - } - ], - "scope": 7963, - "src": "11401:2566:6" - }, - { - "id": 7103, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 7176, - "linearizedBaseContracts": [ - 7176 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 7127, - "nodeType": "Block", - "src": "14644:731:6", - "statements": [ - { - "assignments": [ - 7111 - ], - "declarations": [ - { - "constant": false, - "id": 7111, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 7127, - "src": "15083:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 7110, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7112, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:6" - }, - { - "assignments": [ - 7114 - ], - "declarations": [ - { - "constant": false, - "id": 7114, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 7127, - "src": "15109:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 7113, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7116, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 7115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:6" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 7111, - "isOffset": false, - "isSlot": false, - "src": "15274:8:6", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 7105, - "isOffset": false, - "isSlot": false, - "src": "15298:7:6", - "valueSize": 1 - } - } - ], - "id": 7117, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:6" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 7124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 7120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7118, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7111, - "src": "15325:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 7119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 7123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7121, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7111, - "src": "15344:8:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 7122, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7114, - "src": "15356:11:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 7125, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 7109, - "id": 7126, - "nodeType": "Return", - "src": "15317:51:6" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 7128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7106, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7105, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7128, - "src": "14598:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7104, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:6" - }, - "returnParameters": { - "id": 7109, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7108, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7128, - "src": "14638:4:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7107, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:6" - }, - "scope": 7176, - "src": "14578:797:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7141, - "nodeType": "Block", - "src": "15660:49:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7137, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7130, - "src": "15693:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 7138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 7135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 7134, - "id": 7140, - "nodeType": "Return", - "src": "15670:32:6" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 7142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7130, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7142, - "src": "15603:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:6" - }, - "returnParameters": { - "id": 7134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7133, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7142, - "src": "15643:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 7132, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:6" - }, - "scope": 7176, - "src": "15584:125:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7174, - "nodeType": "Block", - "src": "16737:294:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7151, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19379, - "src": "16763:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$7176", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$7176", - "typeString": "library Address" - } - ], - "id": 7150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7154, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7146, - "src": "16780:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 7156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 7149, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7158, - "nodeType": "ExpressionStatement", - "src": "16747:73:6" - }, - { - "assignments": [ - 7160, - null - ], - "declarations": [ - { - "constant": false, - "id": 7160, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 7174, - "src": "16886:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7159, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 7168, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 7166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 7164, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7146, - "src": "16925:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7161, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7144, - "src": "16904:9:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 7162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:6", - "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": 7163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 7165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:6", - "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": 7167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7170, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7160, - "src": "16954:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 7171, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 7169, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7173, - "nodeType": "ExpressionStatement", - "src": "16946:78:6" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 7175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7144, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 7175, - "src": "16685:25:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 7143, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:6", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7146, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7175, - "src": "16712:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:6" - }, - "returnParameters": { - "id": 7148, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:6" - }, - "scope": 7176, - "src": "16666:365:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 7963, - "src": "14114:2919:6" - }, - { - "id": 7177, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 7392, - "linearizedBaseContracts": [ - 7392 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 7180, - "libraryName": { - "contractScope": null, - "id": 7178, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6896, - "src": "17610:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$6896", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:6", - "typeName": { - "id": 7179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 7183, - "libraryName": { - "contractScope": null, - "id": 7181, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7176, - "src": "17642:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$7176", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:6", - "typeName": { - "id": 7182, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 7204, - "nodeType": "Block", - "src": "17740:102:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7193, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7185, - "src": "17769:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7196, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7185, - "src": "17799:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 7056, - "src": "17799:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7199, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7187, - "src": "17824:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7200, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7189, - "src": "17828:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7194, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7195, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7192, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "17750:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7203, - "nodeType": "ExpressionStatement", - "src": "17750:85:6" - } - ] - }, - "documentation": null, - "id": 7205, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7190, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7185, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7205, - "src": "17690:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7184, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "17690:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7187, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 7205, - "src": "17704:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7186, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7189, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7205, - "src": "17716:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7188, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:6" - }, - "returnParameters": { - "id": 7191, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:6" - }, - "scope": 7392, - "src": "17668:174:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7229, - "nodeType": "Block", - "src": "17938:112:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7217, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7207, - "src": "17967:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7220, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7207, - "src": "17997:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 7085, - "src": "17997:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 7222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7223, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7209, - "src": "18026:4:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7224, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7211, - "src": "18032:2:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7225, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7213, - "src": "18036:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7218, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7219, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7216, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "17948:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7228, - "nodeType": "ExpressionStatement", - "src": "17948:95:6" - } - ] - }, - "documentation": null, - "id": 7230, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7214, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7207, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17874:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7206, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "17874:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7209, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17888:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7208, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7211, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17902:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7210, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7213, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7230, - "src": "17914:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7212, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:6" - }, - "returnParameters": { - "id": 7215, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:6" - }, - "scope": 7392, - "src": "17848:202:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7270, - "nodeType": "Block", - "src": "18132:536:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 7254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7240, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7236, - "src": "18421:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 7243, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7247, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19381, - "src": "18461:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - ], - "id": 7246, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7249, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7234, - "src": "18468:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7244, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7232, - "src": "18437:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 7065, - "src": "18437:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 7250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 7253, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 7255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 7239, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7257, - "nodeType": "ExpressionStatement", - "src": "18412:150:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7259, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7232, - "src": "18591:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7262, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7232, - "src": "18621:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 7074, - "src": "18621:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7265, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7234, - "src": "18645:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7266, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7236, - "src": "18654:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7260, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7258, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "18572:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7269, - "nodeType": "ExpressionStatement", - "src": "18572:89:6" - } - ] - }, - "documentation": null, - "id": 7271, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7232, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "18077:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7231, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "18077:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7234, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "18091:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7233, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7236, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7271, - "src": "18108:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7235, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:6" - }, - "returnParameters": { - "id": 7238, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:6" - }, - "scope": 7392, - "src": "18056:612:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7305, - "nodeType": "Block", - "src": "18760:196:6", - "statements": [ - { - "assignments": [ - 7281 - ], - "declarations": [ - { - "constant": false, - "id": 7281, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 7305, - "src": "18770:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7280, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7292, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7290, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7277, - "src": "18837:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7285, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19381, - "src": "18817:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - ], - "id": 7284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7287, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7275, - "src": "18824:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7282, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7273, - "src": "18793:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 7065, - "src": "18793:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 7288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "18793:43:6", - "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": 7291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7294, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7273, - "src": "18872:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7297, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7273, - "src": "18902:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 7074, - "src": "18902:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7300, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7275, - "src": "18926:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7301, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7281, - "src": "18935:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7295, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7293, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "18853:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7304, - "nodeType": "ExpressionStatement", - "src": "18853:96:6" - } - ] - }, - "documentation": null, - "id": 7306, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7278, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7273, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7306, - "src": "18705:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7272, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "18705:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7275, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7306, - "src": "18719:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7274, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7277, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7306, - "src": "18736:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7276, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:6" - }, - "returnParameters": { - "id": 7279, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:6" - }, - "scope": 7392, - "src": "18674:282:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7341, - "nodeType": "Block", - "src": "19048:241:6", - "statements": [ - { - "assignments": [ - 7316 - ], - "declarations": [ - { - "constant": false, - "id": 7316, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 7341, - "src": "19058:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7315, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7328, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7325, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7312, - "src": "19125:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 7326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7320, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19381, - "src": "19105:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - ], - "id": 7319, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7322, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7310, - "src": "19112:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 7317, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7308, - "src": "19081:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 7065, - "src": "19081:15:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 7323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6779, - "src": "19081:43:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 7327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7330, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7308, - "src": "19205:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7333, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7308, - "src": "19235:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 7074, - "src": "19235:13:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 7335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 7336, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7310, - "src": "19259:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7337, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7316, - "src": "19268:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7331, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 7338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 7329, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7391, - "src": "19186:18:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 7339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7340, - "nodeType": "ExpressionStatement", - "src": "19186:96:6" - } - ] - }, - "documentation": null, - "id": 7342, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7313, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7308, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7342, - "src": "18993:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7307, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "18993:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7310, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 7342, - "src": "19007:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7312, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 7342, - "src": "19024:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7311, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:6" - }, - "returnParameters": { - "id": 7314, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:6" - }, - "scope": 7392, - "src": "18962:327:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7390, - "nodeType": "Block", - "src": "19741:1026:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7351, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7344, - "src": "20275:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - ], - "id": 7350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 7128, - "src": "20267:25:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 7354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 7355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 7349, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7357, - "nodeType": "ExpressionStatement", - "src": "20259:71:6" - }, - { - "assignments": [ - 7359, - 7361 - ], - "declarations": [ - { - "constant": false, - "id": 7359, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 7390, - "src": "20401:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7358, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7361, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 7390, - "src": "20415:23:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 7360, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7368, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7366, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7346, - "src": "20462:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7363, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7344, - "src": "20450:5:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - ], - "id": 7362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:6", - "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": 7367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7370, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7359, - "src": "20485:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 7371, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 7369, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7373, - "nodeType": "ExpressionStatement", - "src": "20477:52:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7374, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7361, - "src": "20544:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 7375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7376, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7389, - "nodeType": "IfStatement", - "src": "20540:221:6", - "trueBody": { - "id": 7388, - "nodeType": "Block", - "src": "20567:194:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7381, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7361, - "src": "20684:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 7382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 7383, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 7379, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 7380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 7384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 7385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 7378, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7387, - "nodeType": "ExpressionStatement", - "src": "20665:85:6" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 7391, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7344, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 7391, - "src": "19700:12:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7343, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "19700:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7346, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 7391, - "src": "19714:17:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 7345, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:6" - }, - "returnParameters": { - "id": 7348, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:6" - }, - "scope": 7392, - "src": "19672:1095:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 7963, - "src": "17580:3189:6" - }, - { - "id": 7393, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 7394, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7034, - "src": "20892:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$7034", - "typeString": "contract Ownable" - } - }, - "id": 7395, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:6" - } - ], - "contractDependencies": [ - 6922, - 7034 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 7427, - "linearizedBaseContracts": [ - 7427, - 7034, - 6922 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7397, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 7427, - "src": "20906:33:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7396, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 7402, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7400, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7399, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7402, - "src": "20974:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7398, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:6" - }, - "returnParameters": { - "id": 7401, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:6" - }, - "scope": 7427, - "src": "20946:53:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7413, - "nodeType": "Block", - "src": "21039:108:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7405, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6910, - "src": "21057:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 7406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 7407, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7397, - "src": "21073:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 7409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 7404, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7411, - "nodeType": "ExpressionStatement", - "src": "21049:80:6" - }, - { - "id": 7412, - "nodeType": "PlaceholderStatement", - "src": "21139:1:6" - } - ] - }, - "documentation": null, - "id": 7414, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 7403, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:6" - }, - "src": "21005:142:6", - "visibility": "internal" - }, - { - "body": { - "id": 7425, - "nodeType": "Block", - "src": "21252:57:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7421, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7397, - "src": "21262:18:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7422, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7416, - "src": "21283:19:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 7424, - "nodeType": "ExpressionStatement", - "src": "21262:40:6" - } - ] - }, - "documentation": null, - "id": 7426, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7419, - "modifierName": { - "argumentTypes": null, - "id": 7418, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6967, - "src": "21238:9:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:6" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7417, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7416, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 7426, - "src": "21184:27:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7415, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:6" - }, - "returnParameters": { - "id": 7420, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:6" - }, - "scope": 7427, - "src": "21153:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 7963, - "src": "20851:460:6" - }, - { - "id": 7428, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 7434, - "linearizedBaseContracts": [ - 7434 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 7433, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7429, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:6" - }, - "returnParameters": { - "id": 7432, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7431, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7433, - "src": "21443:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:6" - }, - "scope": 7434, - "src": "21396:56:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 7963, - "src": "21376:78:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 7543, - "linearizedBaseContracts": [ - 7543 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 7437, - "libraryName": { - "contractScope": null, - "id": 7435, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6896, - "src": "21494:8:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$6896", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:6", - "typeName": { - "id": 7436, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 7440, - "libraryName": { - "contractScope": null, - "id": 7438, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7392, - "src": "21526:9:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$7392", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:6", - "typeName": { - "contractScope": null, - "id": 7439, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "21540:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 7445, - "name": "mkr", - "nodeType": "VariableDeclaration", - "scope": 7543, - "src": "21553:70:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7441, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "21553:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307839663846373261413933303463384235393364353535463132654636353839634333413537394132", - "id": 7443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21580:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7442, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7102, - "src": "21573:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$7102_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21573:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7447, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 7543, - "src": "21630:28:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7446, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21630:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 7451, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 7543, - "src": "21664:45:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7450, - "keyType": { - "id": 7448, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21672:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21664:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 7449, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21683:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 7458, - "nodeType": "Block", - "src": "21769:36:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7456, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "21786:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7455, - "id": 7457, - "nodeType": "Return", - "src": "21779:19:6" - } - ] - }, - "documentation": null, - "id": 7459, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7452, - "nodeType": "ParameterList", - "parameters": [], - "src": "21736:2:6" - }, - "returnParameters": { - "id": 7455, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7454, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7459, - "src": "21760:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7453, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21760:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21759:9:6" - }, - "scope": 7543, - "src": "21716:89:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7470, - "nodeType": "Block", - "src": "21877:42:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7466, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "21894:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7468, - "indexExpression": { - "argumentTypes": null, - "id": 7467, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7461, - "src": "21904:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21894:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7465, - "id": 7469, - "nodeType": "Return", - "src": "21887:25:6" - } - ] - }, - "documentation": null, - "id": 7471, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7461, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7471, - "src": "21830:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21830:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21829:17:6" - }, - "returnParameters": { - "id": 7465, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7464, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7471, - "src": "21868:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7463, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21868:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21867:9:6" - }, - "scope": 7543, - "src": "21811:108:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7507, - "nodeType": "Block", - "src": "21963:188:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7476, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "21973:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7479, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7473, - "src": "22005:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7477, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "21988:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "21988:16:6", - "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": 7480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21988:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21973:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7482, - "nodeType": "ExpressionStatement", - "src": "21973:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7483, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22022:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7486, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7484, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22032:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22032:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22022:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7492, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7473, - "src": "22072:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7487, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22046:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7490, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7488, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22056:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22056:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22046:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "22046:25:6", - "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": 7493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22046:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22022:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7495, - "nodeType": "ExpressionStatement", - "src": "22022:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7499, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22110:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22110:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7502, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19387, - "src": "22130:4:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$7543", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$7543", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 7501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22122:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22122:13:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 7504, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7473, - "src": "22137:6:6", - "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, - "id": 7496, - "name": "mkr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7445, - "src": "22089:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 7230, - "src": "22089:20:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7102_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 7505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22089:55:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7506, - "nodeType": "ExpressionStatement", - "src": "22089:55:6" - } - ] - }, - "documentation": null, - "id": 7508, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7474, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7473, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7508, - "src": "21940:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7472, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21940:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21939:16:6" - }, - "returnParameters": { - "id": 7475, - "nodeType": "ParameterList", - "parameters": [], - "src": "21963:0:6" - }, - "scope": 7543, - "src": "21925:226:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7541, - "nodeType": "Block", - "src": "22198:169:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7513, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "22208:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7516, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7510, - "src": "22240:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7514, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7447, - "src": "22223:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "22223:16:6", - "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": 7517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22223:24:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22208:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7519, - "nodeType": "ExpressionStatement", - "src": "22208:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7520, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22257:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7523, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7521, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22267:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22267:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22257:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7529, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7510, - "src": "22307:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7524, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7451, - "src": "22281:9:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7527, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7525, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22291:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22291:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22281:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "22281:25:6", - "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": 7530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22281:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22257:57:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7532, - "nodeType": "ExpressionStatement", - "src": "22257:57:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22341:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22341:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7538, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7510, - "src": "22353:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7533, - "name": "mkr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7445, - "src": "22324:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 7205, - "src": "22324:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7102_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22324:36:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7540, - "nodeType": "ExpressionStatement", - "src": "22324:36:6" - } - ] - }, - "documentation": null, - "id": 7542, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7510, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7542, - "src": "22175:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22175:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22174:16:6" - }, - "returnParameters": { - "id": 7512, - "nodeType": "ParameterList", - "parameters": [], - "src": "22198:0:6" - }, - "scope": 7543, - "src": "22157:210:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 7963, - "src": "21458:911:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 7544, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7543, - "src": "22394:14:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$7543", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 7545, - "nodeType": "InheritanceSpecifier", - "src": "22394:14:6" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 7546, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7427, - "src": "22410:28:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$7427", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 7547, - "nodeType": "InheritanceSpecifier", - "src": "22410:28:6" - } - ], - "contractDependencies": [ - 6922, - 7034, - 7427, - 7543 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 7962, - "linearizedBaseContracts": [ - 7962, - 7427, - 7034, - 6922, - 7543 - ], - "name": "YAMMKRPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7552, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22445:70:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 7548, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 7102, - "src": "22445:6:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 7550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22472:42:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7549, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7102, - "src": "22465:6:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$7102_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 7551, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22465:50:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 7555, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22521:41:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7553, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22521:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 7554, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22556:6:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7558, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22584:37:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7556, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22584:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 7557, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22611:10:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7561, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22665:31:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7559, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22665:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 7560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22695:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7564, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22702:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7562, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22702:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 7563, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22730:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 7566, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22737:29:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7565, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22737:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7568, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22772:35:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7567, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22772:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7572, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22813:57:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7571, - "keyType": { - "id": 7569, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22821:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22813:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 7570, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22832:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7576, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 7962, - "src": "22876:42:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7575, - "keyType": { - "id": 7573, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22884:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22876:27:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 7574, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22895:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 7580, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 7579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7578, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7580, - "src": "22943:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7577, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22943:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22942:16:6" - }, - "src": "22925:34:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 7586, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 7585, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7582, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 7586, - "src": "22977:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22977:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7584, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7586, - "src": "22999:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7583, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22999:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22976:38:6" - }, - "src": "22964:51:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 7592, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 7591, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7588, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 7592, - "src": "23036:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7587, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23036:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7590, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7592, - "src": "23058:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7589, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23058:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23035:38:6" - }, - "src": "23020:54:6" - }, - { - "anonymous": false, - "documentation": null, - "id": 7598, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 7597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7594, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 7598, - "src": "23096:20:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7593, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23096:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7596, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7598, - "src": "23118:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7595, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23118:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23095:38:6" - }, - "src": "23079:55:6" - }, - { - "body": { - "id": 7609, - "nodeType": "Block", - "src": "23162:77:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7601, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23180:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23180:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7603, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "23199:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23180:28:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 7605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23209:11:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 7600, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23172:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23172:49:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7607, - "nodeType": "ExpressionStatement", - "src": "23172:49:6" - }, - { - "id": 7608, - "nodeType": "PlaceholderStatement", - "src": "23231:1:6" - } - ] - }, - "documentation": null, - "id": 7610, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 7599, - "nodeType": "ParameterList", - "parameters": [], - "src": "23159:2:6" - }, - "src": "23140:99:6", - "visibility": "internal" - }, - { - "body": { - "id": 7646, - "nodeType": "Block", - "src": "23284:283:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7614, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23294:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7615, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7693, - "src": "23317:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23317:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23294:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7618, - "nodeType": "ExpressionStatement", - "src": "23294:39:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7619, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "23343:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7620, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7660, - "src": "23360:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23360:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23343:43:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7623, - "nodeType": "ExpressionStatement", - "src": "23343:43:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 7628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7624, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23400:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23419:1:6", - "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": 7625, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23411:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7627, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23411:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23400:21:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7644, - "nodeType": "IfStatement", - "src": "23396:154:6", - "trueBody": { - "id": 7643, - "nodeType": "Block", - "src": "23423:127:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7629, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7576, - "src": "23437:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7631, - "indexExpression": { - "argumentTypes": null, - "id": 7630, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23445:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23437:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7633, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23463:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7632, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7722, - "src": "23456:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23456:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23437:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7636, - "nodeType": "ExpressionStatement", - "src": "23437:34:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7637, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7572, - "src": "23485:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7639, - "indexExpression": { - "argumentTypes": null, - "id": 7638, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7612, - "src": "23508:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23485:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7640, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23519:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23485:54:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7642, - "nodeType": "ExpressionStatement", - "src": "23485:54:6" - } - ] - } - }, - { - "id": 7645, - "nodeType": "PlaceholderStatement", - "src": "23559:1:6" - } - ] - }, - "documentation": null, - "id": 7647, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 7613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7612, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7647, - "src": "23267:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7611, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23267:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23266:17:6" - }, - "src": "23245:322:6", - "visibility": "internal" - }, - { - "body": { - "id": 7659, - "nodeType": "Block", - "src": "23639:63:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7654, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23665:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23665:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 7656, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "23682:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7652, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6710, - "src": "23656:4:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$6710_$", - "typeString": "type(library Math)" - } - }, - "id": 7653, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 6677, - "src": "23656:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 7657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23656:39:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7651, - "id": 7658, - "nodeType": "Return", - "src": "23649:46:6" - } - ] - }, - "documentation": null, - "id": 7660, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7648, - "nodeType": "ParameterList", - "parameters": [], - "src": "23606:2:6" - }, - "returnParameters": { - "id": 7651, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7650, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7660, - "src": "23630:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7649, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23630:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23629:9:6" - }, - "scope": 7962, - "src": "23573:129:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7692, - "nodeType": "Block", - "src": "23764:352:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7665, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7459, - "src": "23778:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23778:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23795:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23778:18:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7672, - "nodeType": "IfStatement", - "src": "23774:76:6", - "trueBody": { - "id": 7671, - "nodeType": "Block", - "src": "23798:52:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7669, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23819:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7664, - "id": 7670, - "nodeType": "Return", - "src": "23812:27:6" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7687, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7459, - "src": "24081:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24081:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 7684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24050:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7681, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "24013:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7678, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "23972:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7675, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7660, - "src": "23920:24:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "23920:51:6", - "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": 7679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:67:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "23920:92:6", - "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": 7682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:104:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "23920:129:6", - "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": 7685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:135:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "23920:160:6", - "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": 7689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:175:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7673, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7568, - "src": "23878:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "23878:24:6", - "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": 7690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23878:231:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7664, - "id": 7691, - "nodeType": "Return", - "src": "23859:250:6" - } - ] - }, - "documentation": null, - "id": 7693, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7661, - "nodeType": "ParameterList", - "parameters": [], - "src": "23731:2:6" - }, - "returnParameters": { - "id": 7664, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7663, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7693, - "src": "23755:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7662, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23755:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23754:9:6" - }, - "scope": 7962, - "src": "23708:408:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7721, - "nodeType": "Block", - "src": "24185:196:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7716, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7576, - "src": "24357:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7718, - "indexExpression": { - "argumentTypes": null, - "id": 7717, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7695, - "src": "24365:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24357:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 7713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24330:4:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7707, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7572, - "src": "24275:22:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7709, - "indexExpression": { - "argumentTypes": null, - "id": 7708, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7695, - "src": "24298:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24275:31:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7704, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7693, - "src": "24254:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 7705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:16:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "24254:20:6", - "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": 7710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:53:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7701, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7695, - "src": "24224:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7700, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7471, - "src": "24214:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7703, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "24214:39:6", - "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": 7711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:94:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "24214:115:6", - "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": 7714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:121:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "24214:142:6", - "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": 7719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:160:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7699, - "id": 7720, - "nodeType": "Return", - "src": "24195:179:6" - } - ] - }, - "documentation": null, - "id": 7722, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7696, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7695, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 7722, - "src": "24138:15:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7694, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24138:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24137:17:6" - }, - "returnParameters": { - "id": 7699, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7698, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7722, - "src": "24176:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7697, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24176:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24175:9:6" - }, - "scope": 7962, - "src": "24122:259:6", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7752, - "nodeType": "Block", - "src": "24543:124:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7734, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7724, - "src": "24561:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24570:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24561:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 7737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24573:16:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 7733, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24553:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24553:37:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7739, - "nodeType": "ExpressionStatement", - "src": "24553:37:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7743, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7724, - "src": "24612:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7740, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19390, - "src": "24600:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMMKRPool_$7962", - "typeString": "contract super YAMMKRPool" - } - }, - "id": 7742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 7508, - "src": "24600:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24600:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7745, - "nodeType": "ExpressionStatement", - "src": "24600:19:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7747, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24641:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24641:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7749, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7724, - "src": "24653:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7746, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7586, - "src": "24634:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 7750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24634:26:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7751, - "nodeType": "EmitStatement", - "src": "24629:31:6" - } - ] - }, - "documentation": null, - "id": 7753, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7727, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24520:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24520:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7729, - "modifierName": { - "argumentTypes": null, - "id": 7726, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "24507:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24507:24:6" - }, - { - "arguments": null, - "id": 7731, - "modifierName": { - "argumentTypes": null, - "id": 7730, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7610, - "src": "24532:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24532:10:6" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7724, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7753, - "src": "24484:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7723, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24484:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24483:16:6" - }, - "returnParameters": { - "id": 7732, - "nodeType": "ParameterList", - "parameters": [], - "src": "24543:0:6" - }, - "scope": 7962, - "src": "24469:198:6", - "stateMutability": "nonpayable", - "superFunction": 7508, - "visibility": "public" - }, - { - "body": { - "id": 7783, - "nodeType": "Block", - "src": "24750:133:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7765, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7755, - "src": "24768:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7766, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24777:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24768:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 7768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24780:19:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 7764, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24760:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 7769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24760:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7770, - "nodeType": "ExpressionStatement", - "src": "24760:40:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7774, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7755, - "src": "24825:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7771, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19390, - "src": "24810:5:6", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMMKRPool_$7962", - "typeString": "contract super YAMMKRPool" - } - }, - "id": 7773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 7542, - "src": "24810:14:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24810:22:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7776, - "nodeType": "ExpressionStatement", - "src": "24810:22:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7778, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24857:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24857:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7780, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7755, - "src": "24869:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7777, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7592, - "src": "24847:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 7781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24847:29:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7782, - "nodeType": "EmitStatement", - "src": "24842:34:6" - } - ] - }, - "documentation": null, - "id": 7784, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7758, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24727:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24727:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7760, - "modifierName": { - "argumentTypes": null, - "id": 7757, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "24714:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24714:24:6" - }, - { - "arguments": null, - "id": 7762, - "modifierName": { - "argumentTypes": null, - "id": 7761, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7610, - "src": "24739:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24739:10:6" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7756, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7755, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 7784, - "src": "24691:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7754, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24691:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24690:16:6" - }, - "returnParameters": { - "id": 7763, - "nodeType": "ParameterList", - "parameters": [], - "src": "24750:0:6" - }, - "scope": 7962, - "src": "24673:210:6", - "stateMutability": "nonpayable", - "superFunction": 7542, - "visibility": "public" - }, - { - "body": { - "id": 7797, - "nodeType": "Block", - "src": "24914:69:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7789, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24943:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24943:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7788, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7471, - "src": "24933:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24933:21:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7787, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 7784 - ], - "referencedDeclaration": 7784, - "src": "24924:8:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24924:31:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7793, - "nodeType": "ExpressionStatement", - "src": "24924:31:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 7794, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7863, - "src": "24965:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 7795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24965:11:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7796, - "nodeType": "ExpressionStatement", - "src": "24965:11:6" - } - ] - }, - "documentation": null, - "id": 7798, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7785, - "nodeType": "ParameterList", - "parameters": [], - "src": "24902:2:6" - }, - "returnParameters": { - "id": 7786, - "nodeType": "ParameterList", - "parameters": [], - "src": "24914:0:6" - }, - "scope": 7962, - "src": "24889:94:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 7862, - "nodeType": "Block", - "src": "25053:379:6", - "statements": [ - { - "assignments": [ - 7808 - ], - "declarations": [ - { - "constant": false, - "id": 7808, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7862, - "src": "25063:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7807, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25063:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7813, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7810, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25087:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25087:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 7809, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7722, - "src": "25080:6:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 7812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25080:18:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25063:35:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7814, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7808, - "src": "25112:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 7815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25121:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25112:10:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 7861, - "nodeType": "IfStatement", - "src": "25108:318:6", - "trueBody": { - "id": 7860, - "nodeType": "Block", - "src": "25124:302:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 7817, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7576, - "src": "25138:7:6", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 7820, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7818, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25146:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25146:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25138:19:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 7821, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25160:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25138:23:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7823, - "nodeType": "ExpressionStatement", - "src": "25138:23:6" - }, - { - "assignments": [ - 7825 - ], - "declarations": [ - { - "constant": false, - "id": 7825, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 7860, - "src": "25175:21:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7824, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25175:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7833, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7828, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7552, - "src": "25211:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - ], - "id": 7827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25203:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 7826, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7434, - "src": "25199:3:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$7434_$", - "typeString": "type(contract YAM)" - } - }, - "id": 7830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:17:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$7434", - "typeString": "contract YAM" - } - }, - "id": 7831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 7433, - "src": "25199:35:6", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 7832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25175:61:6" - }, - { - "assignments": [ - 7835 - ], - "declarations": [ - { - "constant": false, - "id": 7835, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 7860, - "src": "25250:18:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7834, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25250:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7845, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 7843, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 7841, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25301:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 7842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25301:6:6", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7838, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7825, - "src": "25282:13:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7836, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7808, - "src": "25271:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "25271:10:6", - "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": 7839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "25271:29:6", - "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": 7844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:37:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25250:58:6" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7849, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25339:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25339:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7851, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7835, - "src": "25351:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7846, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7552, - "src": "25322:3:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$7102", - "typeString": "contract IERC20" - } - }, - "id": 7848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 7205, - "src": "25322:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$7102_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$7102_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 7852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25322:40:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7853, - "nodeType": "ExpressionStatement", - "src": "25322:40:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7855, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25392:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25392:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 7857, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7835, - "src": "25404:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7854, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7598, - "src": "25381:10:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 7858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25381:34:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7859, - "nodeType": "EmitStatement", - "src": "25376:39:6" - } - ] - } - } - ] - }, - "documentation": null, - "id": 7863, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7801, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25030:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 7802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25030:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7803, - "modifierName": { - "argumentTypes": null, - "id": 7800, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "25017:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25017:24:6" - }, - { - "arguments": null, - "id": 7805, - "modifierName": { - "argumentTypes": null, - "id": 7804, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7610, - "src": "25042:10:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25042:10:6" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7799, - "nodeType": "ParameterList", - "parameters": [], - "src": "25007:2:6" - }, - "returnParameters": { - "id": 7806, - "nodeType": "ParameterList", - "parameters": [], - "src": "25053:0:6" - }, - "scope": 7962, - "src": "24989:443:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 7960, - "nodeType": "Block", - "src": "25567:703:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7875, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25581:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25581:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 7877, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "25599:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25581:27:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7958, - "nodeType": "Block", - "src": "26084:180:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7936, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "26096:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7939, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "26120:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7937, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "26109:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "26109:10:6", - "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": 7940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26109:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26096:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7942, - "nodeType": "ExpressionStatement", - "src": "26096:33:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7943, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "26141:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 7944, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "26158:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26141:26:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7946, - "nodeType": "ExpressionStatement", - "src": "26141:26:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7947, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "26179:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7950, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "26208:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7948, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7558, - "src": "26194:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "26194:13:6", - "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": 7951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26194:23:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26179:38:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7953, - "nodeType": "ExpressionStatement", - "src": "26179:38:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7955, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "26246:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7954, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7580, - "src": "26234:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26234:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7957, - "nodeType": "EmitStatement", - "src": "26229:24:6" - } - ] - }, - "id": 7959, - "nodeType": "IfStatement", - "src": "25577:687:6", - "trueBody": { - "id": 7935, - "nodeType": "Block", - "src": "25610:468:6", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7879, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25626:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25626:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7881, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "25645:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25626:31:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 7916, - "nodeType": "Block", - "src": "25727:205:6", - "statements": [ - { - "assignments": [ - 7892 - ], - "declarations": [ - { - "constant": false, - "id": 7892, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 7916, - "src": "25743:17:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25743:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7898, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7895, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25780:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25780:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7893, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "25763:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 6752, - "src": "25763:16:6", - "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": 7897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25763:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25743:53:6" - }, - { - "assignments": [ - 7900 - ], - "declarations": [ - { - "constant": false, - "id": 7900, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 7916, - "src": "25812:16:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7899, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25812:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 7905, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7903, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "25845:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7901, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7892, - "src": "25831:9:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 6813, - "src": "25831:13:6", - "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": 7904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25831:25:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25812:44:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7906, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "25872:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7912, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "25910:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7909, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7900, - "src": "25896:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7907, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "25885:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "25885:10:6", - "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": 7910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "25885:24:6", - "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": 7913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:34:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25872:47:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7915, - "nodeType": "ExpressionStatement", - "src": "25872:47:6" - } - ] - }, - "id": 7917, - "nodeType": "IfStatement", - "src": "25622:310:6", - "trueBody": { - "id": 7890, - "nodeType": "Block", - "src": "25659:62:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 7888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7883, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7564, - "src": "25675:10:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7886, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "25699:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 7884, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "25688:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 6829, - "src": "25688:10:6", - "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": 7887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25688:20:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25675:33:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7889, - "nodeType": "ExpressionStatement", - "src": "25675:33:6" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 7921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7918, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7566, - "src": "25943:14:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7919, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25960:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25960:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25943:32:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7922, - "nodeType": "ExpressionStatement", - "src": "25943:32:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 7929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 7923, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7561, - "src": "25987:12:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7927, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7555, - "src": "26022:8:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 7924, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26002:5:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 7925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26002:15:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 6736, - "src": "26002:19:6", - "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": 7928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26002:29:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25987:44:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7930, - "nodeType": "ExpressionStatement", - "src": "25987:44:6" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 7932, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7865, - "src": "26060:6:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 7931, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7580, - "src": "26048:11:6", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 7933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26048:19:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 7934, - "nodeType": "EmitStatement", - "src": "26043:24:6" - } - ] - } - } - ] - }, - "documentation": null, - "id": 7961, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 7868, - "modifierName": { - "argumentTypes": null, - "id": 7867, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7414, - "src": "25507:22:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25507:22:6" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 7871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25559:1:6", - "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": 7870, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25551:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 7872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25551:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 7873, - "modifierName": { - "argumentTypes": null, - "id": 7869, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7647, - "src": "25538:12:6", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25538:24:6" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7865, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 7961, - "src": "25466:14:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7864, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25466:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25465:16:6" - }, - "returnParameters": { - "id": 7874, - "nodeType": "ParameterList", - "parameters": [], - "src": "25567:0:6" - }, - "scope": 7962, - "src": "25438:832:6", - "stateMutability": "nonpayable", - "superFunction": 7402, - "visibility": "external" - } - ], - "scope": 7963, - "src": "22371:3901:6" - } - ], - "src": "1490:24783:6" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0xd1878dde2359829FBf1000D5CF62aFd5a534E8c2", - "transactionHash": "0x9eb4d0032982d05fd855340aba9991e7835dd031e34fbea084c5ead44027013c" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.643Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMRebaser.json b/build/contracts/YAMRebaser.json deleted file mode 100644 index 9f35722..0000000 --- a/build/contracts/YAMRebaser.json +++ /dev/null @@ -1,48035 +0,0 @@ -{ - "contractName": "YAMRebaser", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "yamAddress_", - "type": "address" - }, - { - "internalType": "address", - "name": "reserveToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "uniswap_factory", - "type": "address" - }, - { - "internalType": "address", - "name": "reservesContract_", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldDeviationThreshold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newDeviationThreshold", - "type": "uint256" - } - ], - "name": "NewDeviationThreshold", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldSlippageFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newSlippageFactor", - "type": "uint256" - } - ], - "name": "NewMaxSlippageFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldRebaseMintPerc", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newRebaseMintPerc", - "type": "uint256" - } - ], - "name": "NewRebaseMintPercent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldReserveContract", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newReserveContract", - "type": "address" - } - ], - "name": "NewReserveContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "TransactionFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reservesAdded", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsSold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsFromReserves", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsToReserves", - "type": "uint256" - } - ], - "name": "TreasuryIncreased", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "blockTimestampLast", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "deviationThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "epoch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isToken0", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastRebaseTimestampSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxSlippageFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "minRebaseTimeIntervalSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "priceCumulativeLast", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseLag", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseMintPerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseWindowLengthSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaseWindowOffsetSec", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebasingActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reservesContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "targetRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "timeOfTWAPInit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "transactions", - "outputs": [ - { - "internalType": "bool", - "name": "enabled", - "type": "bool" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "uniswap_pair", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "maxSlippageFactor_", - "type": "uint256" - } - ], - "name": "setMaxSlippageFactor", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "rebaseMintPerc_", - "type": "uint256" - } - ], - "name": "setRebaseMintPerc", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "reservesContract_", - "type": "address" - } - ], - "name": "setReserveContract", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "init_twap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "activate_rebasing", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "rebase", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "uniswapV2Call", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "deviationThreshold_", - "type": "uint256" - } - ], - "name": "setDeviationThreshold", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "rebaseLag_", - "type": "uint256" - } - ], - "name": "setRebaseLag", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "targetRate_", - "type": "uint256" - } - ], - "name": "setTargetRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "minRebaseTimeIntervalSec_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rebaseWindowOffsetSec_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rebaseWindowLengthSec_", - "type": "uint256" - } - ], - "name": "setRebaseTimingParameters", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "inRebaseWindow", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "addTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "removeTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "enabled", - "type": "bool" - } - ], - "name": "setTransactionEnabled", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yamAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reserveToken_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uniswap_factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reservesContract_\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldDeviationThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDeviationThreshold\",\"type\":\"uint256\"}],\"name\":\"NewDeviationThreshold\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSlippageFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSlippageFactor\",\"type\":\"uint256\"}],\"name\":\"NewMaxSlippageFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldRebaseMintPerc\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRebaseMintPerc\",\"type\":\"uint256\"}],\"name\":\"NewRebaseMintPercent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldReserveContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newReserveContract\",\"type\":\"address\"}],\"name\":\"NewReserveContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"TransactionFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reservesAdded\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"yamsSold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"yamsFromReserves\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"yamsToReserves\",\"type\":\"uint256\"}],\"name\":\"TreasuryIncreased\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"activate_rebasing\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"addTransaction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blockTimestampLast\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"deviationThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"inRebaseWindow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"init_twap\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isToken0\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastRebaseTimestampSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxSlippageFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minRebaseTimeIntervalSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"priceCumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rebase\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseLag\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseMintPerc\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseWindowLengthSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaseWindowOffsetSec\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebasingActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"removeTransaction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reservesContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deviationThreshold_\",\"type\":\"uint256\"}],\"name\":\"setDeviationThreshold\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSlippageFactor_\",\"type\":\"uint256\"}],\"name\":\"setMaxSlippageFactor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rebaseLag_\",\"type\":\"uint256\"}],\"name\":\"setRebaseLag\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rebaseMintPerc_\",\"type\":\"uint256\"}],\"name\":\"setRebaseMintPerc\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minRebaseTimeIntervalSec_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rebaseWindowOffsetSec_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rebaseWindowLengthSec_\",\"type\":\"uint256\"}],\"name\":\"setRebaseTimingParameters\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"reservesContract_\",\"type\":\"address\"}],\"name\":\"setReserveContract\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetRate_\",\"type\":\"uint256\"}],\"name\":\"setTargetRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setTransactionEnabled\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"targetRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"timeOfTWAPInit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"uniswap_pair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_setPendingGov(address)\":{\"params\":{\"pendingGov_\":\"The address of the rebaser contract to use for authentication.\"}},\"activate_rebasing()\":{\"details\":\"One way function, cannot be undone, callable by anyone\"},\"addTransaction(address,bytes)\":{\"params\":{\"data\":\"Transaction data payload\",\"destination\":\"Address of contract destination\"}},\"inRebaseWindow()\":{\"return\":\"If the latest block timestamp is within the rebase time window it, returns true. Otherwise, returns false.\"},\"rebase()\":{\"details\":\"The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is 1e18\"},\"removeTransaction(uint256)\":{\"params\":{\"index\":\"Index of transaction to remove. Transaction ordering may have changed since adding.\"}},\"setDeviationThreshold(uint256)\":{\"params\":{\"deviationThreshold_\":\"The new exchange rate threshold fraction.\"}},\"setRebaseLag(uint256)\":{\"params\":{\"rebaseLag_\":\"The new rebase lag parameter.\"}},\"setRebaseTimingParameters(uint256,uint256,uint256)\":{\"params\":{\"minRebaseTimeIntervalSec_\":\"More than this much time must pass between rebase operations, in seconds.\",\"rebaseWindowLengthSec_\":\"The length of the rebase window in seconds.\",\"rebaseWindowOffsetSec_\":\"The number of seconds from the beginning of the rebase interval, where the rebase window begins.\"}},\"setTargetRate(uint256)\":{\"params\":{\"targetRate_\":\"The new target rate parameter.\"}},\"setTransactionEnabled(uint256,bool)\":{\"params\":{\"enabled\":\"True for enabled, false for disabled.\",\"index\":\"Index of transaction. Transaction ordering may have changed since adding.\"}}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"lets msg.sender accept governance \"},\"_setPendingGov(address)\":{\"notice\":\"sets the pendingGov\"},\"activate_rebasing()\":{\"notice\":\"Activates rebasing\"},\"addTransaction(address,bytes)\":{\"notice\":\"Adds a transaction that gets called for a downstream receiver of rebases\"},\"init_twap()\":{\"notice\":\"Initializes TWAP start point, starts countdown to first rebase \"},\"rebase()\":{\"notice\":\"Initiates a new rebase operation, provided the minimum time period has elapsed.\"},\"setDeviationThreshold(uint256)\":{\"notice\":\"Sets the deviation threshold fraction. If the exchange rate given by the market oracle is within this fractional distance from the targetRate, then no supply modifications are made.\"},\"setMaxSlippageFactor(uint256)\":{\"notice\":\"Updates slippage factor \"},\"setRebaseLag(uint256)\":{\"notice\":\"Sets the rebase lag parameter. It is used to dampen the applied supply adjustment by 1 / rebaseLag If the rebase lag R, equals 1, the smallest value for R, then the full supply correction is applied on each rebase cycle. If it is greater than 1, then a correction of 1/R of is applied on each rebase.\"},\"setRebaseMintPerc(uint256)\":{\"notice\":\"Updates rebase mint percentage \"},\"setRebaseTimingParameters(uint256,uint256,uint256)\":{\"notice\":\"Sets the parameters which control the timing and frequency of rebase operations. a) the minimum time period that must elapse between rebase cycles. b) the rebase window offset parameter. c) the rebase window length parameter.\"},\"setReserveContract(address)\":{\"notice\":\"Updates reserve contract \"},\"setTargetRate(uint256)\":{\"notice\":\"Sets the targetRate parameter.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol\":\"YAMRebaser\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Address.sol\":{\"keccak256\":\"0xfcf985fe775d3891eb6f1df2b0926b13392f7411550fbddbb2a51e2dfb4c328f\",\"urls\":[\"bzz-raw://557db9c06dce45db040c1a8a87cc2100cbaa86b3fd7cbdf49acf983e110673df\",\"dweb:/ipfs/QmVRxJhBro2YT42FkofepMfseF4rxbDFNXySA2doFSf2Lq\"]},\"/Users/brockelmore/YAM/contracts/lib/Babylonian.sol\":{\"keccak256\":\"0xad37a774ad6a438432acb1a475b71b2991a41ba98f1cd814c6d78f9109370a38\",\"urls\":[\"bzz-raw://0f1fbfda71c124ef0436d4e0fe1d0ee9440e2d169ba5ecb890d3d5089ccdd185\",\"dweb:/ipfs/QmXvHC7AfnhNoXEi2tCDRVgHcWuADfHToyCUYZ2tG5Pgen\"]},\"/Users/brockelmore/YAM/contracts/lib/FixedPoint.sol\":{\"keccak256\":\"0x589aacdc69a24cc0500bc13581b34d4431ee972333fa288a9b42a4d14707e003\",\"urls\":[\"bzz-raw://965edb53f5f0d9e23f7878ae95809239b26604420b0111f7b9cb199d21b84afe\",\"dweb:/ipfs/QmYkGQ6xPsNFfdkJr76vGoCehffXspqKyoGZ5utGJoWNuc\"]},\"/Users/brockelmore/YAM/contracts/lib/IERC20.sol\":{\"keccak256\":\"0xb654abe85060b241b440e22ead01dabb724dda69034d49b483e5e3e55ee64400\",\"urls\":[\"bzz-raw://53f67e469e2c4dfc10411d72f465a3c5b85939f1df4b2b26f12deb729f260b04\",\"dweb:/ipfs/QmSNUGpXPcmWNDczauAmUgZsypdcAB2pZNi3B2RGpYVyp2\"]},\"/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol\":{\"keccak256\":\"0x311645a7312f2ef6eaf48ef2837e7f0cf9310ecb99d6400a1a31021c44e0f027\",\"urls\":[\"bzz-raw://99307e4540dbcf1cbdf07f0e25d063d2cdc97890e92b31b555fef7d114eea4e5\",\"dweb:/ipfs/QmYUoD5sGSUTBZWRbDEBpjfWP1VcGp9m3semMf3oGFQHJt\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol\":{\"keccak256\":\"0x00c7887d6e2af7d5971473efbd93d312374d6e8478a6f435d7ec3b62fe62a523\",\"urls\":[\"bzz-raw://787539dc1ebb71a219dee830f1d71188d0b13c2d5f7e7bfd08a3cafa8ec9333c\",\"dweb:/ipfs/QmfFwH2Wt17vqVaeoCMpdXbRUFa3e2Kbm1i6HTybGFXv8h\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol\":{\"keccak256\":\"0x3627b23a33510ccbdf47a9bc92528a78cd58b4ee7732e9a3f2563990ec652da9\",\"urls\":[\"bzz-raw://4d314b46efcc60cca53b1a9f4379d9aeccb744a9911ae5296c17d9cf284b8524\",\"dweb:/ipfs/QmZnSs4mQQw56DKpmnsPfd6PwgMQQHfT8wbyp6smT4pEL5\"]},\"/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol\":{\"keccak256\":\"0x5020a164098821410acc4f760d390551b231ef4d07284ac2da2241ffc37b01a0\",\"urls\":[\"bzz-raw://9581548673a283b4ace6f5d68cdd3cc629bdfa063742e02cf40439c2b04d3db9\",\"dweb:/ipfs/QmdKRFeSbse71QUU5y1MP8kiJH415LyK7EWdZh62h9ecLD\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040516200463b3803806200463b83398101604081905262000034916200026c565b61a8c0600755618ca0600955601080546001600160a01b0319166001600160a01b0383161790556000806200006a86866200015d565b91509150856001600160a01b0316826001600160a01b031614156200009c576014805460ff19166001179055620000a7565b6014805460ff191690555b620000bd8483836001600160e01b03620001f816565b601180546001600160a01b03199081166001600160a01b039384161790915560108054821695831695909517909455600f80548516968216969096179095555050600e8054821694909316939093179091555066c02cea37e26800601355670de0b6b3a7640000600455600a600381905567016345785d8a000060055566b1a2bc2ec50000600655610e10905560018054339216919091179055620004ec565b600080826001600160a01b0316846001600160a01b031614156200019e5760405162461bcd60e51b8152600401620001959062000470565b60405180910390fd5b826001600160a01b0316846001600160a01b031610620001c0578284620001c3565b83835b90925090506001600160a01b038216620001f15760405162461bcd60e51b8152600401620001959062000482565b9250929050565b60008383836040516020016200021092919062000400565b60405160208183030381529060405280519060200120604051602001620002399291906200042a565b60408051601f198184030181529190528051602090910120949350505050565b80516200026681620004d2565b92915050565b600080600080608085870312156200028357600080fd5b600062000291878762000259565b9450506020620002a48782880162000259565b9350506040620002b78782880162000259565b9250506060620002ca8782880162000259565b91505092959194509250565b620002eb620002e582620004a2565b620004be565b82525050565b620002eb6200030082620004af565b620004af565b60006200031560258362000494565b7f556e697377617056324c6962726172793a204944454e544943414c5f41444452815264455353455360d81b602082015260400192915050565b60006200035e6020836200049d565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f815260200192915050565b6000620003996001836200049d565b7fff00000000000000000000000000000000000000000000000000000000000000815260010192915050565b6000620003d4601e8362000494565b7f556e697377617056324c6962726172793a205a45524f5f414444524553530000815260200192915050565b60006200040e8285620002d6565b601482019150620004208284620002d6565b5060140192915050565b600062000437826200038a565b9150620004458285620002d6565b601482019150620004578284620002f1565b60208201915062000468826200034f565b949350505050565b60208082528101620002668162000306565b602080825281016200026681620003c5565b90815260200190565b919050565b60006200026682620004b2565b90565b6001600160a01b031690565b600062000266826000620002668260601b90565b620004dd81620004a2565b8114620004e957600080fd5b50565b61413f80620004fc6000396000f3fe608060405234801561001057600080fd5b50600436106102c85760003560e01c80636406ca5f1161017b578063c4c6eaad116100d8578063cf1b927e1161008c578063d94ad83711610071578063d94ad837146104d2578063dcf93f32146104da578063f4325d67146104e2576102c8565b8063cf1b927e146104c2578063d72cdafc146104ca576102c8565b8063cc8fd393116100bd578063cc8fd3931461049f578063cd877826146104a7578063cdabdaac146104af576102c8565b8063c4c6eaad14610482578063c5700a021461048a576102c8565b8063900cf0cf1161012f5780639ace38c2116101145780639ace38c214610445578063af14052c14610467578063b60e1e3e1461046f576102c8565b8063900cf0cf146104355780639466120f1461043d576102c8565b80636e9dde99116101605780636e9dde99146104075780637052b9021461041a57806373f03dff14610422576102c8565b80636406ca5f146103ec5780636bf9ace7146103f4576102c8565b80633a68eaf6116102295780634e66f8ae116101dd57806353a15edc116101c257806353a15edc146103c957806357466c8b146103dc57806363f6d4c8146103e4576102c8565b80634e66f8ae146103ae578063527a52c8146103b6576102c8565b806346c3bd1f1161020e57806346c3bd1f1461038b5780634bda2e201461039e5780634dc95de1146103a6576102c8565b80633a68eaf61461037b5780633a93069b14610383576102c8565b806316250fd41161028057806320ce83891161026557806320ce838914610358578063252408101461036b5780632f43c1bc14610373576102c8565b806316250fd41461033d5780631cab801c14610350576102c8565b8063111d0498116102b1578063111d049814610300578063126e19be1461031557806312d43a5114610328576102c8565b806302101899146102cd57806310d1e85c146102eb575b600080fd5b6102d56104ea565b6040516102e29190613ec7565b60405180910390f35b6102fe6102f93660046132f8565b6104f0565b005b6103086109ba565b6040516102e29190613cc0565b6102fe6103233660046132a2565b6109cb565b610330610b0d565b6040516102e29190613c54565b6102fe61034b366004613470565b610b29565b6102d5610b74565b6102fe6103663660046133fa565b610b7a565b610330610bb0565b6102d5610bcc565b610330610bd2565b6102d5610bee565b6102fe6103993660046133fa565b610bf4565b6102fe610dd5565b610308610eb8565b6102fe610ec1565b6102fe6103c4366004613284565b610f6a565b6102fe6103d73660046133fa565b611012565b6102fe61107f565b6102d5611181565b6102d5611187565b6102fe6104023660046133fa565b61118d565b6102fe610415366004613436565b6111eb565b6102d5611299565b6102fe610430366004613284565b61129f565b6102d561133b565b6102d5611341565b6104586104533660046133fa565b611347565b6040516102e293929190613cce565b6102fe611437565b6102fe61047d3660046133fa565b611918565b610330611976565b610492611992565b6040516102e29190613f7b565b6102d56119b6565b6102d56119bc565b6102fe6104bd3660046133fa565b6119c2565b6102d56119f8565b6103306119fe565b6102d5611a1a565b610308611a20565b610330611a29565b60075481565b60115473ffffffffffffffffffffffffffffffffffffffff16331461054a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e49565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84163014610599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613ea9565b6105a1612f2d565b818060200190516105b5919081019061338f565b600e54602082015191925073ffffffffffffffffffffffffffffffffffffffff1690156107505760105460115460208401516040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616946323b872dd9461063f9491831693921691600401613c7d565b602060405180830381600087803b15801561065957600080fd5b505af115801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506106919190810190613371565b5081516020830151101561074b576011546020830151835173ffffffffffffffffffffffffffffffffffffffff808516936340c10f19939116916106da9163ffffffff611a4516565b6040518363ffffffff1660e01b81526004016106f7929190613ca5565b602060405180830381600087803b15801561071157600080fd5b505af1158015610725573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107499190810190613371565b505b6107ff565b60115482516040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f19936107ab939290911691600401613ca5565b602060405180830381600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107fd9190810190613371565b505b6040820151156108bb5760105460408381015190517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f1993610867939290911691600401613ca5565b602060405180830381600087803b15801561088157600080fd5b505af1158015610895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108b99190810190613371565b505b60145460ff161561093e57600f546010546108f09173ffffffffffffffffffffffffffffffffffffffff908116911686611a90565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350848360000151846020015185604001516040516109319493929190613f46565b60405180910390a16109b2565b600f546010546109689173ffffffffffffffffffffffffffffffffffffffff908116911687611a90565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350858360000151846020015185604001516040516109a99493929190613f46565b60405180910390a15b505050505050565b60006109c4611b52565b5060015b90565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109ef57600080fd5b600060405180606001604052806001151581526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505083546001818101808755958352602092839020855160029093020180548487015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9415157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179390931692909217825560408501518051929450610b049391850192910190612f4e565b50505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b4d57600080fd5b60008311610b5a57600080fd5b828210610b6657600080fd5b600792909255600955600a55565b60055481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b9e57600080fd5b60008111610bab57600080fd5b600355565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60125481565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610c1857600080fd5b6000548110610c53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e79565b6000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01811015610da057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610caf57fe5b906000526020600020906002020160008281548110610cca57fe5b600091825260209091208254600292830290910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921615159190911780825583547fffffffffffffffffffffff0000000000000000000000000000000000000000ff9091166101009182900473ffffffffffffffffffffffffffffffffffffffff168202178255600180850180549394610d9c948387019492938116159092027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190911604612fcc565b5050505b6000805490610dd1907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301613041565b5050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613dd9565b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff83811691909117958690559116909155604051918116927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d552392610ead9285921690613c62565b60405180910390a150565b600c5460ff1681565b6000600d5411610efd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d59565b61a8c0600d5401421015610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d99565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f8e57600080fd5b6010805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907fce840d2205f08f33375689943da5da9fdfde146fcbb5553b17910a60c8284a20906110069083908590613c62565b60405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461103657600080fd5b60006006541161104557600080fd5b60068054908290556040517f2a5cda4d16fba415b52d90b59ee30d4cb16494da9fd1ee51c4d5bac4a1f75bbe906110069083908590613f10565b600d54156110b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e69565b60115460145460009182916110e79173ffffffffffffffffffffffffffffffffffffffff169060ff16611c3f565b9150915060008163ffffffff161161112b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d89565b601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff93909316928302179055601291909155600d55565b60035481565b61a8c081565b60015473ffffffffffffffffffffffffffffffffffffffff1633146111b157600080fd5b60058054908290556040517f59b3ffce759ec92c629beee27554d8fbc2ca1a05020fa0cf500c890c172094be906110069083908590613f10565b60015473ffffffffffffffffffffffffffffffffffffffff16331461120f57600080fd5b600054821061124a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d79565b806000838154811061125857fe5b6000918252602090912060029091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555050565b60095481565b60015473ffffffffffffffffffffffffffffffffffffffff1633146112c357600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e906110069083908590613c62565b600b5481565b600a5481565b6000818154811061135457fe5b6000918252602091829020600291820201805460018083018054604080516101009483161585027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921696909604601f810188900488028201880190965285815260ff841697509190920473ffffffffffffffffffffffffffffffffffffffff16949293909283018282801561142d5780601f106114025761010080835404028352916020019161142d565b820191906000526020600020905b81548152906001019060200180831161141057829003601f168201915b5050505050905083565b61143f611b52565b42611457600754600854611e8690919063ffffffff16565b1061146157600080fd5b61149860095461148c61147f60075442611ec590919063ffffffff16565b429063ffffffff611a4516565b9063ffffffff611e8616565b600855600b546114af90600163ffffffff611e8616565b600b5560006114bc611f07565b90506000806114ca8361202d565b600354919350915082906114e590829063ffffffff6120b016565b600e5490915073ffffffffffffffffffffffffffffffffffffffff168215611671578073ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561154d57600080fd5b505afa158015611561573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506115859190810190613418565b61163a670de0b6b3a764000061162e6115a4828763ffffffff611e8616565b8573ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ea57600080fd5b505afa1580156115fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116229190810190613418565b9063ffffffff6120f216565b9063ffffffff6120b016565b10611671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613db9565b60008173ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116b957600080fd5b505afa1580156116cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116f19190810190613418565b90506000841561175257600061171e670de0b6b3a764000061162e600554886120f290919063ffffffff16565b9050611730858263ffffffff611a4516565b945061174e670de0b6b3a764000061162e858463ffffffff6120f216565b9150505b600b546040517f7af548c100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff861691637af548c1916117ac9189908b90600401613f1e565b602060405180830381600087803b1580156117c657600080fd5b505af11580156117da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117fe9190810190613418565b90508373ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561184657600080fd5b505afa15801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061187e9190810190613418565b8473ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506118fc9190810190613418565b111561190457fe5b61190e8288612146565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461193c57600080fd5b60138054908290556040517fe21b25c4eda0340cd924f3247795d0acde6c304b68ae77657bb2d4e840198bf8906110069083908590613f10565b60115473ffffffffffffffffffffffffffffffffffffffff1681565b60115474010000000000000000000000000000000000000000900463ffffffff1681565b60045481565b600d5481565b60015473ffffffffffffffffffffffffffffffffffffffff1633146119e657600080fd5b600081116119f357600080fd5b600455565b60135481565b600e5473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60145460ff1681565b600f5473ffffffffffffffffffffffffffffffffffffffff1681565b6000611a8783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612389565b90505b92915050565b604051611b4d9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090611acb9086908690602401613ca5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526123d4565b505050565b600c5460ff16611b8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613de9565b600954600754611ba590429063ffffffff611ec516565b1015611bdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e19565b600a54600954611bf29163ffffffff611e8616565b600754611c0690429063ffffffff611ec516565b10611c3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e29565b565b600080611c4a61248a565b905060008060008673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611c9757600080fd5b505afa158015611cab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ccf91908101906133ad565b9250925092508515611dae578673ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2157600080fd5b505afa158015611d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d599190810190613418565b94508363ffffffff168163ffffffff1614611da95780840363ffffffff8116611d828486612494565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b611e7c565b8673ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015611df457600080fd5b505afa158015611e08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e2c9190810190613418565b94508363ffffffff168163ffffffff1614611e7c5780840363ffffffff8116611e558486612494565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509250929050565b600082820183811015611a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d69565b6000611a8783836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612557565b60115460145460009182918291611f399173ffffffffffffffffffffffffffffffffffffffff9091169060ff16611c3f565b601154919350915074010000000000000000000000000000000000000000900463ffffffff168103611f6961306d565b60405180602001604052808363ffffffff16601254870381611f8757fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690526012859055601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff871602179055905061201061200b82670de0b6b3a76400006125a5565b612633565b71ffffffffffffffffffffffffffffffffffff1694505050505090565b6000806120398361263a565b15612049575060009050806120ab565b600454831115612081576004546120769061162e670de0b6b3a7640000611622878463ffffffff611a4516565b6001915091506120ab565b6004546120a49061162e670de0b6b3a7640000611622838863ffffffff611a4516565b6000915091505b915091565b6000611a8783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126b6565b60008261210157506000611a8a565b8282028284828161210e57fe5b0414611a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613dc9565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156121b057600080fd5b505af11580156121c4573d6000803e3d6000fd5b5050505060008211156121db576121db8282612707565b60005b600054811015611b4d5760008082815481106121f657fe5b60009182526020909120600290910201805490915060ff16156123805780546001808301805460408051602060026101009685161587027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181526000956122e995900473ffffffffffffffffffffffffffffffffffffffff169390929091908301828280156122df5780601f106122b4576101008083540402835291602001916122df565b820191906000526020600020905b8154815290600101906020018083116122c257829003601f168201915b5050505050612c67565b90508061237e57815460405161010090910473ffffffffffffffffffffffffffffffffffffffff16907f8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c263906123449086906001870190613ed5565b60405180910390a26040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e89565b505b506001016121de565b600081848411156123c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b50508183035b9392505050565b6060612436826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612c8a9092919063ffffffff16565b805190915015611b4d57808060200190516124549190810190613371565b611b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e39565b63ffffffff421690565b61249c61306d565b6000826dffffffffffffffffffffffffffff16116124e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e99565b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b168161252d57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b60008183612592576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b5082848161259c57fe5b06949350505050565b6125ad61307f565b60008215806125e857505082517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16828102908382816125e557fe5b04145b61261e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613df9565b60408051602081019091529081529392505050565b5160701c90565b600080612660670de0b6b3a764000061162e6006546004546120f290919063ffffffff16565b9050600454831015801561268757508061268560045485611a4590919063ffffffff16565b105b806123cd5750600454831080156123cd575060045481906126ae908563ffffffff611a4516565b109392505050565b600081836126f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b5060008385816126fd57fe5b0495945050505050565b601154600e54604080517f0902f1ac000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416939092169160009182918591630902f1ac916004808301926060929190829003018186803b15801561277f57600080fd5b505afa158015612793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506127b791908101906133ad565b506010546040517f70a082310000000000000000000000000000000000000000000000000000000081526dffffffffffffffffffffffffffff938416955091909216925060009173ffffffffffffffffffffffffffffffffffffffff808716926370a082319261282b921690600401613c54565b60206040518083038186803b15801561284357600080fd5b505afa158015612857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061287b9190810190613418565b9050600061288a848489612ca1565b9050612894612f2d565b50604080516060810182528281526020810184905260009181019190915260145460ff1615612aab576128cd898463ffffffff611e8616565b82111561298d5760006128e3848b018787612d48565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f916000918591309161292791899101613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016129559493929190613d04565b600060405180830381600087803b15801561296f57600080fd5b505af1158015612983573d6000803e3d6000fd5b5050505050612aa6565b828211156129f05760006129a2838787612d48565b90506129b68a85850363ffffffff611a4516565b8260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008330866040516020016129279190613eb9565b60006129fd838787612d48565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f6000833086604051602001612a449190613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612a729493929190613d04565b600060405180830381600087803b158015612a8c57600080fd5b505af1158015612aa0573d6000803e3d6000fd5b50505050505b612c5c565b612abb898463ffffffff611e8616565b821115612b43576000612ad1848b018688612d48565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f9184916000913091612b1591899101613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612a729493929190613ef5565b82821115612ba6576000612b58838688612d48565b9050612b6c8a85850363ffffffff611a4516565b8260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612b159190613eb9565b6000612bb3838688612d48565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612bfa9190613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612c289493929190613ef5565b600060405180830381600087803b158015612c4257600080fd5b505af1158015612c56573d6000803e3d6000fd5b50505050505b505050505050505050565b6000806040516020840160008286518360008a6187965a03f19695505050505050565b6060612c998484600085612e22565b949350505050565b60145460009060ff1615612cff5767016345785d8a00008210612ce657612cdf670de0b6b3a764000061162e601354876120f290919063ffffffff16565b90506123cd565b612cdf670de0b6b3a764000061162e86600386046120f2565b67016345785d8a00008210612d2f57612cdf670de0b6b3a764000061162e601354866120f290919063ffffffff16565b612cdf670de0b6b3a764000061162e85600386046120f2565b6000808411612d83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e59565b600083118015612d935750600082115b612dc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613da9565b6000612ddd856103e563ffffffff6120f216565b90506000612df1828563ffffffff6120f216565b90506000612e0b8361148c886103e863ffffffff6120f216565b9050808281612e1657fe5b04979650505050505050565b6060612e2d85612f27565b612e63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e09565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612e8d9190613c48565b60006040518083038185875af1925050503d8060008114612eca576040519150601f19603f3d011682016040523d82523d6000602084013e612ecf565b606091505b50915091508115612ee3579150612c999050565b805115612ef35780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b3b151590565b60405180606001604052806000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f8f57805160ff1916838001178555612fbc565b82800160010185558215612fbc579182015b82811115612fbc578251825591602001919060010190612fa1565b50612fc8929150613092565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106130055780548555612fbc565b82800160010185558215612fbc57600052602060002091601f016020900482015b82811115612fbc578254825591600101919060010190613026565b815481835581811115611b4d57600202816002028360005260206000209182019101611b4d91906130ac565b60408051602081019091526000815290565b6040518060200160405280600081525090565b6109c891905b80821115612fc85760008155600101613098565b6109c891905b80821115612fc85780547fffffffffffffffffffffff00000000000000000000000000000000000000000016815560006130ef60018301826130f8565b506002016130b2565b50805460018160011615610100020316600290046000825580601f1061311e575061313c565b601f01602090049060005260206000209081019061313c9190613092565b50565b8035611a8a816140c4565b8035611a8a816140d8565b8051611a8a816140d8565b60008083601f84011261317257600080fd5b50813567ffffffffffffffff81111561318a57600080fd5b6020830191508360018202830111156131a257600080fd5b9250929050565b600082601f8301126131ba57600080fd5b81356131cd6131c882613fb0565b613f89565b915080825260208301602083018583830111156131e957600080fd5b6131f4838284614064565b50505092915050565b60006060828403121561320f57600080fd5b6132196060613f89565b90506000613227848461326e565b82525060206132388484830161326e565b602083015250604061324c8482850161326e565b60408301525092915050565b8051611a8a816140e1565b8035611a8a816140ea565b8051611a8a816140ea565b8051611a8a816140f3565b60006020828403121561329657600080fd5b6000612c99848461313f565b6000806000604084860312156132b757600080fd5b60006132c3868661313f565b935050602084013567ffffffffffffffff8111156132e057600080fd5b6132ec86828701613160565b92509250509250925092565b6000806000806080858703121561330e57600080fd5b600061331a878761313f565b945050602061332b87828801613263565b935050604061333c87828801613263565b925050606085013567ffffffffffffffff81111561335957600080fd5b613365878288016131a9565b91505092959194509250565b60006020828403121561338357600080fd5b6000612c998484613155565b6000606082840312156133a157600080fd5b6000612c9984846131fd565b6000806000606084860312156133c257600080fd5b60006133ce8686613258565b93505060206133df86828701613258565b92505060406133f086828701613279565b9150509250925092565b60006020828403121561340c57600080fd5b6000612c998484613263565b60006020828403121561342a57600080fd5b6000612c99848461326e565b6000806040838503121561344957600080fd5b60006134558585613263565b92505060206134668582860161314a565b9150509250929050565b60008060006060848603121561348557600080fd5b60006134918686613263565b93505060206134a286828701613263565b92505060406133f086828701613263565b6134bc81614014565b82525050565b6134bc8161401f565b60006134d682614002565b6134e08185614006565b93506134f0818560208601614070565b6134f98161409c565b9093019392505050565b600061350e82614002565b613518818561400f565b9350613528818560208601614070565b9290920192915050565b60008154600181166000811461354f5760018114613593576135d2565b607f60028304166135608187614006565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841681529550506020850192506135d2565b600282046135a18187614006565b95506135ac85613ff6565b60005b828110156135cb578154888201526001909101906020016135af565b8701945050505b505092915050565b6134bc81614059565b60006135f0602783614006565b7f74776170207761736e7420696e74697469617465642c2063616c6c20696e697481527f5f74776170282900000000000000000000000000000000000000000000000000602082015260400192915050565b600061364f601b83614006565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000613688602883614006565b7f696e646578206d75737420626520696e2072616e6765206f662073746f72656481527f207478206c697374000000000000000000000000000000000000000000000000602082015260400192915050565b60006136e7600983614006565b7f6e6f207472616465730000000000000000000000000000000000000000000000815260200192915050565b6000613720600a83614006565b7f21656e645f64656c617900000000000000000000000000000000000000000000815260200192915050565b6000613759602883614006565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4c81527f4951554944495459000000000000000000000000000000000000000000000000602082015260400192915050565b60006137b8602283614006565b7f6e6577207363616c696e6720666163746f722077696c6c20626520746f6f206281527f6967000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613817602183614006565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f81527f7700000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613876600883614006565b7f2170656e64696e67000000000000000000000000000000000000000000000000815260200192915050565b60006138af601383614006565b7f7265626173696e67206e6f742061637469766500000000000000000000000000815260200192915050565b60006138e8602383614006565b7f4669786564506f696e743a204d554c5449504c49434154494f4e5f4f5645524681527f4c4f570000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613947601d83614006565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815260200192915050565b6000613980600983614006565b7f746f6f206561726c790000000000000000000000000000000000000000000000815260200192915050565b60006139b9600883614006565b7f746f6f206c617465000000000000000000000000000000000000000000000000815260200192915050565b60006139f2602a83614006565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e81527f6f74207375636365656400000000000000000000000000000000000000000000602082015260400192915050565b6000613a51600e83614006565b7f626164206d73672e73656e646572000000000000000000000000000000000000815260200192915050565b6000613a8a602b83614006565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4981527f4e5055545f414d4f554e54000000000000000000000000000000000000000000602082015260400192915050565b6000613ae9601183614006565b7f616c726561647920616374697661746564000000000000000000000000000000815260200192915050565b6000613b22601383614006565b7f696e646578206f7574206f6620626f756e647300000000000000000000000000815260200192915050565b6000613b5b601283614006565b7f5472616e73616374696f6e204661696c65640000000000000000000000000000815260200192915050565b6000613b94601783614006565b7f4669786564506f696e743a204449565f42595f5a45524f000000000000000000815260200192915050565b6000613bcd600a83614006565b7f626164206f726967696e00000000000000000000000000000000000000000000815260200192915050565b80516060830190613c0a8482613c36565b506020820151613c1d6020850182613c36565b506040820151613c306040850182613c36565b50505050565b6134bc816109c8565b6134bc81614050565b60006123cd8284613503565b60208101611a8a82846134b3565b60408101613c7082856134b3565b6123cd60208301846134b3565b60608101613c8b82866134b3565b613c9860208301856134b3565b612c996040830184613c36565b60408101613cb382856134b3565b6123cd6020830184613c36565b60208101611a8a82846134c2565b60608101613cdc82866134c2565b613ce960208301856134b3565b8181036040830152613cfb81846134cb565b95945050505050565b60808101613d1282876135da565b613d1f6020830186613c36565b613d2c60408301856134b3565b8181036060830152613d3e81846134cb565b9695505050505050565b60208082528101611a8781846134cb565b60208082528101611a8a816135e3565b60208082528101611a8a81613642565b60208082528101611a8a8161367b565b60208082528101611a8a816136da565b60208082528101611a8a81613713565b60208082528101611a8a8161374c565b60208082528101611a8a816137ab565b60208082528101611a8a8161380a565b60208082528101611a8a81613869565b60208082528101611a8a816138a2565b60208082528101611a8a816138db565b60208082528101611a8a8161393a565b60208082528101611a8a81613973565b60208082528101611a8a816139ac565b60208082528101611a8a816139e5565b60208082528101611a8a81613a44565b60208082528101611a8a81613a7d565b60208082528101611a8a81613adc565b60208082528101611a8a81613b15565b60208082528101611a8a81613b4e565b60208082528101611a8a81613b87565b60208082528101611a8a81613bc0565b60608101611a8a8284613bf9565b60208101611a8a8284613c36565b60408101613ee38285613c36565b8181036020830152612c998184613532565b60808101613f038287613c36565b613d1f60208301866135da565b60408101613cb38285613c36565b60608101613f2c8286613c36565b613f396020830185613c36565b612c9960408301846134c2565b60808101613f548287613c36565b613f616020830186613c36565b613f6e6040830185613c36565b613cfb6060830184613c36565b60208101611a8a8284613c3f565b60405181810167ffffffffffffffff81118282101715613fa857600080fd5b604052919050565b600067ffffffffffffffff821115613fc757600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60009081526020902090565b5190565b90815260200190565b919050565b6000611a8a82614037565b151590565b6dffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b63ffffffff1690565b6000611a8a826109c8565b82818337506000910152565b60005b8381101561408b578181015183820152602001614073565b83811115613c305750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6140cd81614014565b811461313c57600080fd5b6140cd8161401f565b6140cd81614024565b6140cd816109c8565b6140cd8161405056fea365627a7a72315820d97bd42e61e1eebc1918658ec6a4fb91a7f96c26b253241020d67b3ec49dff336c6578706572696d656e74616cf564736f6c63430005110040", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102c85760003560e01c80636406ca5f1161017b578063c4c6eaad116100d8578063cf1b927e1161008c578063d94ad83711610071578063d94ad837146104d2578063dcf93f32146104da578063f4325d67146104e2576102c8565b8063cf1b927e146104c2578063d72cdafc146104ca576102c8565b8063cc8fd393116100bd578063cc8fd3931461049f578063cd877826146104a7578063cdabdaac146104af576102c8565b8063c4c6eaad14610482578063c5700a021461048a576102c8565b8063900cf0cf1161012f5780639ace38c2116101145780639ace38c214610445578063af14052c14610467578063b60e1e3e1461046f576102c8565b8063900cf0cf146104355780639466120f1461043d576102c8565b80636e9dde99116101605780636e9dde99146104075780637052b9021461041a57806373f03dff14610422576102c8565b80636406ca5f146103ec5780636bf9ace7146103f4576102c8565b80633a68eaf6116102295780634e66f8ae116101dd57806353a15edc116101c257806353a15edc146103c957806357466c8b146103dc57806363f6d4c8146103e4576102c8565b80634e66f8ae146103ae578063527a52c8146103b6576102c8565b806346c3bd1f1161020e57806346c3bd1f1461038b5780634bda2e201461039e5780634dc95de1146103a6576102c8565b80633a68eaf61461037b5780633a93069b14610383576102c8565b806316250fd41161028057806320ce83891161026557806320ce838914610358578063252408101461036b5780632f43c1bc14610373576102c8565b806316250fd41461033d5780631cab801c14610350576102c8565b8063111d0498116102b1578063111d049814610300578063126e19be1461031557806312d43a5114610328576102c8565b806302101899146102cd57806310d1e85c146102eb575b600080fd5b6102d56104ea565b6040516102e29190613ec7565b60405180910390f35b6102fe6102f93660046132f8565b6104f0565b005b6103086109ba565b6040516102e29190613cc0565b6102fe6103233660046132a2565b6109cb565b610330610b0d565b6040516102e29190613c54565b6102fe61034b366004613470565b610b29565b6102d5610b74565b6102fe6103663660046133fa565b610b7a565b610330610bb0565b6102d5610bcc565b610330610bd2565b6102d5610bee565b6102fe6103993660046133fa565b610bf4565b6102fe610dd5565b610308610eb8565b6102fe610ec1565b6102fe6103c4366004613284565b610f6a565b6102fe6103d73660046133fa565b611012565b6102fe61107f565b6102d5611181565b6102d5611187565b6102fe6104023660046133fa565b61118d565b6102fe610415366004613436565b6111eb565b6102d5611299565b6102fe610430366004613284565b61129f565b6102d561133b565b6102d5611341565b6104586104533660046133fa565b611347565b6040516102e293929190613cce565b6102fe611437565b6102fe61047d3660046133fa565b611918565b610330611976565b610492611992565b6040516102e29190613f7b565b6102d56119b6565b6102d56119bc565b6102fe6104bd3660046133fa565b6119c2565b6102d56119f8565b6103306119fe565b6102d5611a1a565b610308611a20565b610330611a29565b60075481565b60115473ffffffffffffffffffffffffffffffffffffffff16331461054a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e49565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84163014610599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613ea9565b6105a1612f2d565b818060200190516105b5919081019061338f565b600e54602082015191925073ffffffffffffffffffffffffffffffffffffffff1690156107505760105460115460208401516040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616946323b872dd9461063f9491831693921691600401613c7d565b602060405180830381600087803b15801561065957600080fd5b505af115801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506106919190810190613371565b5081516020830151101561074b576011546020830151835173ffffffffffffffffffffffffffffffffffffffff808516936340c10f19939116916106da9163ffffffff611a4516565b6040518363ffffffff1660e01b81526004016106f7929190613ca5565b602060405180830381600087803b15801561071157600080fd5b505af1158015610725573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107499190810190613371565b505b6107ff565b60115482516040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f19936107ab939290911691600401613ca5565b602060405180830381600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107fd9190810190613371565b505b6040820151156108bb5760105460408381015190517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116936340c10f1993610867939290911691600401613ca5565b602060405180830381600087803b15801561088157600080fd5b505af1158015610895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108b99190810190613371565b505b60145460ff161561093e57600f546010546108f09173ffffffffffffffffffffffffffffffffffffffff908116911686611a90565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350848360000151846020015185604001516040516109319493929190613f46565b60405180910390a16109b2565b600f546010546109689173ffffffffffffffffffffffffffffffffffffffff908116911687611a90565b7fb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350858360000151846020015185604001516040516109a99493929190613f46565b60405180910390a15b505050505050565b60006109c4611b52565b5060015b90565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109ef57600080fd5b600060405180606001604052806001151581526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505083546001818101808755958352602092839020855160029093020180548487015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9415157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179390931692909217825560408501518051929450610b049391850192910190612f4e565b50505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b4d57600080fd5b60008311610b5a57600080fd5b828210610b6657600080fd5b600792909255600955600a55565b60055481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b9e57600080fd5b60008111610bab57600080fd5b600355565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60125481565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610c1857600080fd5b6000548110610c53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e79565b6000547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01811015610da057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610caf57fe5b906000526020600020906002020160008281548110610cca57fe5b600091825260209091208254600292830290910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921615159190911780825583547fffffffffffffffffffffff0000000000000000000000000000000000000000ff9091166101009182900473ffffffffffffffffffffffffffffffffffffffff168202178255600180850180549394610d9c948387019492938116159092027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190911604612fcc565b5050505b6000805490610dd1907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301613041565b5050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613dd9565b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff83811691909117958690559116909155604051918116927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d552392610ead9285921690613c62565b60405180910390a150565b600c5460ff1681565b6000600d5411610efd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d59565b61a8c0600d5401421015610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d99565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f8e57600080fd5b6010805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907fce840d2205f08f33375689943da5da9fdfde146fcbb5553b17910a60c8284a20906110069083908590613c62565b60405180910390a15050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461103657600080fd5b60006006541161104557600080fd5b60068054908290556040517f2a5cda4d16fba415b52d90b59ee30d4cb16494da9fd1ee51c4d5bac4a1f75bbe906110069083908590613f10565b600d54156110b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e69565b60115460145460009182916110e79173ffffffffffffffffffffffffffffffffffffffff169060ff16611c3f565b9150915060008163ffffffff161161112b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d89565b601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff93909316928302179055601291909155600d55565b60035481565b61a8c081565b60015473ffffffffffffffffffffffffffffffffffffffff1633146111b157600080fd5b60058054908290556040517f59b3ffce759ec92c629beee27554d8fbc2ca1a05020fa0cf500c890c172094be906110069083908590613f10565b60015473ffffffffffffffffffffffffffffffffffffffff16331461120f57600080fd5b600054821061124a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d79565b806000838154811061125857fe5b6000918252602090912060029091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555050565b60095481565b60015473ffffffffffffffffffffffffffffffffffffffff1633146112c357600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff00000000000000000000000000000000000000008316179092556040519116907f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e906110069083908590613c62565b600b5481565b600a5481565b6000818154811061135457fe5b6000918252602091829020600291820201805460018083018054604080516101009483161585027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921696909604601f810188900488028201880190965285815260ff841697509190920473ffffffffffffffffffffffffffffffffffffffff16949293909283018282801561142d5780601f106114025761010080835404028352916020019161142d565b820191906000526020600020905b81548152906001019060200180831161141057829003601f168201915b5050505050905083565b61143f611b52565b42611457600754600854611e8690919063ffffffff16565b1061146157600080fd5b61149860095461148c61147f60075442611ec590919063ffffffff16565b429063ffffffff611a4516565b9063ffffffff611e8616565b600855600b546114af90600163ffffffff611e8616565b600b5560006114bc611f07565b90506000806114ca8361202d565b600354919350915082906114e590829063ffffffff6120b016565b600e5490915073ffffffffffffffffffffffffffffffffffffffff168215611671578073ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561154d57600080fd5b505afa158015611561573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506115859190810190613418565b61163a670de0b6b3a764000061162e6115a4828763ffffffff611e8616565b8573ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ea57600080fd5b505afa1580156115fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116229190810190613418565b9063ffffffff6120f216565b9063ffffffff6120b016565b10611671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613db9565b60008173ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116b957600080fd5b505afa1580156116cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116f19190810190613418565b90506000841561175257600061171e670de0b6b3a764000061162e600554886120f290919063ffffffff16565b9050611730858263ffffffff611a4516565b945061174e670de0b6b3a764000061162e858463ffffffff6120f216565b9150505b600b546040517f7af548c100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff861691637af548c1916117ac9189908b90600401613f1e565b602060405180830381600087803b1580156117c657600080fd5b505af11580156117da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117fe9190810190613418565b90508373ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b15801561184657600080fd5b505afa15801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061187e9190810190613418565b8473ffffffffffffffffffffffffffffffffffffffff1663b6fa85766040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506118fc9190810190613418565b111561190457fe5b61190e8288612146565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461193c57600080fd5b60138054908290556040517fe21b25c4eda0340cd924f3247795d0acde6c304b68ae77657bb2d4e840198bf8906110069083908590613f10565b60115473ffffffffffffffffffffffffffffffffffffffff1681565b60115474010000000000000000000000000000000000000000900463ffffffff1681565b60045481565b600d5481565b60015473ffffffffffffffffffffffffffffffffffffffff1633146119e657600080fd5b600081116119f357600080fd5b600455565b60135481565b600e5473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60145460ff1681565b600f5473ffffffffffffffffffffffffffffffffffffffff1681565b6000611a8783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612389565b90505b92915050565b604051611b4d9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090611acb9086908690602401613ca5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526123d4565b505050565b600c5460ff16611b8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613de9565b600954600754611ba590429063ffffffff611ec516565b1015611bdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e19565b600a54600954611bf29163ffffffff611e8616565b600754611c0690429063ffffffff611ec516565b10611c3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e29565b565b600080611c4a61248a565b905060008060008673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611c9757600080fd5b505afa158015611cab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ccf91908101906133ad565b9250925092508515611dae578673ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2157600080fd5b505afa158015611d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d599190810190613418565b94508363ffffffff168163ffffffff1614611da95780840363ffffffff8116611d828486612494565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b611e7c565b8673ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015611df457600080fd5b505afa158015611e08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e2c9190810190613418565b94508363ffffffff168163ffffffff1614611e7c5780840363ffffffff8116611e558486612494565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509250929050565b600082820183811015611a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613d69565b6000611a8783836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612557565b60115460145460009182918291611f399173ffffffffffffffffffffffffffffffffffffffff9091169060ff16611c3f565b601154919350915074010000000000000000000000000000000000000000900463ffffffff168103611f6961306d565b60405180602001604052808363ffffffff16601254870381611f8757fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690526012859055601180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff871602179055905061201061200b82670de0b6b3a76400006125a5565b612633565b71ffffffffffffffffffffffffffffffffffff1694505050505090565b6000806120398361263a565b15612049575060009050806120ab565b600454831115612081576004546120769061162e670de0b6b3a7640000611622878463ffffffff611a4516565b6001915091506120ab565b6004546120a49061162e670de0b6b3a7640000611622838863ffffffff611a4516565b6000915091505b915091565b6000611a8783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126b6565b60008261210157506000611a8a565b8282028284828161210e57fe5b0414611a87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613dc9565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156121b057600080fd5b505af11580156121c4573d6000803e3d6000fd5b5050505060008211156121db576121db8282612707565b60005b600054811015611b4d5760008082815481106121f657fe5b60009182526020909120600290910201805490915060ff16156123805780546001808301805460408051602060026101009685161587027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181526000956122e995900473ffffffffffffffffffffffffffffffffffffffff169390929091908301828280156122df5780601f106122b4576101008083540402835291602001916122df565b820191906000526020600020905b8154815290600101906020018083116122c257829003601f168201915b5050505050612c67565b90508061237e57815460405161010090910473ffffffffffffffffffffffffffffffffffffffff16907f8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c263906123449086906001870190613ed5565b60405180910390a26040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e89565b505b506001016121de565b600081848411156123c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b50508183035b9392505050565b6060612436826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612c8a9092919063ffffffff16565b805190915015611b4d57808060200190516124549190810190613371565b611b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e39565b63ffffffff421690565b61249c61306d565b6000826dffffffffffffffffffffffffffff16116124e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e99565b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b168161252d57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b60008183612592576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b5082848161259c57fe5b06949350505050565b6125ad61307f565b60008215806125e857505082517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16828102908382816125e557fe5b04145b61261e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613df9565b60408051602081019091529081529392505050565b5160701c90565b600080612660670de0b6b3a764000061162e6006546004546120f290919063ffffffff16565b9050600454831015801561268757508061268560045485611a4590919063ffffffff16565b105b806123cd5750600454831080156123cd575060045481906126ae908563ffffffff611a4516565b109392505050565b600081836126f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b5060008385816126fd57fe5b0495945050505050565b601154600e54604080517f0902f1ac000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff938416939092169160009182918591630902f1ac916004808301926060929190829003018186803b15801561277f57600080fd5b505afa158015612793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506127b791908101906133ad565b506010546040517f70a082310000000000000000000000000000000000000000000000000000000081526dffffffffffffffffffffffffffff938416955091909216925060009173ffffffffffffffffffffffffffffffffffffffff808716926370a082319261282b921690600401613c54565b60206040518083038186803b15801561284357600080fd5b505afa158015612857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061287b9190810190613418565b9050600061288a848489612ca1565b9050612894612f2d565b50604080516060810182528281526020810184905260009181019190915260145460ff1615612aab576128cd898463ffffffff611e8616565b82111561298d5760006128e3848b018787612d48565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f916000918591309161292791899101613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016129559493929190613d04565b600060405180830381600087803b15801561296f57600080fd5b505af1158015612983573d6000803e3d6000fd5b5050505050612aa6565b828211156129f05760006129a2838787612d48565b90506129b68a85850363ffffffff611a4516565b8260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008330866040516020016129279190613eb9565b60006129fd838787612d48565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f6000833086604051602001612a449190613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612a729493929190613d04565b600060405180830381600087803b158015612a8c57600080fd5b505af1158015612aa0573d6000803e3d6000fd5b50505050505b612c5c565b612abb898463ffffffff611e8616565b821115612b43576000612ad1848b018688612d48565b8a85018352602080840186905260405191925073ffffffffffffffffffffffffffffffffffffffff8a169163022c0d9f9184916000913091612b1591899101613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612a729493929190613ef5565b82821115612ba6576000612b58838688612d48565b9050612b6c8a85850363ffffffff611a4516565b8260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612b159190613eb9565b6000612bb3838688612d48565b905082826020018181525050898260400181815250508773ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260003086604051602001612bfa9190613eb9565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401612c289493929190613ef5565b600060405180830381600087803b158015612c4257600080fd5b505af1158015612c56573d6000803e3d6000fd5b50505050505b505050505050505050565b6000806040516020840160008286518360008a6187965a03f19695505050505050565b6060612c998484600085612e22565b949350505050565b60145460009060ff1615612cff5767016345785d8a00008210612ce657612cdf670de0b6b3a764000061162e601354876120f290919063ffffffff16565b90506123cd565b612cdf670de0b6b3a764000061162e86600386046120f2565b67016345785d8a00008210612d2f57612cdf670de0b6b3a764000061162e601354866120f290919063ffffffff16565b612cdf670de0b6b3a764000061162e85600386046120f2565b6000808411612d83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e59565b600083118015612d935750600082115b612dc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613da9565b6000612ddd856103e563ffffffff6120f216565b90506000612df1828563ffffffff6120f216565b90506000612e0b8361148c886103e863ffffffff6120f216565b9050808281612e1657fe5b04979650505050505050565b6060612e2d85612f27565b612e63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613e09565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612e8d9190613c48565b60006040518083038185875af1925050503d8060008114612eca576040519150601f19603f3d011682016040523d82523d6000602084013e612ecf565b606091505b50915091508115612ee3579150612c999050565b805115612ef35780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105419190613d48565b3b151590565b60405180606001604052806000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f8f57805160ff1916838001178555612fbc565b82800160010185558215612fbc579182015b82811115612fbc578251825591602001919060010190612fa1565b50612fc8929150613092565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106130055780548555612fbc565b82800160010185558215612fbc57600052602060002091601f016020900482015b82811115612fbc578254825591600101919060010190613026565b815481835581811115611b4d57600202816002028360005260206000209182019101611b4d91906130ac565b60408051602081019091526000815290565b6040518060200160405280600081525090565b6109c891905b80821115612fc85760008155600101613098565b6109c891905b80821115612fc85780547fffffffffffffffffffffff00000000000000000000000000000000000000000016815560006130ef60018301826130f8565b506002016130b2565b50805460018160011615610100020316600290046000825580601f1061311e575061313c565b601f01602090049060005260206000209081019061313c9190613092565b50565b8035611a8a816140c4565b8035611a8a816140d8565b8051611a8a816140d8565b60008083601f84011261317257600080fd5b50813567ffffffffffffffff81111561318a57600080fd5b6020830191508360018202830111156131a257600080fd5b9250929050565b600082601f8301126131ba57600080fd5b81356131cd6131c882613fb0565b613f89565b915080825260208301602083018583830111156131e957600080fd5b6131f4838284614064565b50505092915050565b60006060828403121561320f57600080fd5b6132196060613f89565b90506000613227848461326e565b82525060206132388484830161326e565b602083015250604061324c8482850161326e565b60408301525092915050565b8051611a8a816140e1565b8035611a8a816140ea565b8051611a8a816140ea565b8051611a8a816140f3565b60006020828403121561329657600080fd5b6000612c99848461313f565b6000806000604084860312156132b757600080fd5b60006132c3868661313f565b935050602084013567ffffffffffffffff8111156132e057600080fd5b6132ec86828701613160565b92509250509250925092565b6000806000806080858703121561330e57600080fd5b600061331a878761313f565b945050602061332b87828801613263565b935050604061333c87828801613263565b925050606085013567ffffffffffffffff81111561335957600080fd5b613365878288016131a9565b91505092959194509250565b60006020828403121561338357600080fd5b6000612c998484613155565b6000606082840312156133a157600080fd5b6000612c9984846131fd565b6000806000606084860312156133c257600080fd5b60006133ce8686613258565b93505060206133df86828701613258565b92505060406133f086828701613279565b9150509250925092565b60006020828403121561340c57600080fd5b6000612c998484613263565b60006020828403121561342a57600080fd5b6000612c99848461326e565b6000806040838503121561344957600080fd5b60006134558585613263565b92505060206134668582860161314a565b9150509250929050565b60008060006060848603121561348557600080fd5b60006134918686613263565b93505060206134a286828701613263565b92505060406133f086828701613263565b6134bc81614014565b82525050565b6134bc8161401f565b60006134d682614002565b6134e08185614006565b93506134f0818560208601614070565b6134f98161409c565b9093019392505050565b600061350e82614002565b613518818561400f565b9350613528818560208601614070565b9290920192915050565b60008154600181166000811461354f5760018114613593576135d2565b607f60028304166135608187614006565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841681529550506020850192506135d2565b600282046135a18187614006565b95506135ac85613ff6565b60005b828110156135cb578154888201526001909101906020016135af565b8701945050505b505092915050565b6134bc81614059565b60006135f0602783614006565b7f74776170207761736e7420696e74697469617465642c2063616c6c20696e697481527f5f74776170282900000000000000000000000000000000000000000000000000602082015260400192915050565b600061364f601b83614006565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000613688602883614006565b7f696e646578206d75737420626520696e2072616e6765206f662073746f72656481527f207478206c697374000000000000000000000000000000000000000000000000602082015260400192915050565b60006136e7600983614006565b7f6e6f207472616465730000000000000000000000000000000000000000000000815260200192915050565b6000613720600a83614006565b7f21656e645f64656c617900000000000000000000000000000000000000000000815260200192915050565b6000613759602883614006565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4c81527f4951554944495459000000000000000000000000000000000000000000000000602082015260400192915050565b60006137b8602283614006565b7f6e6577207363616c696e6720666163746f722077696c6c20626520746f6f206281527f6967000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613817602183614006565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f81527f7700000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613876600883614006565b7f2170656e64696e67000000000000000000000000000000000000000000000000815260200192915050565b60006138af601383614006565b7f7265626173696e67206e6f742061637469766500000000000000000000000000815260200192915050565b60006138e8602383614006565b7f4669786564506f696e743a204d554c5449504c49434154494f4e5f4f5645524681527f4c4f570000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000613947601d83614006565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815260200192915050565b6000613980600983614006565b7f746f6f206561726c790000000000000000000000000000000000000000000000815260200192915050565b60006139b9600883614006565b7f746f6f206c617465000000000000000000000000000000000000000000000000815260200192915050565b60006139f2602a83614006565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e81527f6f74207375636365656400000000000000000000000000000000000000000000602082015260400192915050565b6000613a51600e83614006565b7f626164206d73672e73656e646572000000000000000000000000000000000000815260200192915050565b6000613a8a602b83614006565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4981527f4e5055545f414d4f554e54000000000000000000000000000000000000000000602082015260400192915050565b6000613ae9601183614006565b7f616c726561647920616374697661746564000000000000000000000000000000815260200192915050565b6000613b22601383614006565b7f696e646578206f7574206f6620626f756e647300000000000000000000000000815260200192915050565b6000613b5b601283614006565b7f5472616e73616374696f6e204661696c65640000000000000000000000000000815260200192915050565b6000613b94601783614006565b7f4669786564506f696e743a204449565f42595f5a45524f000000000000000000815260200192915050565b6000613bcd600a83614006565b7f626164206f726967696e00000000000000000000000000000000000000000000815260200192915050565b80516060830190613c0a8482613c36565b506020820151613c1d6020850182613c36565b506040820151613c306040850182613c36565b50505050565b6134bc816109c8565b6134bc81614050565b60006123cd8284613503565b60208101611a8a82846134b3565b60408101613c7082856134b3565b6123cd60208301846134b3565b60608101613c8b82866134b3565b613c9860208301856134b3565b612c996040830184613c36565b60408101613cb382856134b3565b6123cd6020830184613c36565b60208101611a8a82846134c2565b60608101613cdc82866134c2565b613ce960208301856134b3565b8181036040830152613cfb81846134cb565b95945050505050565b60808101613d1282876135da565b613d1f6020830186613c36565b613d2c60408301856134b3565b8181036060830152613d3e81846134cb565b9695505050505050565b60208082528101611a8781846134cb565b60208082528101611a8a816135e3565b60208082528101611a8a81613642565b60208082528101611a8a8161367b565b60208082528101611a8a816136da565b60208082528101611a8a81613713565b60208082528101611a8a8161374c565b60208082528101611a8a816137ab565b60208082528101611a8a8161380a565b60208082528101611a8a81613869565b60208082528101611a8a816138a2565b60208082528101611a8a816138db565b60208082528101611a8a8161393a565b60208082528101611a8a81613973565b60208082528101611a8a816139ac565b60208082528101611a8a816139e5565b60208082528101611a8a81613a44565b60208082528101611a8a81613a7d565b60208082528101611a8a81613adc565b60208082528101611a8a81613b15565b60208082528101611a8a81613b4e565b60208082528101611a8a81613b87565b60208082528101611a8a81613bc0565b60608101611a8a8284613bf9565b60208101611a8a8284613c36565b60408101613ee38285613c36565b8181036020830152612c998184613532565b60808101613f038287613c36565b613d1f60208301866135da565b60408101613cb38285613c36565b60608101613f2c8286613c36565b613f396020830185613c36565b612c9960408301846134c2565b60808101613f548287613c36565b613f616020830186613c36565b613f6e6040830185613c36565b613cfb6060830184613c36565b60208101611a8a8284613c3f565b60405181810167ffffffffffffffff81118282101715613fa857600080fd5b604052919050565b600067ffffffffffffffff821115613fc757600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60009081526020902090565b5190565b90815260200190565b919050565b6000611a8a82614037565b151590565b6dffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b63ffffffff1690565b6000611a8a826109c8565b82818337506000910152565b60005b8381101561408b578181015183820152602001614073565b83811115613c305750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6140cd81614014565b811461313c57600080fd5b6140cd8161401f565b6140cd81614024565b6140cd816109c8565b6140cd8161405056fea365627a7a72315820d97bd42e61e1eebc1918658ec6a4fb91a7f96c26b253241020d67b3ec49dff336c6578706572696d656e74616cf564736f6c63430005110040", - "sourceMap": "243:28756:20:-;;;4164:1469;8:9:-1;5:2;;;30:1;27;20:12;5:2;4164:1469:20;;;;;;;;;;;;;;;;;;;;;4368:8;4341:24;:35;4412:5;4388:21;:29;4429:16;:36;;-1:-1:-1;;;;;;4429:36:20;-1:-1:-1;;;;;4429:36:20;;;;;-1:-1:-1;;4512:38:20;4523:11;4536:13;4512:10;:38::i;:::-;4477:73;;;;4624:11;-1:-1:-1;;;;;4614:21:20;:6;-1:-1:-1;;;;;4614:21:20;;4610:122;;;4653:8;:15;;-1:-1:-1;;4653:15:20;4664:4;4653:15;;;4610:122;;;4703:8;:16;;-1:-1:-1;;4703:16:20;;;4610:122;4797:40;4805:15;4822:6;4830;-1:-1:-1;;;;;4797:7:20;:40;:::i;:::-;4782:12;:55;;-1:-1:-1;;;;;;4782:55:20;;;-1:-1:-1;;;;;4782:55:20;;;;;;;4892:16;:36;;;;;;;;;;;;;;5023:12;:28;;;;;;;;;;;;;;-1:-1:-1;;5064:10:20;:24;;;;;;;;;;;;;;;-1:-1:-1;5172:16:20;5152:17;:36;5234:6;5221:10;:19;-1:-1:-1;;5324:14:20;;;5385:6;5368:14;:23;5441:10;5420:18;:31;5512:7;5488:31;;-1:-1:-1;5609:16:20;;5615:10;5609:16;;;;;;;;243:28756;;25778:395;25899:14;25915;25963:6;-1:-1:-1;;;;;25953:16:20;:6;-1:-1:-1;;;;;25953:16:20;;;25945:66;;;;-1:-1:-1;;;25945:66:20;;;;;;;;;;;;;;;;;26049:6;-1:-1:-1;;;;;26040:15:20;:6;-1:-1:-1;;;;;26040:15:20;;:53;;26078:6;26086;26040:53;;;26059:6;26067;26040:53;26021:72;;-1:-1:-1;26021:72:20;-1:-1:-1;;;;;;26111:20:20;;26103:63;;;;-1:-1:-1;;;26103:63:20;;;;;;;;;25778:395;;;;;:::o;25215:457::-;25358:12;25475:7;25527:6;25535;25510:32;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;25510:32:20;;;25500:43;;;;;;25416:246;;;;;;;;;;;;;;-1:-1:-1;;26:21;;;22:32;6:49;;25416:246:20;;;25406:257;;49:4:-1;25406:257:20;;;;;25215:457;-1:-1:-1;;;;25215:457:20:o;5:134:-1:-;83:13;;101:33;83:13;101:33;;;68:71;;;;;146:672;;;;;312:3;300:9;291:7;287:23;283:33;280:2;;;329:1;326;319:12;280:2;364:1;381:64;437:7;417:9;381:64;;;371:74;;343:108;482:2;500:64;556:7;547:6;536:9;532:22;500:64;;;490:74;;461:109;601:2;619:64;675:7;666:6;655:9;651:22;619:64;;;609:74;;580:109;720:2;738:64;794:7;785:6;774:9;770:22;738:64;;;728:74;;699:109;274:544;;;;;;;;825:152;926:45;946:24;964:5;946:24;;;926:45;;;921:3;914:58;908:69;;;984:152;1085:45;1105:24;1123:5;1105:24;;;1085:45;;1144:374;;1304:67;1368:2;1363:3;1304:67;;;1404:34;1384:55;;-1:-1;;;1468:2;1459:12;;1452:29;1509:2;1500:12;;1290:228;-1:-1;;1290:228;1527:400;;1705:85;1787:2;1782:3;1705:85;;;1823:66;1803:87;;1918:2;1909:12;;1691:236;-1:-1;;1691:236;1936:398;;2114:84;2196:1;2191:3;2114:84;;;2231:66;2211:87;;2326:1;2317:11;;2100:234;-1:-1;;2100:234;2343:330;;2503:67;2567:2;2562:3;2503:67;;;2603:32;2583:53;;2664:2;2655:12;;2489:184;-1:-1;;2489:184;2681:383;;2828:75;2899:3;2890:6;2828:75;;;2925:2;2920:3;2916:12;2909:19;;2939:75;3010:3;3001:6;2939:75;;;-1:-1;3036:2;3027:12;;2816:248;-1:-1;;2816:248;3071:917;;3427:148;3571:3;3427:148;;;3420:155;;3586:75;3657:3;3648:6;3586:75;;;3683:2;3678:3;3674:12;3667:19;;3697:75;3768:3;3759:6;3697:75;;;3794:2;3789:3;3785:12;3778:19;;3815:148;3959:3;3815:148;;;3808:155;3408:580;-1:-1;;;;3408:580;3995:407;4186:2;4200:47;;;4171:18;;4261:131;4171:18;4261:131;;4409:407;4600:2;4614:47;;;4585:18;;4675:131;4585:18;4675:131;;4824:163;4927:19;;;4976:4;4967:14;;4920:67;4996:145;5132:3;5110:31;-1:-1;5110:31;5149:91;;5211:24;5229:5;5211:24;;5247:72;5309:5;5292:27;5326:121;-1:-1;;;;;5388:54;;5371:76;5454:95;;5518:26;5538:5;5637:89;5701:20;5715:5;5807:2;5803:14;;5775:52;5835:117;5904:24;5922:5;5904:24;;;5897:5;5894:35;5884:2;;5943:1;5940;5933:12;5884:2;5878:74;;;243:28756:20;;;;;;", - "deployedSourceMap": "243:28756:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;243:28756:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2437:39;;;:::i;:::-;;;;;;;;;;;;;;;;10206:1799;;;;;;;;;:::i;:::-;;23345:171;;;:::i;:::-;;;;;;;;26417:251;;;;;;;;;:::i;1732:18::-;;;:::i;:::-;;;;;;;;22691:495;;;;;;;;;:::i;2028:29::-;;;:::i;21579:151::-;;;;;;;;;:::i;1800:25::-;;;:::i;3693:34::-;;;:::i;3482:31::-;;;:::i;2531:37::-;;;:::i;26815:315::-;;;;;;;;;:::i;7041:228::-;;;:::i;3124:26::-;;;:::i;7911:288::-;;;:::i;6335:272::-;;;;;;;;;:::i;20791:335::-;;;;;;;;;:::i;7367:428::-;;;:::i;1879:24::-;;;:::i;3215:46::-;;;:::i;6035:239::-;;;;;;;;;:::i;27306:238::-;;;;;;;;;:::i;2760:36::-;;;:::i;6747:223::-;;;;;;;;;:::i;2994:20::-;;;:::i;2900:36::-;;;:::i;1656:33::-;;;;;;;;;:::i;:::-;;;;;;;;;;8542:1657;;;:::i;5692:277::-;;;;;;;;;:::i;3556:27::-;;;:::i;3619:32::-;;;:::i;:::-;;;;;;;;1928:25;;;:::i;3303:29::-;;;:::i;21855:156::-;;;;;;;;;:::i;4042:32::-;;;:::i;3364:25::-;;;:::i;2328:33::-;;;:::i;4137:20::-;;;:::i;3417:27::-;;;:::i;2437:39::-;;;;:::o;10206:1799::-;10437:12;;;;10423:10;:26;10415:53;;;;;;;;;;;;;;;;;;;;;;10539:23;;;10557:4;10539:23;10531:46;;;;;;;;;;;;;;10588:22;;:::i;:::-;10625:4;10614:27;;;;;;;;;;;;;;10694:10;;10720:26;;;;10587:54;;-1:-1:-1;10694:10:20;;;10720:30;10716:629;;10841:16;;10859:12;;10873:26;;;;10824:76;;;;;:16;;;;;;;:76;;10841:16;;;;10859:12;;;10824:76;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10824:76:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10824:76:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10824:76:20;;;;;;;;;-1:-1:-1;10947:17:20;;10918:26;;;;:46;10914:318;;;11153:12;;11189:26;;;;11167:17;;11144:8;;;;;;;11153:12;;;11167:49;;;:21;:49;:::i;:::-;11144:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11144:73:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11144:73:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;11144:73:20;;;;;;;;;;10914:318;10716:629;;;11302:12;;11316:17;;11293:41;;;;;:8;;;;;;;:41;;11302:12;;;;;11293:41;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11293:41:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11293:41:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;11293:41:20;;;;;;;;;;10716:629;11396:22;;;;:26;11392:107;;11447:16;;11465:22;;;;;11438:50;;;;;:8;;;;;;;:50;;11447:16;;;;;11438:50;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11438:50:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11438:50:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;11438:50:20;;;;;;;;;;11392:107;11559:8;;;;11555:444;;;11613:12;;11628:16;;11583:71;;11613:12;;;;;11628:16;11646:7;11583:22;:71::i;:::-;11673:97;11691:7;11700;:17;;;11719:7;:26;;;11747:7;:22;;;11673:97;;;;;;;;;;;;;;;;;;11555:444;;;11831:12;;11846:16;;11801:71;;11831:12;;;;;11846:16;11864:7;11801:22;:71::i;:::-;11891:97;11909:7;11918;:17;;;11937:7;:26;;;11965:7;:22;;;11891:97;;;;;;;;;;;;;;;;;;11555:444;10206:1799;;;;;;:::o;23345:171::-;23392:4;23471:17;:15;:17::i;:::-;-1:-1:-1;23505:4:20;23345:171;;:::o;26417:251::-;354:3;;;;340:10;:17;332:26;;;;;;26530:12;26548:112;;;;;;;;26583:4;26548:112;;;;;;26614:11;26548:112;;;;;;26645:4;;26548:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;-1:-1;26548:112:20;;;;-1:-1:-1;;27:10;;39:1;23:18;;;45:23;;;26530:131:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26530:131:20;;;;;;;;;;:::i;:::-;;;;;26417:251;;;:::o;1732:18::-;;;;;;:::o;22691:495::-;354:3;;;;340:10;:17;332:26;;;;;;22933:1;22905:25;:29;22897:38;;;;;;22978:25;22953:22;:50;22945:59;;;;;;23015:24;:52;;;;23077:21;:46;23133:21;:46;22691:495::o;2028:29::-;;;;:::o;21579:151::-;354:3;;;;340:10;:17;332:26;;;;;;21689:1;21676:10;:14;21668:23;;;;;;21701:9;:22;21579:151::o;1800:25::-;;;;;;:::o;3693:34::-;;;;:::o;3482:31::-;;;;;;:::o;2531:37::-;;;;:::o;26815:315::-;354:3;;;;340:10;:17;332:26;;;;;;26917:12;:19;26909:27;;26901:59;;;;;;;;;;;;;;26983:12;:19;:23;;26975:31;;26971:121;;;27044:12;27057:19;;:23;;;;27044:37;;;;;;;;;;;;;;;;27022:12;27035:5;27022:19;;;;;;;;;;;;;;;;:59;;:19;;;;;;;:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27022:59:20;;;;;:19;;:59;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;26971:121:20;27102:12;:21;;;;;;;;;:::i;:::-;;26815:315;:::o;7041:228::-;7116:10;;;;7102;:24;7094:45;;;;;;;;;;;;;;7166:3;;;7185:10;;;7179:16;;;;7166:3;7185:10;;;7179:16;;;;;;;;7205:23;;;;;7243:19;;7166:3;;;;7243:19;;;;7166:3;;7258;;7243:19;;;;;;;;;;7041:228;:::o;3124:26::-;;;;;;:::o;7911:288::-;7994:1;7977:14;;:18;7969:70;;;;;;;;;;;;;;3253:8;8117:14;;:28;8110:3;:35;;8102:58;;;;;;;;;;;;;;8171:14;:21;;;;8188:4;8171:21;;;7911:288::o;6335:272::-;354:3;;;;340:10;:17;332:26;;;;;;6465:16;;;;6491:36;;;;;;;;;;6542:58;;6465:16;;;6542:58;;;;6465:16;;6510:17;;6542:58;;;;;;;;;;368:1;6335:272;:::o;20791:335::-;354:3;;;;340:10;:17;332:26;;;;;;20927:1;20906:18;;:22;20898:31;;;;;;20971:18;;;20999:40;;;;21054:65;;;;;;20971:18;;21020:19;;21054:65;;7367:428;7425:14;;:19;7417:49;;;;;;;;;;;;;;7582:12;;7596:8;;7477:20;;;;7535:70;;7582:12;;;7596:8;;7535:46;:70::i;:::-;7476:129;;;;7640:1;7623:14;:18;;;7615:40;;;;;;;;;;;;;;7665:18;:35;;;;;;;;;;;;;;;;7710:19;:37;;;;7757:14;:31;7367:428::o;1879:24::-;;;;:::o;3215:46::-;3253:8;3215:46;:::o;6035:239::-;354:3;;;;340:10;:17;332:26;;;;;;6150:14;;;6174:32;;;;6221:46;;;;;;6150:14;;6191:15;;6221:46;;27306:238;354:3;;;;340:10;:17;332:26;;;;;;27426:12;:19;27418:27;;27410:80;;;;;;;;;;;;;;27530:7;27500:12;27513:5;27500:19;;;;;;;;;;;;;;;;;;;;;:37;;;;;;;;;;;;;-1:-1:-1;;27306:238:20:o;2760:36::-;;;;:::o;6747:223::-;354:3;;;;340:10;:17;332:26;;;;;;6863:10;;;;6883:24;;;;;;;;;;6922:41;;6863:10;;;6922:41;;;;6863:10;;6896:11;;6922:41;;2994:20;;;;:::o;2900:36::-;;;;:::o;1656:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1656:33:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;8542:1657::-;8632:17;:15;:17::i;:::-;8787:3;8732:52;8759:24;;8732:22;;:26;;:52;;;;:::i;:::-;:58;8724:67;;;;;;8888:82;8948:21;;8888:55;8909:33;8917:24;;8909:3;:7;;:33;;;;:::i;:::-;8888:3;;:55;:7;:55;:::i;:::-;:59;:82;:59;:82;:::i;:::-;8863:22;:107;8989:5;;:12;;8999:1;8989:12;:9;:12;:::i;:::-;8981:5;:20;9049;9072:9;:7;:9::i;:::-;9049:32;;9134:18;9154:13;9171:31;9189:12;9171:17;:31::i;:::-;9322:9;;9133:69;;-1:-1:-1;9133:69:20;-1:-1:-1;9133:69:20;;9307:25;;9133:69;;9307:25;:14;:25;:::i;:::-;9385:10;;9294:38;;-1:-1:-1;9385:10:20;;9407:183;;;;9518:3;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9518:22:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9518:22:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9518:22:20;;;;;;;;;9443:72;9508:6;9443:60;9471:31;9508:6;9491:10;9471:31;:19;:31;:::i;:::-;9443:3;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9443:23:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9443:23:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9443:23:20;;;;;;;;;:27;:60;:27;:60;:::i;:::-;:64;:72;:64;:72;:::i;:::-;:97;9435:144;;;;;;;;;;;;;;9601:18;9622:3;:15;;;:17;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9622:17:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9622:17:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;9622:17:20;;;;;;;;;9601:38;;9650:18;9734:8;9730:214;;;9758:16;9777:42;9812:6;9777:30;9792:14;;9777:10;:14;;:30;;;;:::i;:42::-;9758:61;-1:-1:-1;9846:24:20;:10;9758:61;9846:24;:14;:24;:::i;:::-;9833:37;-1:-1:-1;9897:36:20;9926:6;9897:24;:10;9912:8;9897:24;:14;:24;:::i;:36::-;9884:49;;9730:214;;10011:5;;10000:39;;;;;9972:25;;10000:10;;;;;;:39;;10018:10;;10030:8;;10000:39;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10000:39:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10000:39:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10000:39:20;;;;;;;;;9972:67;;10083:3;:20;;;:22;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10083:22:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10083:22:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10083:22:20;;;;;;;;;10056:3;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10056:23:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10056:23:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;10056:23:20;;;;;;;;;:49;;10049:57;;;;10157:35;10169:10;10181;10157:11;:35::i;:::-;8542:1657;;;;;;;;:::o;5692:277::-;354:3;;;;340:10;:17;332:26;;;;;;5823:17;;;5850:38;;;;5903:59;;;;;;5823:17;;5870:18;;5903:59;;3556:27;;;;;;:::o;3619:32::-;;;;;;;;;:::o;1928:25::-;;;;:::o;3303:29::-;;;;:::o;21855:156::-;354:3;;;;340:10;:17;332:26;;;;;;21968:1;21954:11;:15;21946:24;;;;;;21980:10;:24;21855:156::o;4042:32::-;;;;:::o;3364:25::-;;;;;;:::o;2328:33::-;;;;:::o;4137:20::-;;;;;;:::o;3417:27::-;;;;;;:::o;1322:134:18:-;1380:7;1406:43;1410:1;1413;1406:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1399:50;;1322:134;;;;;:::o;678:175:17:-;787:58;;760:86;;780:5;;810:23;;787:58;;835:2;;839:5;;787:58;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;787:58:17;;;49:4:-1;25:18;;61:17;;787:58:17;182:15:-1;787:58:17;;;;179:29:-1;;;;160:49;;;760:19:17;:86::i;:::-;678:175;;;:::o;23522:375:20:-;23644:14;;;;23636:46;;;;;;;;;;;;;;23738:21;;23709:24;;23701:33;;:3;;:33;:7;:33;:::i;:::-;:58;;23693:80;;;;;;;;;;;;;;23854:21;;23828;;:48;;;:25;:48;:::i;:::-;23799:24;;23791:33;;:3;;:33;:7;:33;:::i;:::-;:86;23783:107;;;;;;;;;;;;;;23522:375::o;579:1437:19:-;686:20;708:21;758:23;:21;:23::i;:::-;741:40;;792:16;810;828:25;869:4;857:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;857:31:19;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;857:31:19;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;857:31:19;;;;;;;;;791:97;;;;;;902:8;898:1111;;;954:4;942:38;;;:40;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;942:40:19;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;942:40:19;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;942:40:19;;;;;;;;;924:58;;1123:14;1101:36;;:18;:36;;;1097:351;;1225:35;;;1373:62;;;1378:39;1398:8;1408;1378:19;:39::i;:::-;:42;1373:48;;:62;1354:81;;;;;-1:-1:-1;1097:351:19;898:1111;;;1506:4;1494:38;;;:40;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1494:40:19;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1494:40:19;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1494:40:19;;;;;;;;;1476:58;;1674:14;1652:36;;:18;:36;;;1648:351;;1776:35;;;1924:62;;;1929:39;1949:8;1959;1929:19;:39::i;:::-;:42;1924:48;;:62;1905:81;;;;;-1:-1:-1;1648:351:19;579:1437;;;;;;;;:::o;875:176:18:-;933:7;964:5;;;987:6;;;;979:46;;;;;;;;;;;;;4437:128;4495:7;4521:37;4525:1;4528;4521:37;;;;;;;;;;;;;;;;;:3;:37::i;19632:834:20:-;19810:12;;19824:8;;19685:7;;;;;;19763:70;;19810:12;;;;;19824:8;;19763:46;:70::i;:::-;19880:18;;19706:127;;-1:-1:-1;19706:127:20;-1:-1:-1;19880:18:20;;;;;19863:35;;20163:40;;:::i;:::-;20206:84;;;;;;;;20277:11;20235:53;;20254:19;;20236:15;:37;20235:53;;;;;;20206:84;;;;20301:19;:37;;;20348:18;:35;;;;;;;;;;;;20163:127;-1:-1:-1;20401:58:20;20422:36;20163:127;20451:6;20422:14;:36::i;:::-;20401:20;:58::i;:::-;20394:65;;;;;;;;19632:834;:::o;23979:474::-;24066:7;24075:4;24099:30;24124:4;24099:24;:30::i;:::-;24095:78;;;-1:-1:-1;24153:1:20;;-1:-1:-1;24153:1:20;24145:17;;24095:78;24252:10;;24245:4;:17;24241:206;;;24323:10;;24286:48;;:32;24311:6;24286:20;:4;24323:10;24286:20;:8;:20;:::i;:48::-;24336:4;24278:63;;;;;;24241:206;24417:10;;24380:48;;:32;24405:6;24380:20;24417:10;24395:4;24380:20;:14;:20;:::i;:48::-;24430:5;24372:64;;;;24241:206;23979:474;;;:::o;3102:130:18:-;3160:7;3186:39;3190:1;3193;3186:39;;;;;;;;;;;;;;;;;:3;:39::i;2181:459::-;2239:7;2480:6;2476:45;;-1:-1:-1;2509:1:18;2502:8;;2476:45;2543:5;;;2547:1;2543;:5;:1;2566:5;;;;;:10;2558:56;;;;;;;;;;;;;18430:781:20;18582:12;;;;;;;;;;;18570:30;;;:32;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18570:32:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;18570:32:20;;;;18630:1;18617:10;:14;18613:136;;;18647:91;18686:10;18714;18647:21;:91::i;:::-;18800:6;18795:410;18816:12;:19;18812:23;;18795:410;;;18856:21;18880:12;18893:1;18880:15;;;;;;;;;;;;;;;;;;;;;18913:9;;18880:15;;-1:-1:-1;18913:9:20;;18909:286;;;18989:13;;;19004:6;;;18976:35;;;;;;;18989:13;18976:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;18976:35:20;;18989:13;;;;;18976:35;;19004:6;;18976:35;;;19004:6;18976:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:12;:35::i;:::-;18942:69;;19034:6;19029:152;;19087:13;;19069:43;;19087:13;;;;;;;19069:43;;;;19102:1;;19087:13;19105:6;;;19069:43;;;;;;;;;;19134:28;;;;;;;;;;;19029:152;18909:286;;-1:-1:-1;18837:3:20;;18795:410;;1747:187:18;1833:7;1868:12;1860:6;;;;1852:29;;;;;;;;;;;;;;;-1:-1:-1;;1903:5:18;;;1747:187;;;;;;:::o;2941:751:17:-;3360:23;3386:69;3414:4;3386:69;;;;;;;;;;;;;;;;;3394:5;3386:27;;;;:69;;;;;:::i;:::-;3469:17;;3360:95;;-1:-1:-1;3469:21:17;3465:221;;3609:10;3598:30;;;;;;;;;;;;;;3590:85;;;;;;;;;;;;;355:121:19;443:25;:15;:25;;355:121::o;1700:243:14:-;1781:16;;:::i;:::-;1831:1;1817:11;:15;;;1809:51;;;;;;;;;;;;;;1877:59;;;;;;;;;;1887:48;;;1888:32;481:3;1888:32;;;;1887:48;;;;;;1877:59;;;;;1870:66;;1700:243;;;;:::o;5036:163:18:-;5122:7;5157:12;5149:6;5141:29;;;;;;;;;;;;;;;;5191:1;5187;:5;;;;;;;5036:163;-1:-1:-1;;;;5036:163:18:o;1299:249:14:-;1366:16;;:::i;:::-;1394:6;1418;;;:54;;-1:-1:-1;;1464:7:14;;1459:13;;1433:17;;;;1454:1;1433:17;1454:1;1428:27;;;;;:44;1418:54;1410:102;;;;;;;;;;;;;;1529:12;;;;;;;;;;;;;1299:249;-1:-1:-1;;;1299:249:14:o;2234:128::-;2333:7;481:3;2333:21;;2234:128::o;24693:398:20:-;24787:4;24807:34;24844:61;24896:8;24844:34;24859:18;;24844:10;;:14;;:34;;;;:::i;:61::-;24807:98;;24932:10;;24924:4;:18;;:71;;;;;24969:26;24946:20;24955:10;;24946:4;:8;;:20;;;;:::i;:::-;:49;24924:71;24923:161;;;;25020:10;;25013:4;:17;:70;;;;-1:-1:-1;25034:10:20;;25057:26;;25034:20;;25049:4;25034:20;:14;:20;:::i;:::-;:49;24916:168;24693:398;-1:-1:-1;;;24693:398:20:o;3714:272:18:-;3800:7;3834:12;3827:5;3819:28;;;;;;;;;;;;;;;;3857:9;3873:1;3869;:5;;;;;;;3714:272;-1:-1:-1;;;;;3714:272:18:o;12011:4651:20:-;12166:12;;12232:10;;12331:18;;;;;;;;12166:12;;;;;12232:10;;;;12135:16;;;;12166:12;;12331:16;;:18;;;;;;;;;;;;;;12166:12;12331:18;;;5:2:-1;;;;30:1;27;20:12;5:2;12331:18:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12331:18:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;12331:18:20;;;;;;;;;-1:-1:-1;12450:16:20;;12436:31;;;;;12278:71;;;;;-1:-1:-1;12278:71:20;;;;;-1:-1:-1;12419:14:20;;12436:13;;;;;;;:31;;12450:16;;12436:31;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12436:31:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12436:31:20;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;12436:31:20;;;;;;;;;12419:48;;12479:30;12512:62;12531:14;12547;12563:10;12512:18;:62::i;:::-;12479:95;;12585:22;;:::i;:::-;-1:-1:-1;12610:251:20;;;;;;;;;;;;;;;;;-1:-1:-1;12610:251:20;;;;;;;13119:8;;;;13115:3541;;;13172:22;:10;13187:6;13172:22;:14;:22;:::i;:::-;13147;:47;13143:1767;;;13435:17;13455:65;13481:6;13468:10;:19;13489:14;13505;13455:12;:65::i;:::-;13558:19;;;13538:39;;13595:26;;;;:35;;;13772:19;;13435:85;;-1:-1:-1;13733:9:20;;;;;;13538:17;;13435:85;;13765:4;;13772:19;;13538:7;;13772:19;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13772:19:20;;;13733:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13733:59:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13733:59:20;;;;13143:1767;;;;13860:6;13835:22;:31;13831:1065;;;13948:17;13968:68;13981:22;14005:14;14021;13968:12;:68::i;:::-;13948:88;-1:-1:-1;14188:49:20;:10;14204:31;;;14188:49;:14;:49;:::i;:::-;14163:7;:22;;:74;;;;;14259:4;:9;;;14269:1;14272:9;14291:4;14309:7;14298:19;;;;;;;;;13831:1065;14422:17;14442:68;14455:22;14479:14;14495;14442:12;:68::i;:::-;14422:88;;14561:22;14532:7;:26;;:51;;;;;14630:10;14605:7;:22;;:35;;;;;14818:4;:9;;;14828:1;14831:9;14850:4;14868:7;14857:19;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;14857:19:20;;;14818:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14818:59:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14818:59:20;;;;13831:1065;;13115:3541;;;14969:22;:10;14984:6;14969:22;:14;:22;:::i;:::-;14944;:47;14940:1706;;;15066:17;15086:65;15112:6;15099:10;:19;15120:14;15136;15086:12;:65::i;:::-;15189:19;;;15169:39;;15226:26;;;;:35;;;15403:19;;15066:85;;-1:-1:-1;15364:9:20;;;;;;15066:85;;15169:17;;15396:4;;15403:19;;15169:7;;15403:19;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;15403:19:20;;;15364:59;;;;;;;;;;;;;;;;;;;14940:1706;15491:6;15466:22;:31;15462:1170;;;15579:17;15599:68;15612:22;15636:14;15652;15599:12;:68::i;:::-;15579:88;-1:-1:-1;15819:50:20;:10;15836:31;;;15819:50;:14;:50;:::i;:::-;15794:7;:22;;:75;;;;;15995:4;:9;;;16005;16016:1;16027:4;16045:7;16034:19;;;;;;;;;15462:1170;16158:17;16178:68;16191:22;16215:14;16231;16178:12;:68::i;:::-;16158:88;;16297:22;16268:7;:26;;:51;;;;;16366:10;16341:7;:22;;:35;;;;;16554:4;:9;;;16564;16575:1;16586:4;16604:7;16593:19;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;16593:19:20;;;16554:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;16554:59:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16554:59:20;;;;15462:1170;;12011:4651;;;;;;;;;:::o;27779:1218::-;27875:4;27895:11;28131:4;28125:11;28256:2;28250:4;28246:13;28886:1;28855:13;28764:4;28758:11;28729;28685:1;28656:11;28630:5;28625:3;28621:15;28283:675;28273:685;27779:1218;-1:-1:-1;;;;;;27779:1218:20:o;3571:194:12:-;3674:12;3705:53;3728:6;3736:4;3742:1;3745:12;3705:22;:53::i;:::-;3698:60;3571:194;-1:-1:-1;;;;3571:194:12:o;16668:1076:20:-;16846:8;;16819:7;;16846:8;;16842:896;;;16886:6;16872:10;:20;16868:639;;16947:41;16981:6;16947:29;16958:17;;16947:6;:10;;:29;;;;:::i;:41::-;16940:48;;;;16868:639;17456:38;17487:6;17456:26;:6;17480:1;17467:14;;17456:10;:26::i;16842:896::-;17555:6;17541:10;:20;17537:191;;17588:41;17622:6;17588:29;17599:17;;17588:6;:10;;:29;;;;:::i;17537:191::-;17675:38;17706:6;17675:26;:6;17699:1;17686:14;;17675:10;:26::i;17862:561::-;18009:14;18057:1;18046:8;:12;18038:68;;;;;;;;;;;;;;18135:1;18123:9;:13;:31;;;;;18153:1;18140:10;:14;18123:31;18115:84;;;;;;;;;;;;;;18208:20;18231:17;:8;18244:3;18231:17;:12;:17;:::i;:::-;18208:40;-1:-1:-1;18257:14:20;18274:31;18208:40;18294:10;18274:31;:19;:31;:::i;:::-;18257:48;-1:-1:-1;18314:16:20;18333:40;18357:15;18333:19;:9;18347:4;18333:19;:13;:19;:::i;:40::-;18314:59;;18406:11;18394:9;:23;;;;;;;17862:561;-1:-1:-1;;;;;;;17862:561:20:o;4918:955:12:-;5048:12;5080:18;5091:6;5080:10;:18::i;:::-;5072:60;;;;;;;;;;;;;;5203:12;5217:23;5244:6;:11;;5262:8;5272:4;5244:33;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;5202:75:12;;;;5291:7;5287:580;;;5321:10;-1:-1:-1;5314:17:12;;-1:-1:-1;5314:17:12;5287:580;5432:17;;:21;5428:429;;5690:10;5684:17;5750:15;5737:10;5733:2;5729:19;5722:44;5639:145;5829:12;5822:20;;;;;;;;;;;;719:413;1079:20;1117:8;;;719:413::o;243:28756:20:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;243:28756:20;;;-1:-1:-1;243:28756:20;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;243:28756:20;;;:::o;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;142:124;206:20;;231:30;206:20;231:30;;273:128;348:13;;366:30;348:13;366:30;;422:336;;;536:3;529:4;521:6;517:17;513:27;503:2;;554:1;551;544:12;503:2;-1:-1;574:20;;614:18;603:30;;600:2;;;646:1;643;636:12;600:2;680:4;672:6;668:17;656:29;;731:3;723:4;715:6;711:17;701:8;697:32;694:41;691:2;;;748:1;745;738:12;691:2;496:262;;;;;;767:440;;868:3;861:4;853:6;849:17;845:27;835:2;;886:1;883;876:12;835:2;923:6;910:20;945:64;960:48;1001:6;960:48;;;945:64;;;936:73;;1029:6;1022:5;1015:21;1065:4;1057:6;1053:17;1098:4;1091:5;1087:16;1133:3;1124:6;1119:3;1115:16;1112:25;1109:2;;;1150:1;1147;1140:12;1109:2;1160:41;1194:6;1189:3;1184;1160:41;;;828:379;;;;;;;;1247:681;;1369:4;1357:9;1352:3;1348:19;1344:30;1341:2;;;1387:1;1384;1377:12;1341:2;1405:20;1420:4;1405:20;;;1396:29;-1:-1;1480:1;1512:60;1568:3;1548:9;1512:60;;;1487:86;;-1:-1;1648:2;1681:60;1737:3;1713:22;;;1681:60;;;1674:4;1667:5;1663:16;1656:86;1594:159;1813:2;1846:60;1902:3;1893:6;1882:9;1878:22;1846:60;;;1839:4;1832:5;1828:16;1821:86;1763:155;1335:593;;;;;1935:134;2013:13;;2031:33;2013:13;2031:33;;2076:130;2143:20;;2168:33;2143:20;2168:33;;2213:134;2291:13;;2309:33;2291:13;2309:33;;2354:132;2431:13;;2449:32;2431:13;2449:32;;2493:241;;2597:2;2585:9;2576:7;2572:23;2568:32;2565:2;;;2613:1;2610;2603:12;2565:2;2648:1;2665:53;2710:7;2690:9;2665:53;;2741:490;;;;2881:2;2869:9;2860:7;2856:23;2852:32;2849:2;;;2897:1;2894;2887:12;2849:2;2932:1;2949:53;2994:7;2974:9;2949:53;;;2939:63;;2911:97;3067:2;3056:9;3052:18;3039:32;3091:18;3083:6;3080:30;3077:2;;;3123:1;3120;3113:12;3077:2;3151:64;3207:7;3198:6;3187:9;3183:22;3151:64;;;3141:74;;;;3018:203;2843:388;;;;;;3238:721;;;;;3402:3;3390:9;3381:7;3377:23;3373:33;3370:2;;;3419:1;3416;3409:12;3370:2;3454:1;3471:53;3516:7;3496:9;3471:53;;;3461:63;;3433:97;3561:2;3579:53;3624:7;3615:6;3604:9;3600:22;3579:53;;;3569:63;;3540:98;3669:2;3687:53;3732:7;3723:6;3712:9;3708:22;3687:53;;;3677:63;;3648:98;3805:2;3794:9;3790:18;3777:32;3829:18;3821:6;3818:30;3815:2;;;3861:1;3858;3851:12;3815:2;3881:62;3935:7;3926:6;3915:9;3911:22;3881:62;;;3871:72;;3756:193;3364:595;;;;;;;;3966:257;;4078:2;4066:9;4057:7;4053:23;4049:32;4046:2;;;4094:1;4091;4084:12;4046:2;4129:1;4146:61;4199:7;4179:9;4146:61;;4230:307;;4367:2;4355:9;4346:7;4342:23;4338:32;4335:2;;;4383:1;4380;4373:12;4335:2;4418:1;4435:86;4513:7;4493:9;4435:86;;4544:533;;;;4692:2;4680:9;4671:7;4667:23;4663:32;4660:2;;;4708:1;4705;4698:12;4660:2;4743:1;4760:64;4816:7;4796:9;4760:64;;;4750:74;;4722:108;4861:2;4879:64;4935:7;4926:6;4915:9;4911:22;4879:64;;;4869:74;;4840:109;4980:2;4998:63;5053:7;5044:6;5033:9;5029:22;4998:63;;;4988:73;;4959:108;4654:423;;;;;;5084:241;;5188:2;5176:9;5167:7;5163:23;5159:32;5156:2;;;5204:1;5201;5194:12;5156:2;5239:1;5256:53;5301:7;5281:9;5256:53;;5332:263;;5447:2;5435:9;5426:7;5422:23;5418:32;5415:2;;;5463:1;5460;5453:12;5415:2;5498:1;5515:64;5571:7;5551:9;5515:64;;5602:360;;;5720:2;5708:9;5699:7;5695:23;5691:32;5688:2;;;5736:1;5733;5726:12;5688:2;5771:1;5788:53;5833:7;5813:9;5788:53;;;5778:63;;5750:97;5878:2;5896:50;5938:7;5929:6;5918:9;5914:22;5896:50;;;5886:60;;5857:95;5682:280;;;;;;5969:491;;;;6107:2;6095:9;6086:7;6082:23;6078:32;6075:2;;;6123:1;6120;6113:12;6075:2;6158:1;6175:53;6220:7;6200:9;6175:53;;;6165:63;;6137:97;6265:2;6283:53;6328:7;6319:6;6308:9;6304:22;6283:53;;;6273:63;;6244:98;6373:2;6391:53;6436:7;6427:6;6416:9;6412:22;6391:53;;6467:113;6550:24;6568:5;6550:24;;;6545:3;6538:37;6532:48;;;6587:104;6664:21;6679:5;6664:21;;6698:343;;6808:38;6840:5;6808:38;;;6858:70;6921:6;6916:3;6858:70;;;6851:77;;6933:52;6978:6;6973:3;6966:4;6959:5;6955:16;6933:52;;;7006:29;7028:6;7006:29;;;6997:39;;;;6788:253;-1:-1;;;6788:253;7048:356;;7176:38;7208:5;7176:38;;;7226:88;7307:6;7302:3;7226:88;;;7219:95;;7319:52;7364:6;7359:3;7352:4;7345:5;7341:16;7319:52;;;7383:16;;;;;7156:248;-1:-1;;7156:248;7776:818;;7893:5;7887:12;7927:1;7916:9;7912:17;7940:1;7935:247;;;;8193:1;8188:400;;;;7905:683;;7935:247;8013:4;8009:1;7998:9;7994:17;7990:28;8032:70;8095:6;8090:3;8032:70;;;8136:9;8121:25;;8109:38;;8025:77;-1:-1;;8170:4;8161:14;;;-1:-1;7935:247;;8188:400;8257:1;8246:9;8242:17;8273:70;8336:6;8331:3;8273:70;;;8266:77;;8365:37;8396:5;8365:37;;;8418:1;8426:130;8440:6;8437:1;8434:13;8426:130;;;8499:14;;8486:11;;;8479:35;8546:1;8533:15;;;;8462:4;8455:12;8426:130;;;8570:11;;;-1:-1;;;7905:683;;7863:731;;;;;;8602:142;8693:45;8732:5;8693:45;;9106:376;;9266:67;9330:2;9325:3;9266:67;;;9366:34;9346:55;;9435:9;9430:2;9421:12;;9414:31;9473:2;9464:12;;9252:230;-1:-1;;9252:230;9491:327;;9651:67;9715:2;9710:3;9651:67;;;9751:29;9731:50;;9809:2;9800:12;;9637:181;-1:-1;;9637:181;9827:377;;9987:67;10051:2;10046:3;9987:67;;;10087:34;10067:55;;10156:10;10151:2;10142:12;;10135:32;10195:2;10186:12;;9973:231;-1:-1;;9973:231;10213:308;;10373:66;10437:1;10432:3;10373:66;;;10472:11;10452:32;;10512:2;10503:12;;10359:162;-1:-1;;10359:162;10530:310;;10690:67;10754:2;10749:3;10690:67;;;10790:12;10770:33;;10831:2;10822:12;;10676:164;-1:-1;;10676:164;10849:377;;11009:67;11073:2;11068:3;11009:67;;;11109:34;11089:55;;11178:10;11173:2;11164:12;;11157:32;11217:2;11208:12;;10995:231;-1:-1;;10995:231;11235:371;;11395:67;11459:2;11454:3;11395:67;;;11495:34;11475:55;;11564:4;11559:2;11550:12;;11543:26;11597:2;11588:12;;11381:225;-1:-1;;11381:225;11615:370;;11775:67;11839:2;11834:3;11775:67;;;11875:34;11855:55;;11944:3;11939:2;11930:12;;11923:25;11976:2;11967:12;;11761:224;-1:-1;;11761:224;11994:307;;12154:66;12218:1;12213:3;12154:66;;;12253:10;12233:31;;12292:2;12283:12;;12140:161;-1:-1;;12140:161;12310:319;;12470:67;12534:2;12529:3;12470:67;;;12570:21;12550:42;;12620:2;12611:12;;12456:173;-1:-1;;12456:173;12638:372;;12798:67;12862:2;12857:3;12798:67;;;12898:34;12878:55;;12967:5;12962:2;12953:12;;12946:27;13001:2;12992:12;;12784:226;-1:-1;;12784:226;13019:329;;13179:67;13243:2;13238:3;13179:67;;;13279:31;13259:52;;13339:2;13330:12;;13165:183;-1:-1;;13165:183;13357:308;;13517:66;13581:1;13576:3;13517:66;;;13616:11;13596:32;;13656:2;13647:12;;13503:162;-1:-1;;13503:162;13674:307;;13834:66;13898:1;13893:3;13834:66;;;13933:10;13913:31;;13972:2;13963:12;;13820:161;-1:-1;;13820:161;13990:379;;14150:67;14214:2;14209:3;14150:67;;;14250:34;14230:55;;14319:12;14314:2;14305:12;;14298:34;14360:2;14351:12;;14136:233;-1:-1;;14136:233;14378:314;;14538:67;14602:2;14597:3;14538:67;;;14638:16;14618:37;;14683:2;14674:12;;14524:168;-1:-1;;14524:168;14701:380;;14861:67;14925:2;14920:3;14861:67;;;14961:34;14941:55;;15030:13;15025:2;15016:12;;15009:35;15072:2;15063:12;;14847:234;-1:-1;;14847:234;15090:317;;15250:67;15314:2;15309:3;15250:67;;;15350:19;15330:40;;15398:2;15389:12;;15236:171;-1:-1;;15236:171;15416:319;;15576:67;15640:2;15635:3;15576:67;;;15676:21;15656:42;;15726:2;15717:12;;15562:173;-1:-1;;15562:173;15744:318;;15904:67;15968:2;15963:3;15904:67;;;16004:20;15984:41;;16053:2;16044:12;;15890:172;-1:-1;;15890:172;16071:323;;16231:67;16295:2;16290:3;16231:67;;;16331:25;16311:46;;16385:2;16376:12;;16217:177;-1:-1;;16217:177;16403:310;;16563:67;16627:2;16622:3;16563:67;;;16663:12;16643:33;;16704:2;16695:12;;16549:164;-1:-1;;16549:164;16782:661;16998:23;;16927:4;16918:14;;;17027:63;16922:3;16998:23;17027:63;;;16947:149;17183:4;17176:5;17172:16;17166:23;17195:63;17252:4;17247:3;17243:14;17229:12;17195:63;;;17106:158;17347:4;17340:5;17336:16;17330:23;17359:63;17416:4;17411:3;17407:14;17393:12;17359:63;;;17274:154;16900:543;;;;17450:103;17523:24;17541:5;17523:24;;17680:110;17761:23;17778:5;17761:23;;17797:262;;17941:93;18030:3;18021:6;17941:93;;18066:213;18184:2;18169:18;;18198:71;18173:9;18242:6;18198:71;;18286:324;18432:2;18417:18;;18446:71;18421:9;18490:6;18446:71;;;18528:72;18596:2;18585:9;18581:18;18572:6;18528:72;;18617:435;18791:2;18776:18;;18805:71;18780:9;18849:6;18805:71;;;18887:72;18955:2;18944:9;18940:18;18931:6;18887:72;;;18970;19038:2;19027:9;19023:18;19014:6;18970:72;;19059:324;19205:2;19190:18;;19219:71;19194:9;19263:6;19219:71;;;19301:72;19369:2;19358:9;19354:18;19345:6;19301:72;;19390:201;19502:2;19487:18;;19516:65;19491:9;19554:6;19516:65;;19598:499;19780:2;19765:18;;19794:65;19769:9;19832:6;19794:65;;;19870:72;19938:2;19927:9;19923:18;19914:6;19870:72;;;19990:9;19984:4;19980:20;19975:2;19964:9;19960:18;19953:48;20015:72;20082:4;20073:6;20015:72;;;20007:80;19751:346;-1:-1;;;;;19751:346;20104:647;20332:3;20317:19;;20347:79;20321:9;20399:6;20347:79;;;20437:72;20505:2;20494:9;20490:18;20481:6;20437:72;;;20520;20588:2;20577:9;20573:18;20564:6;20520:72;;;20640:9;20634:4;20630:20;20625:2;20614:9;20610:18;20603:48;20665:76;20736:4;20727:6;20665:76;;;20657:84;20303:448;-1:-1;;;;;;20303:448;20758:301;20896:2;20910:47;;;20881:18;;20971:78;20881:18;21035:6;20971:78;;21066:407;21257:2;21271:47;;;21242:18;;21332:131;21242:18;21332:131;;21480:407;21671:2;21685:47;;;21656:18;;21746:131;21656:18;21746:131;;21894:407;22085:2;22099:47;;;22070:18;;22160:131;22070:18;22160:131;;22308:407;22499:2;22513:47;;;22484:18;;22574:131;22484:18;22574:131;;22722:407;22913:2;22927:47;;;22898:18;;22988:131;22898:18;22988:131;;23136:407;23327:2;23341:47;;;23312:18;;23402:131;23312:18;23402:131;;23550:407;23741:2;23755:47;;;23726:18;;23816:131;23726:18;23816:131;;23964:407;24155:2;24169:47;;;24140:18;;24230:131;24140:18;24230:131;;24378:407;24569:2;24583:47;;;24554:18;;24644:131;24554:18;24644:131;;24792:407;24983:2;24997:47;;;24968:18;;25058:131;24968:18;25058:131;;25206:407;25397:2;25411:47;;;25382:18;;25472:131;25382:18;25472:131;;25620:407;25811:2;25825:47;;;25796:18;;25886:131;25796:18;25886:131;;26034:407;26225:2;26239:47;;;26210:18;;26300:131;26210:18;26300:131;;26448:407;26639:2;26653:47;;;26624:18;;26714:131;26624:18;26714:131;;26862:407;27053:2;27067:47;;;27038:18;;27128:131;27038:18;27128:131;;27276:407;27467:2;27481:47;;;27452:18;;27542:131;27452:18;27542:131;;27690:407;27881:2;27895:47;;;27866:18;;27956:131;27866:18;27956:131;;28104:407;28295:2;28309:47;;;28280:18;;28370:131;28280:18;28370:131;;28518:407;28709:2;28723:47;;;28694:18;;28784:131;28694:18;28784:131;;28932:407;29123:2;29137:47;;;29108:18;;29198:131;29108:18;29198:131;;29346:407;29537:2;29551:47;;;29522:18;;29612:131;29522:18;29612:131;;29760:407;29951:2;29965:47;;;29936:18;;30026:131;29936:18;30026:131;;30174:317;30344:2;30329:18;;30358:123;30333:9;30454:6;30358:123;;30498:213;30616:2;30601:18;;30630:71;30605:9;30674:6;30630:71;;30718:402;30879:2;30864:18;;30893:71;30868:9;30937:6;30893:71;;;31012:9;31006:4;31002:20;30997:2;30986:9;30982:18;30975:48;31037:73;31105:4;31096:6;31037:73;;31127:647;31355:3;31340:19;;31370:71;31344:9;31414:6;31370:71;;;31452:80;31528:2;31517:9;31513:18;31504:6;31452:80;;31781:324;31927:2;31912:18;;31941:71;31916:9;31985:6;31941:71;;32112:423;32280:2;32265:18;;32294:71;32269:9;32338:6;32294:71;;;32376:72;32444:2;32433:9;32429:18;32420:6;32376:72;;;32459:66;32521:2;32510:9;32506:18;32497:6;32459:66;;32542:547;32744:3;32729:19;;32759:71;32733:9;32803:6;32759:71;;;32841:72;32909:2;32898:9;32894:18;32885:6;32841:72;;;32924;32992:2;32981:9;32977:18;32968:6;32924:72;;;33007;33075:2;33064:9;33060:18;33051:6;33007:72;;33096:209;33212:2;33197:18;;33226:69;33201:9;33268:6;33226:69;;33312:256;33374:2;33368:9;33400:17;;;33475:18;33460:34;;33496:22;;;33457:62;33454:2;;;33532:1;33529;33522:12;33454:2;33548;33541:22;33352:216;;-1:-1;33352:216;33575:321;;33718:18;33710:6;33707:30;33704:2;;;33750:1;33747;33740:12;33704:2;-1:-1;33881:4;33817;33794:17;;;;33813:9;33790:33;33871:15;;33641:255;33903:157;;33997:14;;;34039:4;34026:18;;;33956:104;34067:117;34150:12;;34121:63;34449:162;34551:19;;;34600:4;34591:14;;34544:67;34620:144;34755:3;34733:31;-1:-1;34733:31;34944:91;;35006:24;35024:5;35006:24;;35042:85;35108:13;35101:21;;35084:43;35134:109;35207:30;35196:42;;35179:64;35250:121;35323:42;35312:54;;35295:76;35457:88;35529:10;35518:22;;35501:44;35552:116;;35639:24;35657:5;35639:24;;35676:145;35757:6;35752:3;35747;35734:30;-1:-1;35813:1;35795:16;;35788:27;35727:94;35830:268;35895:1;35902:101;35916:6;35913:1;35910:13;35902:101;;;35983:11;;;35977:18;35964:11;;;35957:39;35938:2;35931:10;35902:101;;;36018:6;36015:1;36012:13;36009:2;;;-1:-1;;36083:1;36065:16;;36058:27;35879:219;36106:97;36194:2;36174:14;36190:7;36170:28;;36154:49;36211:117;36280:24;36298:5;36280:24;;;36273:5;36270:35;36260:2;;36319:1;36316;36309:12;36335:111;36401:21;36416:5;36401:21;;36453:117;36522:24;36540:5;36522:24;;36577:117;36646:24;36664:5;36646:24;;36701:115;36769:23;36786:5;36769:23;", - "source": "pragma solidity 0.5.17;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/SafeERC20.sol\";\nimport \"../lib/SafeMath.sol\";\nimport '../lib/IUniswapV2Pair.sol';\nimport \"../lib/UniswapV2OracleLibrary.sol\";\nimport \"../token/YAMTokenInterface.sol\";\n\n\ncontract YAMRebaser {\n\n using SafeMath for uint256;\n\n modifier onlyGov() {\n require(msg.sender == gov);\n _;\n }\n\n struct Transaction {\n bool enabled;\n address destination;\n bytes data;\n }\n\n struct UniVars {\n uint256 yamsToUni;\n uint256 amountFromReserves;\n uint256 mintToReserves;\n }\n\n event TransactionFailed(address indexed destination, uint index, bytes data);\n\n event NewMaxSlippageFactor(uint256 oldSlippageFactor, uint256 newSlippageFactor);\n\n event NewDeviationThreshold(uint256 oldDeviationThreshold, uint256 newDeviationThreshold);\n\n /**\n * @notice Sets the treasury mint percentage of rebase\n */\n event NewRebaseMintPercent(uint256 oldRebaseMintPerc, uint256 newRebaseMintPerc);\n\n\n /**\n * @notice Sets the reserve contract\n */\n event NewReserveContract(address oldReserveContract, address newReserveContract);\n\n /**\n * @notice Sets the reserve contract\n */\n event TreasuryIncreased(uint256 reservesAdded, uint256 yamsSold, uint256 yamsFromReserves, uint256 yamsToReserves);\n\n\n /**\n * @notice Event emitted when pendingGov is changed\n */\n event NewPendingGov(address oldPendingGov, address newPendingGov);\n\n /**\n * @notice Event emitted when gov is changed\n */\n event NewGov(address oldGov, address newGov);\n\n // Stable ordering is not guaranteed.\n Transaction[] public transactions;\n\n\n /// @notice Governance address\n address public gov;\n\n /// @notice Pending Governance address\n address public pendingGov;\n\n // Spreads out getting to the target price\n uint256 public rebaseLag;\n\n // Peg target\n uint256 public targetRate;\n\n // Percent of rebase that goes to minting for treasury building\n uint256 public rebaseMintPerc;\n\n // If the current exchange rate is within this fractional distance from the target, no supply\n // update is performed. Fixed point number--same format as the rate.\n // (ie) abs(rate - targetRate) / targetRate < deviationThreshold, then no supply change.\n uint256 public deviationThreshold;\n\n // More than this much time must pass between rebase operations.\n uint256 public minRebaseTimeIntervalSec;\n\n // Block timestamp of last rebase operation\n uint256 public lastRebaseTimestampSec;\n\n // The rebase window begins this many seconds into the minRebaseTimeInterval period.\n // For example if minRebaseTimeInterval is 24hrs, it represents the time of day in seconds.\n uint256 public rebaseWindowOffsetSec;\n\n // The length of the time window where a rebase operation is allowed to execute, in seconds.\n uint256 public rebaseWindowLengthSec;\n\n // The number of rebase cycles since inception\n uint256 public epoch;\n\n // rebasing is not active initially. It can be activated at T+12 hours from\n // deployment time\n bool public rebasingActive;\n\n // delays rebasing activation to facilitate liquidity\n uint256 public constant rebaseDelay = 12 hours;\n\n // Time of TWAP initialization\n uint256 public timeOfTWAPInit;\n\n // YAM token address\n address public yamAddress;\n\n // reserve token\n address public reserveToken;\n\n // Reserves vault contract\n address public reservesContract;\n\n // pair for reserveToken <> YAM\n address public uniswap_pair;\n\n // last TWAP update time\n uint32 public blockTimestampLast;\n\n // last TWAP cumulative price;\n uint256 public priceCumulativeLast;\n\n // Max slippage factor when buying reserve token. Magic number based on\n // the fact that uniswap is a constant product. Therefore,\n // targeting a % max slippage can be achieved by using a single precomputed\n // number. i.e. 2.5% slippage is always equal to some f(maxSlippageFactor, reserves)\n uint256 public maxSlippageFactor;\n\n // This token is first in uniswap YAM<>Reserve pair\n bool public isToken0;\n\n constructor(\n address yamAddress_,\n address reserveToken_,\n address uniswap_factory,\n address reservesContract_\n )\n public\n {\n minRebaseTimeIntervalSec = 12 hours;\n rebaseWindowOffsetSec = 36000;\n reservesContract = reservesContract_;\n (address token0, address token1) = sortTokens(yamAddress_, reserveToken_);\n\n // used for interacting with uniswap\n if (token0 == yamAddress_) {\n isToken0 = true;\n } else {\n isToken0 = false;\n }\n // uniswap YAM<>Reserve pair\n uniswap_pair = pairFor(uniswap_factory, token0, token1);\n\n // Reserves contract is mutable\n reservesContract = reservesContract_;\n\n // Reserve token is not mutable. Must deploy a new rebaser to update it\n reserveToken = reserveToken_;\n\n yamAddress = yamAddress_;\n\n // target 10% slippage\n // 5.4%\n maxSlippageFactor = 5409258 * 10**10;\n\n // 1 YCRV\n targetRate = 10**18;\n\n // twice daily rebase, with targeting reaching peg in 5 days\n rebaseLag = 10;\n\n // 10%\n rebaseMintPerc = 10**17;\n\n // 5%\n deviationThreshold = 5 * 10**16;\n\n // 60 minutes\n rebaseWindowLengthSec = 60 * 60;\n\n // Changed in deployment scripts to facilitate protocol initiation\n gov = msg.sender;\n\n }\n\n /** @notice Updates slippage factor\n *\n */\n function setMaxSlippageFactor(uint256 maxSlippageFactor_)\n public\n onlyGov\n {\n uint256 oldSlippageFactor = maxSlippageFactor;\n maxSlippageFactor = maxSlippageFactor_;\n emit NewMaxSlippageFactor(oldSlippageFactor, maxSlippageFactor_);\n }\n\n /** @notice Updates rebase mint percentage\n *\n */\n function setRebaseMintPerc(uint256 rebaseMintPerc_)\n public\n onlyGov\n {\n uint256 oldPerc = rebaseMintPerc;\n rebaseMintPerc = rebaseMintPerc_;\n emit NewRebaseMintPercent(oldPerc, rebaseMintPerc_);\n }\n\n\n /** @notice Updates reserve contract\n *\n */\n function setReserveContract(address reservesContract_)\n public\n onlyGov\n {\n address oldReservesContract = reservesContract;\n reservesContract = reservesContract_;\n emit NewReserveContract(oldReservesContract, reservesContract_);\n }\n\n\n /** @notice sets the pendingGov\n * @param pendingGov_ The address of the rebaser contract to use for authentication.\n */\n function _setPendingGov(address pendingGov_)\n external\n onlyGov\n {\n address oldPendingGov = pendingGov;\n pendingGov = pendingGov_;\n emit NewPendingGov(oldPendingGov, pendingGov_);\n }\n\n /** @notice lets msg.sender accept governance\n *\n */\n function _acceptGov()\n external\n {\n require(msg.sender == pendingGov, \"!pending\");\n address oldGov = gov;\n gov = pendingGov;\n pendingGov = address(0);\n emit NewGov(oldGov, gov);\n }\n\n /** @notice Initializes TWAP start point, starts countdown to first rebase\n *\n */\n function init_twap()\n public\n {\n require(timeOfTWAPInit == 0, \"already activated\");\n (uint priceCumulative, uint32 blockTimestamp) =\n UniswapV2OracleLibrary.currentCumulativePrices(uniswap_pair, isToken0);\n require(blockTimestamp > 0, \"no trades\");\n blockTimestampLast = blockTimestamp;\n priceCumulativeLast = priceCumulative;\n timeOfTWAPInit = blockTimestamp;\n }\n\n /** @notice Activates rebasing\n * @dev One way function, cannot be undone, callable by anyone\n */\n function activate_rebasing()\n public\n {\n require(timeOfTWAPInit > 0, \"twap wasnt intitiated, call init_twap()\");\n // cannot enable prior to end of rebaseDelay\n require(now >= timeOfTWAPInit + rebaseDelay, \"!end_delay\");\n\n rebasingActive = true;\n }\n\n /**\n * @notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n *\n * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag\n * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n * and targetRate is 1e18\n */\n function rebase()\n public\n {\n // ensure rebasing at correct time\n _inRebaseWindow();\n\n // This comparison also ensures there is no reentrancy.\n require(lastRebaseTimestampSec.add(minRebaseTimeIntervalSec) < now);\n\n // Snap the rebase time to the start of this window.\n lastRebaseTimestampSec = now.sub(\n now.mod(minRebaseTimeIntervalSec)).add(rebaseWindowOffsetSec);\n\n epoch = epoch.add(1);\n\n // get twap from uniswap v2;\n uint256 exchangeRate = getTWAP();\n\n // calculates % change to supply\n (uint256 offPegPerc, bool positive) = computeOffPegPerc(exchangeRate);\n\n uint256 indexDelta = offPegPerc;\n\n // Apply the Dampening factor.\n indexDelta = indexDelta.div(rebaseLag);\n\n YAMTokenInterface yam = YAMTokenInterface(yamAddress);\n\n if (positive) {\n require(yam.yamsScalingFactor().mul(uint256(10**18).add(indexDelta)).div(10**18) < yam.maxScalingFactor(), \"new scaling factor will be too big\");\n }\n\n\n uint256 currSupply = yam.totalSupply();\n\n uint256 mintAmount;\n // reduce indexDelta to account for minting\n if (positive) {\n uint256 mintPerc = indexDelta.mul(rebaseMintPerc).div(10**18);\n indexDelta = indexDelta.sub(mintPerc);\n mintAmount = currSupply.mul(mintPerc).div(10**18);\n }\n\n // rebase\n uint256 supplyAfterRebase = yam.rebase(epoch, indexDelta, positive);\n assert(yam.yamsScalingFactor() <= yam.maxScalingFactor());\n\n // perform actions after rebase\n afterRebase(mintAmount, offPegPerc);\n }\n\n\n function uniswapV2Call(\n address sender,\n uint256 amount0,\n uint256 amount1,\n bytes memory data\n )\n public\n {\n // enforce that it is coming from uniswap\n require(msg.sender == uniswap_pair, \"bad msg.sender\");\n // enforce that this contract called uniswap\n require(sender == address(this), \"bad origin\");\n (UniVars memory uniVars) = abi.decode(data, (UniVars));\n\n YAMTokenInterface yam = YAMTokenInterface(yamAddress);\n\n if (uniVars.amountFromReserves > 0) {\n // transfer from reserves and mint to uniswap\n yam.transferFrom(reservesContract, uniswap_pair, uniVars.amountFromReserves);\n if (uniVars.amountFromReserves < uniVars.yamsToUni) {\n // if these amount from reserves < yamsToUni, we have fully paid for the yCRV tokens\n // this number would be 0. no need to mint\n yam.mint(uniswap_pair, uniVars.yamsToUni.sub(uniVars.amountFromReserves));\n }\n } else {\n // mint to uniswap\n yam.mint(uniswap_pair, uniVars.yamsToUni);\n }\n\n // mint unsold to mintAmount\n if (uniVars.mintToReserves > 0) {\n yam.mint(reservesContract, uniVars.mintToReserves);\n }\n\n // transfer reserve token to reserves\n if (isToken0) {\n SafeERC20.safeTransfer(IERC20(reserveToken), reservesContract, amount1);\n emit TreasuryIncreased(amount1, uniVars.yamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves);\n } else {\n SafeERC20.safeTransfer(IERC20(reserveToken), reservesContract, amount0);\n emit TreasuryIncreased(amount0, uniVars.yamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves);\n }\n }\n\n function buyReserveAndTransfer(\n uint256 mintAmount,\n uint256 offPegPerc\n )\n internal\n {\n UniswapPair pair = UniswapPair(uniswap_pair);\n\n YAMTokenInterface yam = YAMTokenInterface(yamAddress);\n\n // get reserves\n (uint256 token0Reserves, uint256 token1Reserves, ) = pair.getReserves();\n\n // check if protocol has excess yam in the reserve\n uint256 excess = yam.balanceOf(reservesContract);\n\n\n uint256 tokens_to_max_slippage = uniswapMaxSlippage(token0Reserves, token1Reserves, offPegPerc);\n\n UniVars memory uniVars = UniVars({\n yamsToUni: tokens_to_max_slippage, // how many yams uniswap needs\n amountFromReserves: excess, // how much of yamsToUni comes from reserves\n mintToReserves: 0 // how much yams protocol mints to reserves\n });\n\n // tries to sell all mint + excess\n // falls back to selling some of mint and all of excess\n // if all else fails, sells portion of excess\n // upon pair.swap, `uniswapV2Call` is called by the uniswap pair contract\n if (isToken0) {\n if (tokens_to_max_slippage > mintAmount.add(excess)) {\n // we already have performed a safemath check on mintAmount+excess\n // so we dont need to continue using it in this code path\n\n // can handle selling all of reserves and mint\n uint256 buyTokens = getAmountOut(mintAmount + excess, token0Reserves, token1Reserves);\n uniVars.yamsToUni = mintAmount + excess;\n uniVars.amountFromReserves = excess;\n // call swap using entire mint amount and excess; mint 0 to reserves\n pair.swap(0, buyTokens, address(this), abi.encode(uniVars));\n } else {\n if (tokens_to_max_slippage > excess) {\n // uniswap can handle entire reserves\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token0Reserves, token1Reserves);\n\n // swap up to slippage limit, taking entire yam reserves, and minting part of total\n uniVars.mintToReserves = mintAmount.sub((tokens_to_max_slippage - excess));\n pair.swap(0, buyTokens, address(this), abi.encode(uniVars));\n } else {\n // uniswap cant handle all of excess\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token0Reserves, token1Reserves);\n uniVars.amountFromReserves = tokens_to_max_slippage;\n uniVars.mintToReserves = mintAmount;\n // swap up to slippage limit, taking excess - remainingExcess from reserves, and minting full amount\n // to reserves\n pair.swap(0, buyTokens, address(this), abi.encode(uniVars));\n }\n }\n } else {\n if (tokens_to_max_slippage > mintAmount.add(excess)) {\n // can handle all of reserves and mint\n uint256 buyTokens = getAmountOut(mintAmount + excess, token1Reserves, token0Reserves);\n uniVars.yamsToUni = mintAmount + excess;\n uniVars.amountFromReserves = excess;\n // call swap using entire mint amount and excess; mint 0 to reserves\n pair.swap(buyTokens, 0, address(this), abi.encode(uniVars));\n } else {\n if (tokens_to_max_slippage > excess) {\n // uniswap can handle entire reserves\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token1Reserves, token0Reserves);\n\n // swap up to slippage limit, taking entire yam reserves, and minting part of total\n uniVars.mintToReserves = mintAmount.sub( (tokens_to_max_slippage - excess));\n // swap up to slippage limit, taking entire yam reserves, and minting part of total\n pair.swap(buyTokens, 0, address(this), abi.encode(uniVars));\n } else {\n // uniswap cant handle all of excess\n uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token1Reserves, token0Reserves);\n uniVars.amountFromReserves = tokens_to_max_slippage;\n uniVars.mintToReserves = mintAmount;\n // swap up to slippage limit, taking excess - remainingExcess from reserves, and minting full amount\n // to reserves\n pair.swap(buyTokens, 0, address(this), abi.encode(uniVars));\n }\n }\n }\n }\n\n function uniswapMaxSlippage(\n uint256 token0,\n uint256 token1,\n uint256 offPegPerc\n )\n internal\n view\n returns (uint256)\n {\n if (isToken0) {\n if (offPegPerc >= 10**17) {\n // cap slippage\n return token0.mul(maxSlippageFactor).div(10**18);\n } else {\n // in the 5-10% off peg range, slippage is essentially 2*x (where x is percentage of pool to buy).\n // all we care about is not pushing below the peg, so underestimate\n // the amount we can sell by dividing by 3. resulting price impact\n // should be ~= offPegPerc * 2 / 3, which will keep us above the peg\n //\n // this is a conservative heuristic\n return token0.mul(offPegPerc / 3).div(10**18);\n }\n } else {\n if (offPegPerc >= 10**17) {\n return token1.mul(maxSlippageFactor).div(10**18);\n } else {\n return token1.mul(offPegPerc / 3).div(10**18);\n }\n }\n }\n\n // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n function getAmountOut(\n uint amountIn,\n uint reserveIn,\n uint reserveOut\n )\n internal\n pure\n returns (uint amountOut)\n {\n require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\n uint amountInWithFee = amountIn.mul(997);\n uint numerator = amountInWithFee.mul(reserveOut);\n uint denominator = reserveIn.mul(1000).add(amountInWithFee);\n amountOut = numerator / denominator;\n }\n\n\n function afterRebase(\n uint256 mintAmount,\n uint256 offPegPerc\n )\n internal\n {\n // update uniswap\n UniswapPair(uniswap_pair).sync();\n\n if (mintAmount > 0) {\n buyReserveAndTransfer(\n mintAmount,\n offPegPerc\n );\n }\n\n // call any extra functions\n for (uint i = 0; i < transactions.length; i++) {\n Transaction storage t = transactions[i];\n if (t.enabled) {\n bool result =\n externalCall(t.destination, t.data);\n if (!result) {\n emit TransactionFailed(t.destination, i, t.data);\n revert(\"Transaction Failed\");\n }\n }\n }\n }\n\n\n /**\n * @notice Calculates TWAP from uniswap\n *\n * @dev When liquidity is low, this can be manipulated by an end of block -> next block\n * attack. We delay the activation of rebases 12 hours after liquidity incentives\n * to reduce this attack vector. Additional there is very little supply\n * to be able to manipulate this during that time period of highest vuln.\n */\n function getTWAP()\n internal\n returns (uint256)\n {\n (uint priceCumulative, uint32 blockTimestamp) =\n UniswapV2OracleLibrary.currentCumulativePrices(uniswap_pair, isToken0);\n uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired\n\n // no period check as is done in isRebaseWindow\n\n // overflow is desired, casting never truncates\n // cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed\n FixedPoint.uq112x112 memory priceAverage = FixedPoint.uq112x112(uint224((priceCumulative - priceCumulativeLast) / timeElapsed));\n\n priceCumulativeLast = priceCumulative;\n blockTimestampLast = blockTimestamp;\n\n return FixedPoint.decode144(FixedPoint.mul(priceAverage, 10**18));\n }\n\n /**\n * @notice Sets the deviation threshold fraction. If the exchange rate given by the market\n * oracle is within this fractional distance from the targetRate, then no supply\n * modifications are made.\n * @param deviationThreshold_ The new exchange rate threshold fraction.\n */\n function setDeviationThreshold(uint256 deviationThreshold_)\n external\n onlyGov\n {\n require(deviationThreshold > 0);\n uint256 oldDeviationThreshold = deviationThreshold;\n deviationThreshold = deviationThreshold_;\n emit NewDeviationThreshold(oldDeviationThreshold, deviationThreshold_);\n }\n\n /**\n * @notice Sets the rebase lag parameter.\n It is used to dampen the applied supply adjustment by 1 / rebaseLag\n If the rebase lag R, equals 1, the smallest value for R, then the full supply\n correction is applied on each rebase cycle.\n If it is greater than 1, then a correction of 1/R of is applied on each rebase.\n * @param rebaseLag_ The new rebase lag parameter.\n */\n function setRebaseLag(uint256 rebaseLag_)\n external\n onlyGov\n {\n require(rebaseLag_ > 0);\n rebaseLag = rebaseLag_;\n }\n\n /**\n * @notice Sets the targetRate parameter.\n * @param targetRate_ The new target rate parameter.\n */\n function setTargetRate(uint256 targetRate_)\n external\n onlyGov\n {\n require(targetRate_ > 0);\n targetRate = targetRate_;\n }\n\n /**\n * @notice Sets the parameters which control the timing and frequency of\n * rebase operations.\n * a) the minimum time period that must elapse between rebase cycles.\n * b) the rebase window offset parameter.\n * c) the rebase window length parameter.\n * @param minRebaseTimeIntervalSec_ More than this much time must pass between rebase\n * operations, in seconds.\n * @param rebaseWindowOffsetSec_ The number of seconds from the beginning of\n the rebase interval, where the rebase window begins.\n * @param rebaseWindowLengthSec_ The length of the rebase window in seconds.\n */\n function setRebaseTimingParameters(\n uint256 minRebaseTimeIntervalSec_,\n uint256 rebaseWindowOffsetSec_,\n uint256 rebaseWindowLengthSec_)\n external\n onlyGov\n {\n require(minRebaseTimeIntervalSec_ > 0);\n require(rebaseWindowOffsetSec_ < minRebaseTimeIntervalSec_);\n\n minRebaseTimeIntervalSec = minRebaseTimeIntervalSec_;\n rebaseWindowOffsetSec = rebaseWindowOffsetSec_;\n rebaseWindowLengthSec = rebaseWindowLengthSec_;\n }\n\n /**\n * @return If the latest block timestamp is within the rebase time window it, returns true.\n * Otherwise, returns false.\n */\n function inRebaseWindow() public view returns (bool) {\n\n // rebasing is delayed until there is a liquid market\n _inRebaseWindow();\n return true;\n }\n\n function _inRebaseWindow() internal view {\n\n // rebasing is delayed until there is a liquid market\n require(rebasingActive, \"rebasing not active\");\n\n require(now.mod(minRebaseTimeIntervalSec) >= rebaseWindowOffsetSec, \"too early\");\n require(now.mod(minRebaseTimeIntervalSec) < (rebaseWindowOffsetSec.add(rebaseWindowLengthSec)), \"too late\");\n }\n\n /**\n * @return Computes in % how far off market is from peg\n */\n function computeOffPegPerc(uint256 rate)\n private\n view\n returns (uint256, bool)\n {\n if (withinDeviationThreshold(rate)) {\n return (0, false);\n }\n\n // indexDelta = (rate - targetRate) / targetRate\n if (rate > targetRate) {\n return (rate.sub(targetRate).mul(10**18).div(targetRate), true);\n } else {\n return (targetRate.sub(rate).mul(10**18).div(targetRate), false);\n }\n }\n\n /**\n * @param rate The current exchange rate, an 18 decimal fixed point number.\n * @return If the rate is within the deviation threshold from the target rate, returns true.\n * Otherwise, returns false.\n */\n function withinDeviationThreshold(uint256 rate)\n private\n view\n returns (bool)\n {\n uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold)\n .div(10 ** 18);\n\n return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold)\n || (rate < targetRate && targetRate.sub(rate) < absoluteDeviationThreshold);\n }\n\n /* - Constructor Helpers - */\n\n // calculates the CREATE2 address for a pair without making any external calls\n function pairFor(\n address factory,\n address token0,\n address token1\n )\n internal\n pure\n returns (address pair)\n {\n pair = address(uint(keccak256(abi.encodePacked(\n hex'ff',\n factory,\n keccak256(abi.encodePacked(token0, token1)),\n hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash\n ))));\n }\n\n // returns sorted token addresses, used to handle return values from pairs sorted in this order\n function sortTokens(\n address tokenA,\n address tokenB\n )\n internal\n pure\n returns (address token0, address token1)\n {\n require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');\n }\n\n /* -- Rebase helpers -- */\n\n /**\n * @notice Adds a transaction that gets called for a downstream receiver of rebases\n * @param destination Address of contract destination\n * @param data Transaction data payload\n */\n function addTransaction(address destination, bytes calldata data)\n external\n onlyGov\n {\n transactions.push(Transaction({\n enabled: true,\n destination: destination,\n data: data\n }));\n }\n\n\n /**\n * @param index Index of transaction to remove.\n * Transaction ordering may have changed since adding.\n */\n function removeTransaction(uint index)\n external\n onlyGov\n {\n require(index < transactions.length, \"index out of bounds\");\n\n if (index < transactions.length - 1) {\n transactions[index] = transactions[transactions.length - 1];\n }\n\n transactions.length--;\n }\n\n /**\n * @param index Index of transaction. Transaction ordering may have changed since adding.\n * @param enabled True for enabled, false for disabled.\n */\n function setTransactionEnabled(uint index, bool enabled)\n external\n onlyGov\n {\n require(index < transactions.length, \"index must be in range of stored tx list\");\n transactions[index].enabled = enabled;\n }\n\n /**\n * @dev wrapper to call the encoded transactions on downstream consumers.\n * @param destination Address of destination contract.\n * @param data The encoded data payload.\n * @return True on success\n */\n function externalCall(address destination, bytes memory data)\n internal\n returns (bool)\n {\n bool result;\n assembly { // solhint-disable-line no-inline-assembly\n // \"Allocate\" memory for output\n // (0x40 is where \"free memory\" pointer is stored by convention)\n let outputAddress := mload(0x40)\n\n // First 32 bytes are the padded length of data, so exclude that\n let dataAddress := add(data, 32)\n\n result := call(\n // 34710 is the value that solidity is currently emitting\n // It includes callGas (700) + callVeryLow (3, to pay for SUB)\n // + callValueTransferGas (9000) + callNewAccountGas\n // (25000, in case the destination address does not exist and needs creating)\n sub(gas, 34710),\n\n\n destination,\n 0, // transfer value in wei\n dataAddress,\n mload(data), // Size of the input, in bytes. Stored in position 0 of the array.\n outputAddress,\n 0 // Output is ignored, therefore the output size is zero\n )\n }\n return result;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol", - "exportedSymbols": { - "YAMRebaser": [ - 16828 - ] - }, - "id": 16829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 15113, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:20" - }, - { - "id": 15114, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:20" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 15115, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 14806, - "src": "59:30:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 15116, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 14993, - "src": "90:29:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "file": "../lib/IUniswapV2Pair.sol", - "id": 15117, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 14601, - "src": "120:35:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol", - "file": "../lib/UniswapV2OracleLibrary.sol", - "id": 15118, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 15112, - "src": "156:43:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 15119, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 19203, - "src": "200:40:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 16828, - "linearizedBaseContracts": [ - 16828 - ], - "name": "YAMRebaser", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 15122, - "libraryName": { - "contractScope": null, - "id": 15120, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "276:8:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "270:27:20", - "typeName": { - "id": 15121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "289:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "body": { - "id": 15132, - "nodeType": "Block", - "src": "322:54:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15125, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "340:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "340:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15127, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "354:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "340:17:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 15124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "332:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "332:26:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15130, - "nodeType": "ExpressionStatement", - "src": "332:26:20" - }, - { - "id": 15131, - "nodeType": "PlaceholderStatement", - "src": "368:1:20" - } - ] - }, - "documentation": null, - "id": 15133, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 15123, - "nodeType": "ParameterList", - "parameters": [], - "src": "319:2:20" - }, - "src": "303:73:20", - "visibility": "internal" - }, - { - "canonicalName": "YAMRebaser.Transaction", - "id": 15140, - "members": [ - { - "constant": false, - "id": 15135, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 15140, - "src": "411:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15134, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "411:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15137, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 15140, - "src": "433:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15136, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "433:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15139, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 15140, - "src": "462:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 15138, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "462:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Transaction", - "nodeType": "StructDefinition", - "scope": 16828, - "src": "382:97:20", - "visibility": "public" - }, - { - "canonicalName": "YAMRebaser.UniVars", - "id": 15147, - "members": [ - { - "constant": false, - "id": 15142, - "name": "yamsToUni", - "nodeType": "VariableDeclaration", - "scope": 15147, - "src": "508:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "508:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15144, - "name": "amountFromReserves", - "nodeType": "VariableDeclaration", - "scope": 15147, - "src": "533:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15143, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "533:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15146, - "name": "mintToReserves", - "nodeType": "VariableDeclaration", - "scope": 15147, - "src": "567:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "567:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "UniVars", - "nodeType": "StructDefinition", - "scope": 16828, - "src": "485:111:20", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 15155, - "name": "TransactionFailed", - "nodeType": "EventDefinition", - "parameters": { - "id": 15154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15149, - "indexed": true, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 15155, - "src": "626:27:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15148, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "626:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15151, - "indexed": false, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 15155, - "src": "655:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15150, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "655:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15153, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 15155, - "src": "667:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 15152, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "667:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "625:53:20" - }, - "src": "602:77:20" - }, - { - "anonymous": false, - "documentation": null, - "id": 15161, - "name": "NewMaxSlippageFactor", - "nodeType": "EventDefinition", - "parameters": { - "id": 15160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15157, - "indexed": false, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 15161, - "src": "712:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "712:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15159, - "indexed": false, - "name": "newSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 15161, - "src": "739:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "739:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "711:54:20" - }, - "src": "685:81:20" - }, - { - "anonymous": false, - "documentation": null, - "id": 15167, - "name": "NewDeviationThreshold", - "nodeType": "EventDefinition", - "parameters": { - "id": 15166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15163, - "indexed": false, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 15167, - "src": "800:29:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "800:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15165, - "indexed": false, - "name": "newDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 15167, - "src": "831:29:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "831:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "799:62:20" - }, - "src": "772:90:20" - }, - { - "anonymous": false, - "documentation": "@notice Sets the treasury mint percentage of rebase", - "id": 15173, - "name": "NewRebaseMintPercent", - "nodeType": "EventDefinition", - "parameters": { - "id": 15172, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15169, - "indexed": false, - "name": "oldRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 15173, - "src": "970:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15168, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "970:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15171, - "indexed": false, - "name": "newRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 15173, - "src": "997:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15170, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "997:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "969:54:20" - }, - "src": "943:81:20" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 15179, - "name": "NewReserveContract", - "nodeType": "EventDefinition", - "parameters": { - "id": 15178, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15175, - "indexed": false, - "name": "oldReserveContract", - "nodeType": "VariableDeclaration", - "scope": 15179, - "src": "1113:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15174, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1113:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15177, - "indexed": false, - "name": "newReserveContract", - "nodeType": "VariableDeclaration", - "scope": 15179, - "src": "1141:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1141:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1112:56:20" - }, - "src": "1088:81:20" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 15189, - "name": "TreasuryIncreased", - "nodeType": "EventDefinition", - "parameters": { - "id": 15188, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15181, - "indexed": false, - "name": "reservesAdded", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1256:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1256:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15183, - "indexed": false, - "name": "yamsSold", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1279:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1279:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15185, - "indexed": false, - "name": "yamsFromReserves", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1297:24:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15184, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1297:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15187, - "indexed": false, - "name": "yamsToReserves", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1323:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15186, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1323:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1255:91:20" - }, - "src": "1232:115:20" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 15195, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 15194, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15191, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 15195, - "src": "1446:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15190, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1446:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15193, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 15195, - "src": "1469:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15192, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1469:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1445:46:20" - }, - "src": "1426:66:20" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 15201, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 15200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15197, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 15201, - "src": "1576:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1576:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15199, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 15201, - "src": "1592:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15198, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1592:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1575:32:20" - }, - "src": "1563:45:20" - }, - { - "constant": false, - "id": 15204, - "name": "transactions", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1656:33:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction[]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 15202, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15140, - "src": "1656:11:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction" - } - }, - "id": 15203, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1656:13:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage_ptr", - "typeString": "struct YAMRebaser.Transaction[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15206, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1732:18:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15205, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1732:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15208, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1800:25:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1800:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15210, - "name": "rebaseLag", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1879:24:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1879:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15212, - "name": "targetRate", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1928:25:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15211, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1928:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15214, - "name": "rebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2028:29:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15213, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2028:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15216, - "name": "deviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2328:33:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15215, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2328:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15218, - "name": "minRebaseTimeIntervalSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2437:39:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2437:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15220, - "name": "lastRebaseTimestampSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2531:37:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2531:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15222, - "name": "rebaseWindowOffsetSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2760:36:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2760:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15224, - "name": "rebaseWindowLengthSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2900:36:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2900:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15226, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2994:20:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2994:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15228, - "name": "rebasingActive", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3124:26:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15227, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3124:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 15231, - "name": "rebaseDelay", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3215:46:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15229, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3215:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3132", - "id": 15230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3253:8:20", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 15233, - "name": "timeOfTWAPInit", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3303:29:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3303:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15235, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3364:25:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15234, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3364:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15237, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3417:27:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15236, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3417:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15239, - "name": "reservesContract", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3482:31:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15238, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3482:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15241, - "name": "uniswap_pair", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3556:27:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15240, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3556:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15243, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3619:32:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15242, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3619:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15245, - "name": "priceCumulativeLast", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3693:34:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15244, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3693:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15247, - "name": "maxSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "4042:32:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15246, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4042:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15249, - "name": "isToken0", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "4137:20:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15248, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4137:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 15358, - "nodeType": "Block", - "src": "4329:1304:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15260, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "4341:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3132", - "id": 15261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4368:8:20", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "src": "4341:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15263, - "nodeType": "ExpressionStatement", - "src": "4341:35:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15264, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "4388:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3336303030", - "id": 15265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4412:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_36000_by_1", - "typeString": "int_const 36000" - }, - "value": "36000" - }, - "src": "4388:29:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15267, - "nodeType": "ExpressionStatement", - "src": "4388:29:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15268, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "4429:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15269, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15257, - "src": "4448:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4429:36:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15271, - "nodeType": "ExpressionStatement", - "src": "4429:36:20" - }, - { - "assignments": [ - 15273, - 15275 - ], - "declarations": [ - { - "constant": false, - "id": 15273, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 15358, - "src": "4478:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4478:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15275, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 15358, - "src": "4494:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15274, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4494:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15280, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15277, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15251, - "src": "4523:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15278, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15253, - "src": "4536:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15276, - "name": "sortTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16726, - "src": "4512:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$_t_address_$_t_address_$", - "typeString": "function (address,address) pure returns (address,address)" - } - }, - "id": 15279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4512:38:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4477:73:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15281, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15273, - "src": "4614:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15282, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15251, - "src": "4624:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4614:21:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15293, - "nodeType": "Block", - "src": "4687:45:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15289, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "4703:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 15290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4714:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4703:16:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15292, - "nodeType": "ExpressionStatement", - "src": "4703:16:20" - } - ] - }, - "id": 15294, - "nodeType": "IfStatement", - "src": "4610:122:20", - "trueBody": { - "id": 15288, - "nodeType": "Block", - "src": "4637:44:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15284, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "4653:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 15285, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4664:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "4653:15:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15287, - "nodeType": "ExpressionStatement", - "src": "4653:15:20" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 15301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15295, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "4782:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15297, - "name": "uniswap_factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15255, - "src": "4805:15:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15298, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15273, - "src": "4822:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15299, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15275, - "src": "4830:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15296, - "name": "pairFor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16683, - "src": "4797:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_address_$returns$_t_address_$", - "typeString": "function (address,address,address) pure returns (address)" - } - }, - "id": 15300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4797:40:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4782:55:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15302, - "nodeType": "ExpressionStatement", - "src": "4782:55:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15303, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "4892:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15304, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15257, - "src": "4911:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4892:36:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15306, - "nodeType": "ExpressionStatement", - "src": "4892:36:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15307, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15237, - "src": "5023:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15308, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15253, - "src": "5038:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5023:28:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15310, - "nodeType": "ExpressionStatement", - "src": "5023:28:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15311, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "5064:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15312, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15251, - "src": "5077:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5064:24:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15314, - "nodeType": "ExpressionStatement", - "src": "5064:24:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15315, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "5152:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - }, - "id": 15320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35343039323538", - "id": 15316, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5172:7:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5409258_by_1", - "typeString": "int_const 5409258" - }, - "value": "5409258" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - }, - "id": 15319, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5182:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5186:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5182:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - } - }, - "src": "5172:16:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - } - }, - "src": "5152:36:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15322, - "nodeType": "ExpressionStatement", - "src": "5152:36:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15323, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "5221:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15324, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5234:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15325, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5238:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "5234:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "5221:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15328, - "nodeType": "ExpressionStatement", - "src": "5221:19:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15329, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15210, - "src": "5324:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15330, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5336:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5324:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15332, - "nodeType": "ExpressionStatement", - "src": "5324:14:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15333, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "5368:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 15336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5385:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 15335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5389:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "5385:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "5368:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15338, - "nodeType": "ExpressionStatement", - "src": "5368:23:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15339, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "5420:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - }, - "id": 15344, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 15340, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5441:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - }, - "id": 15343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5445:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3136", - "id": 15342, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5449:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_16_by_1", - "typeString": "int_const 16" - }, - "value": "16" - }, - "src": "5445:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - } - }, - "src": "5441:10:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - } - }, - "src": "5420:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15346, - "nodeType": "ExpressionStatement", - "src": "5420:31:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15347, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15224, - "src": "5488:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_3600_by_1", - "typeString": "int_const 3600" - }, - "id": 15350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 15348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5512:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 15349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5517:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "src": "5512:7:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_3600_by_1", - "typeString": "int_const 3600" - } - }, - "src": "5488:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15352, - "nodeType": "ExpressionStatement", - "src": "5488:31:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15353, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "5609:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "5615:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5615:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5609:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15357, - "nodeType": "ExpressionStatement", - "src": "5609:16:20" - } - ] - }, - "documentation": null, - "id": 15359, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15258, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15251, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4185:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15250, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4185:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15253, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4214:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15252, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4214:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15255, - "name": "uniswap_factory", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4245:23:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15254, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4245:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15257, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4278:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15256, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4278:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4175:134:20" - }, - "returnParameters": { - "id": 15259, - "nodeType": "ParameterList", - "parameters": [], - "src": "4329:0:20" - }, - "scope": 16828, - "src": "4164:1469:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15379, - "nodeType": "Block", - "src": "5785:184:20", - "statements": [ - { - "assignments": [ - 15367 - ], - "declarations": [ - { - "constant": false, - "id": 15367, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 15379, - "src": "5795:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15366, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5795:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15369, - "initialValue": { - "argumentTypes": null, - "id": 15368, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "5823:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5795:45:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15370, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "5850:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15371, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15361, - "src": "5870:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5850:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15373, - "nodeType": "ExpressionStatement", - "src": "5850:38:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15375, - "name": "oldSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15367, - "src": "5924:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15376, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15361, - "src": "5943:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15374, - "name": "NewMaxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15161, - "src": "5903:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 15377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5903:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15378, - "nodeType": "EmitStatement", - "src": "5898:64:20" - } - ] - }, - "documentation": "@notice Updates slippage factor\n ", - "id": 15380, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15364, - "modifierName": { - "argumentTypes": null, - "id": 15363, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "5773:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "5773:7:20" - } - ], - "name": "setMaxSlippageFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15361, - "name": "maxSlippageFactor_", - "nodeType": "VariableDeclaration", - "scope": 15380, - "src": "5722:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15360, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5722:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5721:28:20" - }, - "returnParameters": { - "id": 15365, - "nodeType": "ParameterList", - "parameters": [], - "src": "5785:0:20" - }, - "scope": 16828, - "src": "5692:277:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15400, - "nodeType": "Block", - "src": "6122:152:20", - "statements": [ - { - "assignments": [ - 15388 - ], - "declarations": [ - { - "constant": false, - "id": 15388, - "name": "oldPerc", - "nodeType": "VariableDeclaration", - "scope": 15400, - "src": "6132:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15387, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6132:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15390, - "initialValue": { - "argumentTypes": null, - "id": 15389, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "6150:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6132:32:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15391, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "6174:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15392, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15382, - "src": "6191:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6174:32:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15394, - "nodeType": "ExpressionStatement", - "src": "6174:32:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15396, - "name": "oldPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15388, - "src": "6242:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15397, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15382, - "src": "6251:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15395, - "name": "NewRebaseMintPercent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15173, - "src": "6221:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 15398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6221:46:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15399, - "nodeType": "EmitStatement", - "src": "6216:51:20" - } - ] - }, - "documentation": "@notice Updates rebase mint percentage\n ", - "id": 15401, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15385, - "modifierName": { - "argumentTypes": null, - "id": 15384, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "6110:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6110:7:20" - } - ], - "name": "setRebaseMintPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15383, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15382, - "name": "rebaseMintPerc_", - "nodeType": "VariableDeclaration", - "scope": 15401, - "src": "6062:23:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6062:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6061:25:20" - }, - "returnParameters": { - "id": 15386, - "nodeType": "ParameterList", - "parameters": [], - "src": "6122:0:20" - }, - "scope": 16828, - "src": "6035:239:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15421, - "nodeType": "Block", - "src": "6425:182:20", - "statements": [ - { - "assignments": [ - 15409 - ], - "declarations": [ - { - "constant": false, - "id": 15409, - "name": "oldReservesContract", - "nodeType": "VariableDeclaration", - "scope": 15421, - "src": "6435:27:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15408, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6435:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15411, - "initialValue": { - "argumentTypes": null, - "id": 15410, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "6465:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6435:46:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15412, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "6491:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15413, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15403, - "src": "6510:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6491:36:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15415, - "nodeType": "ExpressionStatement", - "src": "6491:36:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15417, - "name": "oldReservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15409, - "src": "6561:19:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15418, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15403, - "src": "6582:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15416, - "name": "NewReserveContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15179, - "src": "6542:18:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 15419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6542:58:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15420, - "nodeType": "EmitStatement", - "src": "6537:63:20" - } - ] - }, - "documentation": "@notice Updates reserve contract\n ", - "id": 15422, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15406, - "modifierName": { - "argumentTypes": null, - "id": 15405, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "6413:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6413:7:20" - } - ], - "name": "setReserveContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15403, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 15422, - "src": "6363:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15402, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6363:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6362:27:20" - }, - "returnParameters": { - "id": 15407, - "nodeType": "ParameterList", - "parameters": [], - "src": "6425:0:20" - }, - "scope": 16828, - "src": "6335:272:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15442, - "nodeType": "Block", - "src": "6829:141:20", - "statements": [ - { - "assignments": [ - 15430 - ], - "declarations": [ - { - "constant": false, - "id": 15430, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 15442, - "src": "6839:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15429, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6839:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15432, - "initialValue": { - "argumentTypes": null, - "id": 15431, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "6863:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6839:34:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15433, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "6883:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15434, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15424, - "src": "6896:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6883:24:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15436, - "nodeType": "ExpressionStatement", - "src": "6883:24:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15438, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15430, - "src": "6936:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15439, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15424, - "src": "6951:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15437, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15195, - "src": "6922:13:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 15440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6922:41:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15441, - "nodeType": "EmitStatement", - "src": "6917:46:20" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 15443, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15427, - "modifierName": { - "argumentTypes": null, - "id": 15426, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "6817:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6817:7:20" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15425, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15424, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 15443, - "src": "6771:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15423, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6771:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6770:21:20" - }, - "returnParameters": { - "id": 15428, - "nodeType": "ParameterList", - "parameters": [], - "src": "6829:0:20" - }, - "scope": 16828, - "src": "6747:223:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 15473, - "nodeType": "Block", - "src": "7084:185:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15447, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7102:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7102:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15449, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "7116:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7102:24:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 15451, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7128:10:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 15446, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7094:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7094:45:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15453, - "nodeType": "ExpressionStatement", - "src": "7094:45:20" - }, - { - "assignments": [ - 15455 - ], - "declarations": [ - { - "constant": false, - "id": 15455, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 15473, - "src": "7149:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15454, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7149:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15457, - "initialValue": { - "argumentTypes": null, - "id": 15456, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "7166:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7149:20:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15458, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "7179:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15459, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "7185:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7179:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15461, - "nodeType": "ExpressionStatement", - "src": "7179:16:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15462, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "7205:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 15464, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7226:1:20", - "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": 15463, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7218:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15465, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7218:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7205:23:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15467, - "nodeType": "ExpressionStatement", - "src": "7205:23:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15469, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15455, - "src": "7250:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15470, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "7258:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15468, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15201, - "src": "7243:6:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 15471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7243:19:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15472, - "nodeType": "EmitStatement", - "src": "7238:24:20" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 15474, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15444, - "nodeType": "ParameterList", - "parameters": [], - "src": "7060:2:20" - }, - "returnParameters": { - "id": 15445, - "nodeType": "ParameterList", - "parameters": [], - "src": "7084:0:20" - }, - "scope": 16828, - "src": "7041:228:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 15513, - "nodeType": "Block", - "src": "7407:388:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15478, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "7425:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15479, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7443:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7425:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920616374697661746564", - "id": 15481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7446:19:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - }, - "value": "already activated" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - } - ], - "id": 15477, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7417:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7417:49:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15483, - "nodeType": "ExpressionStatement", - "src": "7417:49:20" - }, - { - "assignments": [ - 15485, - 15487 - ], - "declarations": [ - { - "constant": false, - "id": 15485, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 15513, - "src": "7477:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15484, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7477:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15487, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 15513, - "src": "7499:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15486, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "7499:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15493, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15490, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "7582:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15491, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "7596:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 15488, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15111, - "src": "7535:22:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$15111_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 15489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 15110, - "src": "7535:46:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 15492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7535:70:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7476:129:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15495, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15487, - "src": "7623:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7640:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7623:18:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f20747261646573", - "id": 15498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7643:11:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - }, - "value": "no trades" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - } - ], - "id": 15494, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7615:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7615:40:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15500, - "nodeType": "ExpressionStatement", - "src": "7615:40:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15501, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15243, - "src": "7665:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15502, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15487, - "src": "7686:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7665:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 15504, - "nodeType": "ExpressionStatement", - "src": "7665:35:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15505, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15245, - "src": "7710:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15506, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15485, - "src": "7732:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7710:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15508, - "nodeType": "ExpressionStatement", - "src": "7710:37:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15509, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "7757:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15510, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15487, - "src": "7774:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7757:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15512, - "nodeType": "ExpressionStatement", - "src": "7757:31:20" - } - ] - }, - "documentation": "@notice Initializes TWAP start point, starts countdown to first rebase\n ", - "id": 15514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "init_twap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15475, - "nodeType": "ParameterList", - "parameters": [], - "src": "7385:2:20" - }, - "returnParameters": { - "id": 15476, - "nodeType": "ParameterList", - "parameters": [], - "src": "7407:0:20" - }, - "scope": 16828, - "src": "7367:428:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15537, - "nodeType": "Block", - "src": "7959:240:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15518, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "7977:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15519, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7994:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7977:18:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "74776170207761736e7420696e74697469617465642c2063616c6c20696e69745f747761702829", - "id": 15521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7997:41:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - }, - "value": "twap wasnt intitiated, call init_twap()" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - } - ], - "id": 15517, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7969:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7969:70:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15523, - "nodeType": "ExpressionStatement", - "src": "7969:70:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15525, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8110:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15526, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "8117:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 15527, - "name": "rebaseDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15231, - "src": "8134:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8117:28:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8110:35:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21656e645f64656c6179", - "id": 15530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8147:12:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - }, - "value": "!end_delay" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - } - ], - "id": 15524, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8102:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8102:58:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15532, - "nodeType": "ExpressionStatement", - "src": "8102:58:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15533, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15228, - "src": "8171:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 15534, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8188:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8171:21:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15536, - "nodeType": "ExpressionStatement", - "src": "8171:21:20" - } - ] - }, - "documentation": "@notice Activates rebasing\n @dev One way function, cannot be undone, callable by anyone", - "id": 15538, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "activate_rebasing", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15515, - "nodeType": "ParameterList", - "parameters": [], - "src": "7937:2:20" - }, - "returnParameters": { - "id": 15516, - "nodeType": "ParameterList", - "parameters": [], - "src": "7959:0:20" - }, - "scope": 16828, - "src": "7911:288:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15699, - "nodeType": "Block", - "src": "8579:1620:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 15541, - "name": "_inRebaseWindow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16550, - "src": "8632:15:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$__$", - "typeString": "function () view" - } - }, - "id": 15542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8632:17:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15543, - "nodeType": "ExpressionStatement", - "src": "8632:17:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15547, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "8759:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15545, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15220, - "src": "8732:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "8732:26:20", - "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": 15548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8732:52:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 15549, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8787:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8732:58:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 15544, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "8724:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8724:67:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15552, - "nodeType": "ExpressionStatement", - "src": "8724:67:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15553, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15220, - "src": "8863:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15562, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "8948:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15558, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "8917:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15556, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8909:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 14968, - "src": "8909:7:20", - "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": 15559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8909:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15554, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8888:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "8888:7:20", - "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": 15560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8888:55:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "8888:59:20", - "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": 15563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8888:82:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8863:107:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15565, - "nodeType": "ExpressionStatement", - "src": "8863:107:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15566, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15226, - "src": "8981:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 15569, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8999:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 15567, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15226, - "src": "8989:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "8989:9:20", - "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": 15570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8989:12:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8981:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15572, - "nodeType": "ExpressionStatement", - "src": "8981:20:20" - }, - { - "assignments": [ - 15574 - ], - "declarations": [ - { - "constant": false, - "id": 15574, - "name": "exchangeRate", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9049:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15573, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9049:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15577, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 15575, - "name": "getTWAP", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16407, - "src": "9072:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () returns (uint256)" - } - }, - "id": 15576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9072:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9049:32:20" - }, - { - "assignments": [ - 15579, - 15581 - ], - "declarations": [ - { - "constant": false, - "id": 15579, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9134:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9134:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15581, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9154:13:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15580, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9154:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15585, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15583, - "name": "exchangeRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15574, - "src": "9189:12:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15582, - "name": "computeOffPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16605, - "src": "9171:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_bool_$", - "typeString": "function (uint256) view returns (uint256,bool)" - } - }, - "id": 15584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9171:31:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9133:69:20" - }, - { - "assignments": [ - 15587 - ], - "declarations": [ - { - "constant": false, - "id": 15587, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9213:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15586, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9213:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15589, - "initialValue": { - "argumentTypes": null, - "id": 15588, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15579, - "src": "9234:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9213:31:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15590, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9294:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15593, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15210, - "src": "9322:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15591, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9307:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9307:14:20", - "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": 15594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9307:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9294:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15596, - "nodeType": "ExpressionStatement", - "src": "9294:38:20" - }, - { - "assignments": [ - 15598 - ], - "declarations": [ - { - "constant": false, - "id": 15598, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9343:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 15597, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "9343:17:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15602, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15600, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "9385:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15599, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "9367:17:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 15601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9367:29:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9343:53:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 15603, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15581, - "src": "9411:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15631, - "nodeType": "IfStatement", - "src": "9407:183:20", - "trueBody": { - "id": 15630, - "nodeType": "Block", - "src": "9421:169:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9508:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9512:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9508:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15615, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9491:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15612, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9479:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15611, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9483:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9479:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "id": 15609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9471:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 15613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9471:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "9471:19:20", - "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": 15616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9471:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15605, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "9443:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19238, - "src": "9443:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9443:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9443:27:20", - "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": 15617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9443:60:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9443:64:20", - "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": 15622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9443:72:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15623, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "9518:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19120, - "src": "9518:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9518:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9443:97:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6577207363616c696e6720666163746f722077696c6c20626520746f6f20626967", - "id": 15627, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9542:36:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88492c32352e10f8ea97c185f2721f5b83e92075b5339799962a619fc82d5879", - "typeString": "literal_string \"new scaling factor will be too big\"" - }, - "value": "new scaling factor will be too big" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_88492c32352e10f8ea97c185f2721f5b83e92075b5339799962a619fc82d5879", - "typeString": "literal_string \"new scaling factor will be too big\"" - } - ], - "id": 15604, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9435:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9435:144:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15629, - "nodeType": "ExpressionStatement", - "src": "9435:144:20" - } - ] - } - }, - { - "assignments": [ - 15633 - ], - "declarations": [ - { - "constant": false, - "id": 15633, - "name": "currSupply", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9601:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9601:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15637, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15634, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "9622:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "totalSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 19226, - "src": "9622:15:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9622:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9601:38:20" - }, - { - "assignments": [ - 15639 - ], - "declarations": [ - { - "constant": false, - "id": 15639, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9650:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15638, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9650:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15640, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "9650:18:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 15641, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15581, - "src": "9734:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15674, - "nodeType": "IfStatement", - "src": "9730:214:20", - "trueBody": { - "id": 15673, - "nodeType": "Block", - "src": "9744:200:20", - "statements": [ - { - "assignments": [ - 15643 - ], - "declarations": [ - { - "constant": false, - "id": 15643, - "name": "mintPerc", - "nodeType": "VariableDeclaration", - "scope": 15673, - "src": "9758:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15642, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9758:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15653, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15651, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15649, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9812:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9816:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9812:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15646, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "9792:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15644, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9777:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9777:14:20", - "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": 15647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9777:30:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9777:34:20", - "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": 15652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9777:42:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9758:61:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15654, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9833:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15657, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15643, - "src": "9861:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15655, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9846:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "9846:14:20", - "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": 15658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9846:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9833:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15660, - "nodeType": "ExpressionStatement", - "src": "9833:37:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15661, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15639, - "src": "9884:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9926:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9930:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9926:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15664, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15643, - "src": "9912:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15662, - "name": "currSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15633, - "src": "9897:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9897:14:20", - "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": 15665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9897:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9897:28:20", - "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": 15670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9897:36:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9884:49:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15672, - "nodeType": "ExpressionStatement", - "src": "9884:49:20" - } - ] - } - }, - { - "assignments": [ - 15676 - ], - "declarations": [ - { - "constant": false, - "id": 15676, - "name": "supplyAfterRebase", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9972:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15675, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9972:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15683, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15679, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15226, - "src": "10011:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15680, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "10018:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15681, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15581, - "src": "10030:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 15677, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "10000:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "rebase", - "nodeType": "MemberAccess", - "referencedDeclaration": 19183, - "src": "10000:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,bool) external returns (uint256)" - } - }, - "id": 15682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10000:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9972:67:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15685, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "10056:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19238, - "src": "10056:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10056:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15688, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "10083:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19120, - "src": "10083:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10083:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10056:49:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 15684, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19255, - "src": "10049:6:20", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10049:57:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15693, - "nodeType": "ExpressionStatement", - "src": "10049:57:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15695, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15639, - "src": "10169:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15696, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15579, - "src": "10181:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15694, - "name": "afterRebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16350, - "src": "10157:11:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 15697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10157:35:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15698, - "nodeType": "ExpressionStatement", - "src": "10157:35:20" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is 1e18", - "id": 15700, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15539, - "nodeType": "ParameterList", - "parameters": [], - "src": "8557:2:20" - }, - "returnParameters": { - "id": 15540, - "nodeType": "ParameterList", - "parameters": [], - "src": "8579:0:20" - }, - "scope": 16828, - "src": "8542:1657:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15844, - "nodeType": "Block", - "src": "10355:1650:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15712, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10423:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10423:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15714, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "10437:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10423:26:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206d73672e73656e646572", - "id": 15716, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10451:16:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - }, - "value": "bad msg.sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - } - ], - "id": 15711, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10415:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10415:53:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15718, - "nodeType": "ExpressionStatement", - "src": "10415:53:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15720, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15702, - "src": "10539:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15722, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "10557:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 15721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10549:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10549:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10539:23:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206f726967696e", - "id": 15725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10564:12:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - }, - "value": "bad origin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - } - ], - "id": 15719, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10531:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10531:46:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15727, - "nodeType": "ExpressionStatement", - "src": "10531:46:20" - }, - { - "assignments": [ - 15729 - ], - "declarations": [ - { - "constant": false, - "id": 15729, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 15844, - "src": "10588:22:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 15728, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15147, - "src": "10588:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_storage_ptr", - "typeString": "struct YAMRebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15736, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15732, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15708, - "src": "10625:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 15733, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15147, - "src": "10632:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - } - ], - "id": 15734, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10631:9:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - ], - "expression": { - "argumentTypes": null, - "id": 15730, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "10614:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 15731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10614:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 15735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10614:27:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10587:54:20" - }, - { - "assignments": [ - 15738 - ], - "declarations": [ - { - "constant": false, - "id": 15738, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 15844, - "src": "10652:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 15737, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "10652:17:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15742, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15740, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "10694:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15739, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "10676:17:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 15741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10676:29:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10652:53:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15743, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10720:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15744, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "10720:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15745, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10749:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10720:30:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15784, - "nodeType": "Block", - "src": "11248:97:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15779, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "11302:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15780, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11316:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15781, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11316:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15776, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "11293:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 19172, - "src": "11293:8:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 15782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11293:41:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15783, - "nodeType": "ExpressionStatement", - "src": "11293:41:20" - } - ] - }, - "id": 15785, - "nodeType": "IfStatement", - "src": "10716:629:20", - "trueBody": { - "id": 15775, - "nodeType": "Block", - "src": "10752:490:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15750, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "10841:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15751, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "10859:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15752, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10873:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "10873:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15747, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "10824:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 19065, - "src": "10824:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 15754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10824:76:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15755, - "nodeType": "ExpressionStatement", - "src": "10824:76:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15756, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10918:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15757, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "10918:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15758, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10947:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15759, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "10947:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10918:46:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15774, - "nodeType": "IfStatement", - "src": "10914:318:20", - "trueBody": { - "id": 15773, - "nodeType": "Block", - "src": "10966:266:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15764, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "11153:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15768, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11189:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15769, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "11189:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15765, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11167:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15766, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11167:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "11167:21:20", - "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": 15770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11167:49:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15761, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "11144:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 19172, - "src": "11144:8:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 15771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11144:73:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15772, - "nodeType": "ExpressionStatement", - "src": "11144:73:20" - } - ] - } - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15786, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11396:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15787, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11396:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15788, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11421:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11396:26:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15799, - "nodeType": "IfStatement", - "src": "11392:107:20", - "trueBody": { - "id": 15798, - "nodeType": "Block", - "src": "11424:75:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15793, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "11447:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15794, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11465:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15795, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11465:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15790, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "11438:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 19172, - "src": "11438:8:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 15796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11438:50:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15797, - "nodeType": "ExpressionStatement", - "src": "11438:50:20" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "id": 15800, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "11559:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15842, - "nodeType": "Block", - "src": "11787:212:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15826, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15237, - "src": "11831:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15825, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "11824:6:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 15827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11824:20:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 15828, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "11846:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15829, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15704, - "src": "11864:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15822, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14805, - "src": "11801:9:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$14805_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 15824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14633, - "src": "11801:22:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 15830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11801:71:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15831, - "nodeType": "ExpressionStatement", - "src": "11801:71:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15833, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15704, - "src": "11909:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15834, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11918:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15835, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11918:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15836, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11937:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15837, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "11937:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15838, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11965:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15839, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11965:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15832, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15189, - "src": "11891:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 15840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11891:97:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15841, - "nodeType": "EmitStatement", - "src": "11886:102:20" - } - ] - }, - "id": 15843, - "nodeType": "IfStatement", - "src": "11555:444:20", - "trueBody": { - "id": 15821, - "nodeType": "Block", - "src": "11569:212:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15805, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15237, - "src": "11613:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15804, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "11606:6:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 15806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11606:20:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 15807, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "11628:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15808, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15706, - "src": "11646:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15801, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14805, - "src": "11583:9:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$14805_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 15803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14633, - "src": "11583:22:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 15809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11583:71:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15810, - "nodeType": "ExpressionStatement", - "src": "11583:71:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15812, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15706, - "src": "11691:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15813, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11700:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15814, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11700:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15815, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11719:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15816, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "11719:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15817, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11747:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15818, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11747:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15811, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15189, - "src": "11673:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 15819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11673:97:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15820, - "nodeType": "EmitStatement", - "src": "11668:102:20" - } - ] - } - } - ] - }, - "documentation": null, - "id": 15845, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapV2Call", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15709, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15702, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10238:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10238:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15704, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10262:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15703, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10262:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15706, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10287:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10287:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15708, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10312:17:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 15707, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10312:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10228:107:20" - }, - "returnParameters": { - "id": 15710, - "nodeType": "ParameterList", - "parameters": [], - "src": "10355:0:20" - }, - "scope": 16828, - "src": "10206:1799:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 16141, - "nodeType": "Block", - "src": "12125:4537:20", - "statements": [ - { - "assignments": [ - 15853 - ], - "declarations": [ - { - "constant": false, - "id": 15853, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12135:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - }, - "typeName": { - "contractScope": null, - "id": 15852, - "name": "UniswapPair", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14600, - "src": "12135:11:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15857, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15855, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "12166:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15854, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14600, - "src": "12154:11:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14600_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12154:25:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12135:44:20" - }, - { - "assignments": [ - 15859 - ], - "declarations": [ - { - "constant": false, - "id": 15859, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12190:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 15858, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "12190:17:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15863, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15861, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "12232:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15860, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "12214:17:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 15862, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12214:29:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12190:53:20" - }, - { - "assignments": [ - 15865, - 15867, - null - ], - "declarations": [ - { - "constant": false, - "id": 15865, - "name": "token0Reserves", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12279:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15864, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12279:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15867, - "name": "token1Reserves", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12303:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12303:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 15871, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15868, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "12331:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 15869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 14542, - "src": "12331:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "function () view external returns (uint112,uint112,uint32)" - } - }, - "id": 15870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12331:18:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "tuple(uint112,uint112,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12278:71:20" - }, - { - "assignments": [ - 15873 - ], - "declarations": [ - { - "constant": false, - "id": 15873, - "name": "excess", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12419:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15872, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12419:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15878, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15876, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "12450:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 15874, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15859, - "src": "12436:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 19072, - "src": "12436:13:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 15877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12436:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12419:48:20" - }, - { - "assignments": [ - 15880 - ], - "declarations": [ - { - "constant": false, - "id": 15880, - "name": "tokens_to_max_slippage", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12479:30:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15879, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12479:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15886, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15882, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "12531:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15883, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "12547:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15884, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15849, - "src": "12563:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15881, - "name": "uniswapMaxSlippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16218, - "src": "12512:18:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) view returns (uint256)" - } - }, - "id": 15885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12512:62:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12479:95:20" - }, - { - "assignments": [ - 15888 - ], - "declarations": [ - { - "constant": false, - "id": 15888, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12585:22:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 15887, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15147, - "src": "12585:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_storage_ptr", - "typeString": "struct YAMRebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15894, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15890, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "12641:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15891, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "12726:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 15892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12805:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 15889, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15147, - "src": "12610:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - }, - "id": 15893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "yamsToUni", - "amountFromReserves", - "mintToReserves" - ], - "nodeType": "FunctionCall", - "src": "12610:251:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12585:276:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 15895, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "13119:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16139, - "nodeType": "Block", - "src": "14926:1730:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16018, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14944:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16021, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "14984:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16019, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "14969:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "14969:14:20", - "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": 16022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14969:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14944:47:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16137, - "nodeType": "Block", - "src": "15444:1202:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16063, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "15466:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 16064, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15491:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15466:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16135, - "nodeType": "Block", - "src": "16079:553:20", - "statements": [ - { - "assignments": [ - 16102 - ], - "declarations": [ - { - "constant": false, - "id": 16102, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16135, - "src": "16158:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16158:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16108, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16104, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "16191:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16105, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "16215:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16106, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "16231:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16103, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "16178:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 16107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16178:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16158:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16109, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16268:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16111, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "16268:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16112, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "16297:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16268:51:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16114, - "nodeType": "ExpressionStatement", - "src": "16268:51:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16115, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16341:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16117, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "16341:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16118, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "16366:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16341:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16120, - "nodeType": "ExpressionStatement", - "src": "16341:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16124, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16102, - "src": "16564:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 16125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16575:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16127, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "16586:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16578:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16578:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16131, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16604:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16129, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "16593:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16593:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16593:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16121, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "16554:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "16554:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16554:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16134, - "nodeType": "ExpressionStatement", - "src": "16554:59:20" - } - ] - }, - "id": 16136, - "nodeType": "IfStatement", - "src": "15462:1170:20", - "trueBody": { - "id": 16100, - "nodeType": "Block", - "src": "15499:574:20", - "statements": [ - { - "assignments": [ - 16067 - ], - "declarations": [ - { - "constant": false, - "id": 16067, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16100, - "src": "15579:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16066, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15579:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16073, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16069, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "15612:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16070, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "15636:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16071, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "15652:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16068, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "15599:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 16072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15599:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15579:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16074, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15794:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "15794:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16079, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "15836:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 16080, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15861:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15836:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 16082, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15835:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16077, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "15819:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "15819:14:20", - "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": 16083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15819:50:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15794:75:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16085, - "nodeType": "ExpressionStatement", - "src": "15794:75:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16089, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16067, - "src": "16005:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 16090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16016:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16092, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "16027:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16091, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16019:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16019:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16096, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16045:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16094, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "16034:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16034:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16034:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16086, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "15995:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "15995:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15995:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16099, - "nodeType": "ExpressionStatement", - "src": "15995:59:20" - } - ] - } - } - ] - }, - "id": 16138, - "nodeType": "IfStatement", - "src": "14940:1706:20", - "trueBody": { - "id": 16062, - "nodeType": "Block", - "src": "14993:445:20", - "statements": [ - { - "assignments": [ - 16025 - ], - "declarations": [ - { - "constant": false, - "id": 16025, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16062, - "src": "15066:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16024, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15066:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16033, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16027, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "15099:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 16028, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15112:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15099:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16030, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "15120:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16031, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "15136:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16026, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "15086:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 16032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15086:65:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15066:85:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16034, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15169:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16036, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "15169:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16037, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "15189:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 16038, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15202:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15189:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15169:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16041, - "nodeType": "ExpressionStatement", - "src": "15169:39:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16042, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15226:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16044, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "15226:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16045, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15255:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15226:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16047, - "nodeType": "ExpressionStatement", - "src": "15226:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16051, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16025, - "src": "15374:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 16052, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15385:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16054, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "15396:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15388:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15388:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16058, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15414:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16056, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15403:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15403:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15403:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16048, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "15364:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "15364:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15364:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16061, - "nodeType": "ExpressionStatement", - "src": "15364:59:20" - } - ] - } - } - ] - }, - "id": 16140, - "nodeType": "IfStatement", - "src": "13115:3541:20", - "trueBody": { - "id": 16017, - "nodeType": "Block", - "src": "13129:1791:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15896, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "13147:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15899, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13187:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15897, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "13172:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "13172:14:20", - "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": 15900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13147:47:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16015, - "nodeType": "Block", - "src": "13813:1097:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15941, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "13835:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 15942, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13860:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13835:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16013, - "nodeType": "Block", - "src": "14343:553:20", - "statements": [ - { - "assignments": [ - 15980 - ], - "declarations": [ - { - "constant": false, - "id": 15980, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16013, - "src": "14422:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15979, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14422:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15986, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15982, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14455:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15983, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "14479:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15984, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "14495:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15981, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "14442:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 15985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14442:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14422:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15987, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14532:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15989, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "14532:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15990, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14561:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14532:51:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15992, - "nodeType": "ExpressionStatement", - "src": "14532:51:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15993, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14605:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15995, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "14605:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15996, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "14630:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14605:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15998, - "nodeType": "ExpressionStatement", - "src": "14605:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14828:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 16003, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15980, - "src": "14831:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16005, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "14850:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14842:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14842:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16009, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14868:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16007, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "14857:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14857:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14857:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15999, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "14818:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "14818:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14818:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16012, - "nodeType": "ExpressionStatement", - "src": "14818:59:20" - } - ] - }, - "id": 16014, - "nodeType": "IfStatement", - "src": "13831:1065:20", - "trueBody": { - "id": 15978, - "nodeType": "Block", - "src": "13868:469:20", - "statements": [ - { - "assignments": [ - 15945 - ], - "declarations": [ - { - "constant": false, - "id": 15945, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 15978, - "src": "13948:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15944, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13948:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15951, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15947, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "13981:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15948, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "14005:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15949, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "14021:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15946, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "13968:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 15950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13968:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13948:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15952, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14163:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15954, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "14163:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15957, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14204:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 15958, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "14229:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14204:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 15960, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14203:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15955, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "14188:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "14188:14:20", - "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": 15961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14188:49:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14163:74:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15963, - "nodeType": "ExpressionStatement", - "src": "14163:74:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 15967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14269:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 15968, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15945, - "src": "14272:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15970, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "14291:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 15969, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14283:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15971, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14283:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15974, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14309:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15972, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "14298:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 15973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14298:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 15975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14298:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15964, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "14259:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 15966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "14259:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 15976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14259:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15977, - "nodeType": "ExpressionStatement", - "src": "14259:59:20" - } - ] - } - } - ] - }, - "id": 16016, - "nodeType": "IfStatement", - "src": "13143:1767:20", - "trueBody": { - "id": 15940, - "nodeType": "Block", - "src": "13196:611:20", - "statements": [ - { - "assignments": [ - 15903 - ], - "declarations": [ - { - "constant": false, - "id": 15903, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 15940, - "src": "13435:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13435:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15911, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15905, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "13468:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 15906, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13481:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13468:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15908, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "13489:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15909, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "13505:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15904, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "13455:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 15910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13455:65:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13435:85:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15912, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "13538:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15914, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "13538:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15915, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "13558:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 15916, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13571:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13558:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13538:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15919, - "nodeType": "ExpressionStatement", - "src": "13538:39:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15920, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "13595:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15922, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "13595:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15923, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13624:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13595:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15925, - "nodeType": "ExpressionStatement", - "src": "13595:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 15929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13743:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 15930, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15903, - "src": "13746:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15932, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "13765:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 15931, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13757:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13757:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15936, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "13783:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15934, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13772:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 15935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13772:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 15937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13772:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15926, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "13733:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 15928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "13733:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 15938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13733:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15939, - "nodeType": "ExpressionStatement", - "src": "13733:59:20" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 16142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "buyReserveAndTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15847, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 16142, - "src": "12051:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15846, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12051:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15849, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 16142, - "src": "12079:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15848, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12079:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12041:62:20" - }, - "returnParameters": { - "id": 15851, - "nodeType": "ParameterList", - "parameters": [], - "src": "12125:0:20" - }, - "scope": 16828, - "src": "12011:4651:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16217, - "nodeType": "Block", - "src": "16832:912:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 16153, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "16846:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16215, - "nodeType": "Block", - "src": "17523:215:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16185, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "17541:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 16188, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17555:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 16187, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17559:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "17555:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "17541:20:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16213, - "nodeType": "Block", - "src": "17650:78:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16208, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17706:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16209, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17710:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17706:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16203, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "17686:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 16204, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17699:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "17686:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16201, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16146, - "src": "17675:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "17675:10:20", - "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": 16206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17675:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "17675:30:20", - "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": 16211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17675:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16212, - "nodeType": "Return", - "src": "17668:45:20" - } - ] - }, - "id": 16214, - "nodeType": "IfStatement", - "src": "17537:191:20", - "trueBody": { - "id": 16200, - "nodeType": "Block", - "src": "17563:81:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16195, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17622:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17626:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17622:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16192, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "17599:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16190, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16146, - "src": "17588:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "17588:10:20", - "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": 16193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17588:29:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "17588:33:20", - "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": 16198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17588:41:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16199, - "nodeType": "Return", - "src": "17581:48:20" - } - ] - } - } - ] - }, - "id": 16216, - "nodeType": "IfStatement", - "src": "16842:896:20", - "trueBody": { - "id": 16184, - "nodeType": "Block", - "src": "16856:661:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16154, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "16872:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 16157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16155, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16886:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 16156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16890:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "16886:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "16872:20:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16182, - "nodeType": "Block", - "src": "17007:500:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17487:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17491:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17487:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16172, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "17467:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 16173, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17480:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "17467:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16170, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16144, - "src": "17456:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "17456:10:20", - "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": 16175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17456:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "17456:30:20", - "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": 16180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17456:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16181, - "nodeType": "Return", - "src": "17449:45:20" - } - ] - }, - "id": 16183, - "nodeType": "IfStatement", - "src": "16868:639:20", - "trueBody": { - "id": 16169, - "nodeType": "Block", - "src": "16894:107:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16981:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16985:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "16981:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16161, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "16958:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16159, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16144, - "src": "16947:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "16947:10:20", - "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": 16162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16947:29:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "16947:33:20", - "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": 16167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16947:41:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16168, - "nodeType": "Return", - "src": "16940:48:20" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 16218, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapMaxSlippage", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16144, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16705:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16143, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16705:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16146, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16729:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16729:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16148, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16753:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16147, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16753:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16695:82:20" - }, - "returnParameters": { - "id": 16152, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16151, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16819:7:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16150, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16819:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16818:9:20" - }, - "scope": 16828, - "src": "16668:1076:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16277, - "nodeType": "Block", - "src": "18029:394:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16230, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16220, - "src": "18046:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16231, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18057:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18046:12:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54", - "id": 16233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18060:45:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - } - ], - "id": 16229, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18038:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18038:68:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16235, - "nodeType": "ExpressionStatement", - "src": "18038:68:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16237, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16222, - "src": "18123:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18135:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18123:13:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16240, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16224, - "src": "18140:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18153:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18140:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18123:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459", - "id": 16244, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18156:42:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_LIQUIDITY" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - } - ], - "id": 16236, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18115:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18115:84:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16246, - "nodeType": "ExpressionStatement", - "src": "18115:84:20" - }, - { - "assignments": [ - 16248 - ], - "declarations": [ - { - "constant": false, - "id": 16248, - "name": "amountInWithFee", - "nodeType": "VariableDeclaration", - "scope": 16277, - "src": "18208:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16247, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18208:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16253, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "393937", - "id": 16251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18244:3:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - }, - "value": "997" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - } - ], - "expression": { - "argumentTypes": null, - "id": 16249, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16220, - "src": "18231:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "18231:12:20", - "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": 16252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18231:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18208:40:20" - }, - { - "assignments": [ - 16255 - ], - "declarations": [ - { - "constant": false, - "id": 16255, - "name": "numerator", - "nodeType": "VariableDeclaration", - "scope": 16277, - "src": "18257:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16254, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18257:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16260, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16258, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16224, - "src": "18294:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16256, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16248, - "src": "18274:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "18274:19:20", - "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": 16259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18274:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18257:48:20" - }, - { - "assignments": [ - 16262 - ], - "declarations": [ - { - "constant": false, - "id": 16262, - "name": "denominator", - "nodeType": "VariableDeclaration", - "scope": 16277, - "src": "18314:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16261, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18314:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16270, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16268, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16248, - "src": "18357:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31303030", - "id": 16265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18347:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - }, - "value": "1000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - } - ], - "expression": { - "argumentTypes": null, - "id": 16263, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16222, - "src": "18333:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "18333:13:20", - "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": 16266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18333:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "18333:23:20", - "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": 16269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18333:40:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18314:59:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16271, - "name": "amountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16227, - "src": "18382:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16272, - "name": "numerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16255, - "src": "18394:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 16273, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16262, - "src": "18406:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18394:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18382:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16276, - "nodeType": "ExpressionStatement", - "src": "18382:35:20" - } - ] - }, - "documentation": null, - "id": 16278, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAmountOut", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16220, - "name": "amountIn", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "17893:13:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16219, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17893:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16222, - "name": "reserveIn", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "17916:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16221, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17916:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16224, - "name": "reserveOut", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "17940:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16223, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17940:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17883:78:20" - }, - "returnParameters": { - "id": 16228, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16227, - "name": "amountOut", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "18009:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16226, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18009:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18008:16:20" - }, - "scope": 16828, - "src": "17862:561:20", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16349, - "nodeType": "Block", - "src": "18534:677:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16286, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "18582:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16285, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14600, - "src": "18570:11:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14600_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 16287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18570:25:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sync", - "nodeType": "MemberAccess", - "referencedDeclaration": 14592, - "src": "18570:30:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 16289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18570:32:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16290, - "nodeType": "ExpressionStatement", - "src": "18570:32:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16291, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16280, - "src": "18617:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18630:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18617:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16300, - "nodeType": "IfStatement", - "src": "18613:136:20", - "trueBody": { - "id": 16299, - "nodeType": "Block", - "src": "18633:116:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16295, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16280, - "src": "18686:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16296, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16282, - "src": "18714:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16294, - "name": "buyReserveAndTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16142, - "src": "18647:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 16297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18647:91:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16298, - "nodeType": "ExpressionStatement", - "src": "18647:91:20" - } - ] - } - }, - { - "body": { - "id": 16347, - "nodeType": "Block", - "src": "18842:363:20", - "statements": [ - { - "assignments": [ - 16313 - ], - "declarations": [ - { - "constant": false, - "id": 16313, - "name": "t", - "nodeType": "VariableDeclaration", - "scope": 16347, - "src": "18856:21:20", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction" - }, - "typeName": { - "contractScope": null, - "id": 16312, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15140, - "src": "18856:11:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16317, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16314, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "18880:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16316, - "indexExpression": { - "argumentTypes": null, - "id": 16315, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "18893:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18880:15:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18856:39:20" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16318, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "18913:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 15135, - "src": "18913:9:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16346, - "nodeType": "IfStatement", - "src": "18909:286:20", - "trueBody": { - "id": 16345, - "nodeType": "Block", - "src": "18924:271:20", - "statements": [ - { - "assignments": [ - 16321 - ], - "declarations": [ - { - "constant": false, - "id": 16321, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 16345, - "src": "18942:11:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16320, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "18942:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16328, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16323, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "18989:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16324, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 15137, - "src": "18989:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16325, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "19004:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16326, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 15139, - "src": "19004:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 16322, - "name": "externalCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16827, - "src": "18976:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (address,bytes memory) returns (bool)" - } - }, - "id": 16327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18976:35:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18942:69:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 16330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "19033:7:20", - "subExpression": { - "argumentTypes": null, - "id": 16329, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16321, - "src": "19034:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16344, - "nodeType": "IfStatement", - "src": "19029:152:20", - "trueBody": { - "id": 16343, - "nodeType": "Block", - "src": "19042:139:20", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16332, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "19087:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16333, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 15137, - "src": "19087:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16334, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "19102:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16335, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "19105:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16336, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 15139, - "src": "19105:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 16331, - "name": "TransactionFailed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15155, - "src": "19069:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,bytes memory)" - } - }, - "id": 16337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19069:43:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16338, - "nodeType": "EmitStatement", - "src": "19064:48:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5472616e73616374696f6e204661696c6564", - "id": 16340, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19141:20:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - }, - "value": "Transaction Failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - } - ], - "id": 16339, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19271, - 19272 - ], - "referencedDeclaration": 19272, - "src": "19134:6:20", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 16341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19134:28:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16342, - "nodeType": "ExpressionStatement", - "src": "19134:28:20" - } - ] - } - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16305, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "18812:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16306, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "18816:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16307, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18812:23:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16348, - "initializationExpression": { - "assignments": [ - 16302 - ], - "declarations": [ - { - "constant": false, - "id": 16302, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 16348, - "src": "18800:6:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16301, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18800:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16304, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 16303, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18809:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18800:10:20" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 16310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18837:3:20", - "subExpression": { - "argumentTypes": null, - "id": 16309, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "18837:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16311, - "nodeType": "ExpressionStatement", - "src": "18837:3:20" - }, - "nodeType": "ForStatement", - "src": "18795:410:20" - } - ] - }, - "documentation": null, - "id": 16350, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "afterRebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16283, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16280, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 16350, - "src": "18460:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18460:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16282, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 16350, - "src": "18488:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16281, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18488:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18450:62:20" - }, - "returnParameters": { - "id": 16284, - "nodeType": "ParameterList", - "parameters": [], - "src": "18534:0:20" - }, - "scope": 16828, - "src": "18430:781:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16406, - "nodeType": "Block", - "src": "19698:768:20", - "statements": [ - { - "assignments": [ - 16356, - 16358 - ], - "declarations": [ - { - "constant": false, - "id": 16356, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "19707:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16355, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19707:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16358, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "19729:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 16357, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19729:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16364, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16361, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "19810:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16362, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "19824:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 16359, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15111, - "src": "19763:22:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$15111_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 16360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 15110, - "src": "19763:46:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 16363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19763:70:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19706:127:20" - }, - { - "assignments": [ - 16366 - ], - "declarations": [ - { - "constant": false, - "id": 16366, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "19842:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 16365, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19842:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16370, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 16369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16367, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16358, - "src": "19863:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 16368, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15243, - "src": "19880:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19863:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19842:56:20" - }, - { - "assignments": [ - 16374 - ], - "declarations": [ - { - "constant": false, - "id": 16374, - "name": "priceAverage", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "20163:40:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 16373, - "name": "FixedPoint.uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14066, - "src": "20163:20:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16378, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16356, - "src": "20236:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 16379, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15245, - "src": "20254:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20236:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 16381, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20235:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 16382, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16366, - "src": "20277:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "20235:53:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20227:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 16384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20227:62:20", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "expression": { - "argumentTypes": null, - "id": 16375, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14289, - "src": "20206:10:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14289_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 16376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "uq112x112", - "nodeType": "MemberAccess", - "referencedDeclaration": 14066, - "src": "20206:20:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14066_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 16385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20206:84:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20163:127:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16387, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15245, - "src": "20301:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16388, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16356, - "src": "20323:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20301:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16390, - "nodeType": "ExpressionStatement", - "src": "20301:37:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16391, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15243, - "src": "20348:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16392, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16358, - "src": "20369:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "20348:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 16394, - "nodeType": "ExpressionStatement", - "src": "20348:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16399, - "name": "priceAverage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16374, - "src": "20437:12:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16402, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20451:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16401, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20455:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "20451:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - }, - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "id": 16397, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14289, - "src": "20422:10:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14289_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 16398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14183, - "src": "20422:14:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_uq112x112_$14066_memory_ptr_$_t_uint256_$returns$_t_struct$_uq144x112_$14069_memory_ptr_$", - "typeString": "function (struct FixedPoint.uq112x112 memory,uint256) pure returns (struct FixedPoint.uq144x112 memory)" - } - }, - "id": 16403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20422:36:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14069_memory_ptr", - "typeString": "struct FixedPoint.uq144x112 memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_uq144x112_$14069_memory_ptr", - "typeString": "struct FixedPoint.uq144x112 memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16395, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14289, - "src": "20401:10:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14289_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 16396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decode144", - "nodeType": "MemberAccess", - "referencedDeclaration": 14241, - "src": "20401:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_uq144x112_$14069_memory_ptr_$returns$_t_uint144_$", - "typeString": "function (struct FixedPoint.uq144x112 memory) pure returns (uint144)" - } - }, - "id": 16404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20401:58:20", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "functionReturnParameters": 16354, - "id": 16405, - "nodeType": "Return", - "src": "20394:65:20" - } - ] - }, - "documentation": "@notice Calculates TWAP from uniswap\n * @dev When liquidity is low, this can be manipulated by an end of block -> next block\n attack. We delay the activation of rebases 12 hours after liquidity incentives\n to reduce this attack vector. Additional there is very little supply\n to be able to manipulate this during that time period of highest vuln.", - "id": 16407, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTWAP", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16351, - "nodeType": "ParameterList", - "parameters": [], - "src": "19648:2:20" - }, - "returnParameters": { - "id": 16354, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16353, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16407, - "src": "19685:7:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19685:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19684:9:20" - }, - "scope": 16828, - "src": "19632:834:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16433, - "nodeType": "Block", - "src": "20888:238:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16415, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "20906:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16416, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20927:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20906:22:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16414, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "20898:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20898:31:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16419, - "nodeType": "ExpressionStatement", - "src": "20898:31:20" - }, - { - "assignments": [ - 16421 - ], - "declarations": [ - { - "constant": false, - "id": 16421, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 16433, - "src": "20939:29:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16420, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20939:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16423, - "initialValue": { - "argumentTypes": null, - "id": 16422, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "20971:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20939:50:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16424, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "20999:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16425, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16409, - "src": "21020:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20999:40:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16427, - "nodeType": "ExpressionStatement", - "src": "20999:40:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16429, - "name": "oldDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16421, - "src": "21076:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16430, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16409, - "src": "21099:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16428, - "name": "NewDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15167, - "src": "21054:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 16431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21054:65:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16432, - "nodeType": "EmitStatement", - "src": "21049:70:20" - } - ] - }, - "documentation": "@notice Sets the deviation threshold fraction. If the exchange rate given by the market\n oracle is within this fractional distance from the targetRate, then no supply\n modifications are made.\n@param deviationThreshold_ The new exchange rate threshold fraction.", - "id": 16434, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16412, - "modifierName": { - "argumentTypes": null, - "id": 16411, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "20876:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "20876:7:20" - } - ], - "name": "setDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16409, - "name": "deviationThreshold_", - "nodeType": "VariableDeclaration", - "scope": 16434, - "src": "20822:27:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20822:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20821:29:20" - }, - "returnParameters": { - "id": 16413, - "nodeType": "ParameterList", - "parameters": [], - "src": "20888:0:20" - }, - "scope": 16828, - "src": "20791:335:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16451, - "nodeType": "Block", - "src": "21658:72:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16442, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16436, - "src": "21676:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21689:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21676:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "21668:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21668:23:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16446, - "nodeType": "ExpressionStatement", - "src": "21668:23:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16447, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15210, - "src": "21701:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16448, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16436, - "src": "21713:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21701:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16450, - "nodeType": "ExpressionStatement", - "src": "21701:22:20" - } - ] - }, - "documentation": "@notice Sets the rebase lag parameter.\nIt is used to dampen the applied supply adjustment by 1 / rebaseLag\nIf the rebase lag R, equals 1, the smallest value for R, then the full supply\ncorrection is applied on each rebase cycle.\nIf it is greater than 1, then a correction of 1/R of is applied on each rebase.\n@param rebaseLag_ The new rebase lag parameter.", - "id": 16452, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16439, - "modifierName": { - "argumentTypes": null, - "id": 16438, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "21646:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21646:7:20" - } - ], - "name": "setRebaseLag", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16436, - "name": "rebaseLag_", - "nodeType": "VariableDeclaration", - "scope": 16452, - "src": "21601:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21601:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21600:20:20" - }, - "returnParameters": { - "id": 16440, - "nodeType": "ParameterList", - "parameters": [], - "src": "21658:0:20" - }, - "scope": 16828, - "src": "21579:151:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16469, - "nodeType": "Block", - "src": "21936:75:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16460, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16454, - "src": "21954:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16461, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21968:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21954:15:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16459, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "21946:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21946:24:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16464, - "nodeType": "ExpressionStatement", - "src": "21946:24:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16465, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "21980:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16466, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16454, - "src": "21993:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21980:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16468, - "nodeType": "ExpressionStatement", - "src": "21980:24:20" - } - ] - }, - "documentation": "@notice Sets the targetRate parameter.\n@param targetRate_ The new target rate parameter.", - "id": 16470, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16457, - "modifierName": { - "argumentTypes": null, - "id": 16456, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "21924:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21924:7:20" - } - ], - "name": "setTargetRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16455, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16454, - "name": "targetRate_", - "nodeType": "VariableDeclaration", - "scope": 16470, - "src": "21878:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16453, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21878:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21877:21:20" - }, - "returnParameters": { - "id": 16458, - "nodeType": "ParameterList", - "parameters": [], - "src": "21936:0:20" - }, - "scope": 16828, - "src": "21855:156:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16505, - "nodeType": "Block", - "src": "22887:299:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16482, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16472, - "src": "22905:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22933:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "22905:29:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16481, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "22897:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22897:38:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16486, - "nodeType": "ExpressionStatement", - "src": "22897:38:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16488, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16474, - "src": "22953:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16489, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16472, - "src": "22978:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22953:50:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16487, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "22945:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22945:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16492, - "nodeType": "ExpressionStatement", - "src": "22945:59:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16493, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "23015:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16494, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16472, - "src": "23042:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23015:52:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16496, - "nodeType": "ExpressionStatement", - "src": "23015:52:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16497, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "23077:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16498, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16474, - "src": "23101:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23077:46:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16500, - "nodeType": "ExpressionStatement", - "src": "23077:46:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16501, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15224, - "src": "23133:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16502, - "name": "rebaseWindowLengthSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16476, - "src": "23157:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23133:46:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16504, - "nodeType": "ExpressionStatement", - "src": "23133:46:20" - } - ] - }, - "documentation": "@notice Sets the parameters which control the timing and frequency of\n rebase operations.\n a) the minimum time period that must elapse between rebase cycles.\n b) the rebase window offset parameter.\n c) the rebase window length parameter.\n@param minRebaseTimeIntervalSec_ More than this much time must pass between rebase\n operations, in seconds.\n@param rebaseWindowOffsetSec_ The number of seconds from the beginning of\nthe rebase interval, where the rebase window begins.\n@param rebaseWindowLengthSec_ The length of the rebase window in seconds.", - "id": 16506, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16479, - "modifierName": { - "argumentTypes": null, - "id": 16478, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "22875:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "22875:7:20" - } - ], - "name": "setRebaseTimingParameters", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16477, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16472, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "VariableDeclaration", - "scope": 16506, - "src": "22735:33:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22735:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16474, - "name": "rebaseWindowOffsetSec_", - "nodeType": "VariableDeclaration", - "scope": 16506, - "src": "22778:30:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22778:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16476, - "name": "rebaseWindowLengthSec_", - "nodeType": "VariableDeclaration", - "scope": 16506, - "src": "22818:30:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16475, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22818:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22725:124:20" - }, - "returnParameters": { - "id": 16480, - "nodeType": "ParameterList", - "parameters": [], - "src": "22887:0:20" - }, - "scope": 16828, - "src": "22691:495:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16516, - "nodeType": "Block", - "src": "23398:118:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 16511, - "name": "_inRebaseWindow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16550, - "src": "23471:15:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$__$", - "typeString": "function () view" - } - }, - "id": 16512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23471:17:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16513, - "nodeType": "ExpressionStatement", - "src": "23471:17:20" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 16514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23505:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 16510, - "id": 16515, - "nodeType": "Return", - "src": "23498:11:20" - } - ] - }, - "documentation": "@return If the latest block timestamp is within the rebase time window it, returns true.\n Otherwise, returns false.", - "id": 16517, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "inRebaseWindow", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16507, - "nodeType": "ParameterList", - "parameters": [], - "src": "23368:2:20" - }, - "returnParameters": { - "id": 16510, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16509, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16517, - "src": "23392:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16508, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "23392:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23391:6:20" - }, - "scope": 16828, - "src": "23345:171:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 16549, - "nodeType": "Block", - "src": "23563:334:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16521, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15228, - "src": "23644:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7265626173696e67206e6f7420616374697665", - "id": 16522, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23660:21:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad25834b8f3f88668e564881394410690284dfcb705ccb210611bb91472068eb", - "typeString": "literal_string \"rebasing not active\"" - }, - "value": "rebasing not active" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad25834b8f3f88668e564881394410690284dfcb705ccb210611bb91472068eb", - "typeString": "literal_string \"rebasing not active\"" - } - ], - "id": 16520, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "23636:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23636:46:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16524, - "nodeType": "ExpressionStatement", - "src": "23636:46:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16528, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "23709:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16526, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "23701:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 14968, - "src": "23701:7:20", - "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": 16529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23701:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 16530, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "23738:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23701:58:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "746f6f206561726c79", - "id": 16532, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23761:11:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87d05e52726880c4bb1003e00ed00463d214b7b936d9983b909b11b18ccd468", - "typeString": "literal_string \"too early\"" - }, - "value": "too early" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87d05e52726880c4bb1003e00ed00463d214b7b936d9983b909b11b18ccd468", - "typeString": "literal_string \"too early\"" - } - ], - "id": 16525, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "23693:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23693:80:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16534, - "nodeType": "ExpressionStatement", - "src": "23693:80:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16538, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "23799:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16536, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "23791:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 14968, - "src": "23791:7:20", - "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": 16539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23791:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16542, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15224, - "src": "23854:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16540, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "23828:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "23828:25:20", - "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": 16543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23828:48:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 16544, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23827:50:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23791:86:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "746f6f206c617465", - "id": 16546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23879:10:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d9653d91002129bb8471bce01d6c8bb486aa66e48f407a0dd073e6b452e1b6e5", - "typeString": "literal_string \"too late\"" - }, - "value": "too late" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d9653d91002129bb8471bce01d6c8bb486aa66e48f407a0dd073e6b452e1b6e5", - "typeString": "literal_string \"too late\"" - } - ], - "id": 16535, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "23783:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23783:107:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16548, - "nodeType": "ExpressionStatement", - "src": "23783:107:20" - } - ] - }, - "documentation": null, - "id": 16550, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_inRebaseWindow", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16518, - "nodeType": "ParameterList", - "parameters": [], - "src": "23546:2:20" - }, - "returnParameters": { - "id": 16519, - "nodeType": "ParameterList", - "parameters": [], - "src": "23563:0:20" - }, - "scope": 16828, - "src": "23522:375:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16604, - "nodeType": "Block", - "src": "24085:368:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16560, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24124:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16559, - "name": "withinDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16649, - "src": "24099:24:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 16561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24099:30:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16567, - "nodeType": "IfStatement", - "src": "24095:78:20", - "trueBody": { - "id": 16566, - "nodeType": "Block", - "src": "24131:42:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24153:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 16563, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24156:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 16564, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24152:10:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_bool_$", - "typeString": "tuple(int_const 0,bool)" - } - }, - "functionReturnParameters": 16558, - "id": 16565, - "nodeType": "Return", - "src": "24145:17:20" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16568, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24245:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 16569, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24252:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24245:17:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16602, - "nodeType": "Block", - "src": "24358:89:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16597, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24417:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16594, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24405:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16593, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24409:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24405:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16589, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24395:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16587, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24380:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "24380:14:20", - "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": 16590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24380:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "24380:24:20", - "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": 16595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24380:32:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "24380:36:20", - "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": 16598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24380:48:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 16599, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24430:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 16600, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24379:57:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 16558, - "id": 16601, - "nodeType": "Return", - "src": "24372:64:20" - } - ] - }, - "id": 16603, - "nodeType": "IfStatement", - "src": "24241:206:20", - "trueBody": { - "id": 16586, - "nodeType": "Block", - "src": "24264:88:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16581, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24323:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16578, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24311:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24315:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24311:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16573, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24295:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16571, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24286:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "24286:8:20", - "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": 16574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24286:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "24286:24:20", - "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": 16579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24286:32:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "24286:36:20", - "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": 16582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24286:48:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 16583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24336:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "id": 16584, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24285:56:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 16558, - "id": 16585, - "nodeType": "Return", - "src": "24278:63:20" - } - ] - } - } - ] - }, - "documentation": "@return Computes in % how far off market is from peg", - "id": 16605, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "computeOffPegPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16552, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 16605, - "src": "24006:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16551, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24006:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24005:14:20" - }, - "returnParameters": { - "id": 16558, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16555, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16605, - "src": "24066:7:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16554, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24066:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16557, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16605, - "src": "24075:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16556, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "24075:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24065:15:20" - }, - "scope": 16828, - "src": "23979:474:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 16648, - "nodeType": "Block", - "src": "24797:294:20", - "statements": [ - { - "assignments": [ - 16613 - ], - "declarations": [ - { - "constant": false, - "id": 16613, - "name": "absoluteDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 16648, - "src": "24807:34:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16612, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24807:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16623, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24896:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24902:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24896:8:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16616, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "24859:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16614, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24844:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "24844:14:20", - "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": 16617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24844:34:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "24844:51:20", - "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": 16622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24844:61:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24807:98:20" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16624, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "24924:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 16625, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24932:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24924:18:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16629, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24955:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16627, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "24946:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "24946:8:20", - "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": 16630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24946:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16631, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16613, - "src": "24969:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24946:49:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24924:71:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 16634, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24923:73:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16635, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "25013:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16636, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "25020:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25013:17:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16640, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "25049:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16638, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "25034:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "25034:14:20", - "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": 16641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25034:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16642, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16613, - "src": "25057:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25034:49:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "25013:70:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 16645, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "25012:72:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24923:161:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 16611, - "id": 16647, - "nodeType": "Return", - "src": "24916:168:20" - } - ] - }, - "documentation": "@param rate The current exchange rate, an 18 decimal fixed point number.\n@return If the rate is within the deviation threshold from the target rate, returns true.\n Otherwise, returns false.", - "id": 16649, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withinDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16608, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16607, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 16649, - "src": "24727:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16606, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24727:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24726:14:20" - }, - "returnParameters": { - "id": 16611, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16610, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16649, - "src": "24787:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16609, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "24787:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24786:6:20" - }, - "scope": 16828, - "src": "24693:398:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 16682, - "nodeType": "Block", - "src": "25376:296:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 16680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16660, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16658, - "src": "25386:4:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "ff", - "id": 16666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25450:7:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - }, - { - "argumentTypes": null, - "id": 16667, - "name": "factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16651, - "src": "25475:7:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16671, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16653, - "src": "25527:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16672, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16655, - "src": "25535:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 16669, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "25510:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25510:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25510:32:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 16668, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "25500:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 16674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25500:43:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", - "id": 16675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25561:69:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - } - ], - "expression": { - "argumentTypes": null, - "id": 16664, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "25416:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25416:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25416:246:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 16663, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "25406:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 16677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25406:257:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 16662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25401:4:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 16678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25401:263:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16661, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25393:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25393:272:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "25386:279:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16681, - "nodeType": "ExpressionStatement", - "src": "25386:279:20" - } - ] - }, - "documentation": null, - "id": 16683, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "pairFor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16656, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16651, - "name": "factory", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25241:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16650, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25241:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16653, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25266:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16652, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25266:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16655, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25290:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16654, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25290:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25231:79:20" - }, - "returnParameters": { - "id": 16659, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16658, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25358:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16657, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25358:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25357:14:20" - }, - "scope": 16828, - "src": "25215:457:20", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16725, - "nodeType": "Block", - "src": "25935:238:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16695, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "25953:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 16696, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "25963:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "25953:16:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553", - "id": 16698, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25971:39:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - }, - "value": "UniswapV2Library: IDENTICAL_ADDRESSES" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - } - ], - "id": 16694, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "25945:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25945:66:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16700, - "nodeType": "ExpressionStatement", - "src": "25945:66:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 16701, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16690, - "src": "26022:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16702, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16692, - "src": "26030:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 16703, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "26021:16:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16704, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "26040:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16705, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "26049:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "26040:15:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 16710, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "26078:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16711, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "26086:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 16712, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "26077:16:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "id": 16713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "26040:53:20", - "trueExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 16707, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "26059:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16708, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "26067:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 16709, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "26058:16:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "src": "26021:72:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16715, - "nodeType": "ExpressionStatement", - "src": "26021:72:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16717, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16690, - "src": "26111:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16719, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26129:1:20", - "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": 16718, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26121:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16720, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26121:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "26111:20:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a205a45524f5f41444452455353", - "id": 16722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26133:32:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - }, - "value": "UniswapV2Library: ZERO_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - } - ], - "id": 16716, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26103:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26103:63:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16724, - "nodeType": "ExpressionStatement", - "src": "26103:63:20" - } - ] - }, - "documentation": null, - "id": 16726, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sortTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16685, - "name": "tokenA", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25807:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16684, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25807:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16687, - "name": "tokenB", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25831:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25831:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25797:54:20" - }, - "returnParameters": { - "id": 16693, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16690, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25899:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25899:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16692, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25915:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16691, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25915:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25898:32:20" - }, - "scope": 16828, - "src": "25778:395:20", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16745, - "nodeType": "Block", - "src": "26520:148:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 16739, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26583:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 16740, - "name": "destination", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16728, - "src": "26614:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16741, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16730, - "src": "26645:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "id": 16738, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15140, - "src": "26548:11:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Transaction_$15140_storage_ptr_$", - "typeString": "type(struct YAMRebaser.Transaction storage pointer)" - } - }, - "id": 16742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "enabled", - "destination", - "data" - ], - "nodeType": "FunctionCall", - "src": "26548:112:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_memory", - "typeString": "struct YAMRebaser.Transaction memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Transaction_$15140_memory", - "typeString": "struct YAMRebaser.Transaction memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16735, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "26530:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26530:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Transaction_$15140_storage_$returns$_t_uint256_$", - "typeString": "function (struct YAMRebaser.Transaction storage ref) returns (uint256)" - } - }, - "id": 16743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26530:131:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16744, - "nodeType": "ExpressionStatement", - "src": "26530:131:20" - } - ] - }, - "documentation": "@notice Adds a transaction that gets called for a downstream receiver of rebases\n@param destination Address of contract destination\n@param data Transaction data payload", - "id": 16746, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16733, - "modifierName": { - "argumentTypes": null, - "id": 16732, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "26508:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26508:7:20" - } - ], - "name": "addTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16731, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16728, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 16746, - "src": "26441:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16727, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26441:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16730, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 16746, - "src": "26462:19:20", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 16729, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "26462:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26440:42:20" - }, - "returnParameters": { - "id": 16734, - "nodeType": "ParameterList", - "parameters": [], - "src": "26520:0:20" - }, - "scope": 16828, - "src": "26417:251:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16785, - "nodeType": "Block", - "src": "26891:239:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16754, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16748, - "src": "26909:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16755, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "26917:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16756, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26917:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26909:27:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206f7574206f6620626f756e6473", - "id": 16758, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26938:21:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - }, - "value": "index out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - } - ], - "id": 16753, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26901:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26901:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16760, - "nodeType": "ExpressionStatement", - "src": "26901:59:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16761, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16748, - "src": "26975:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16762, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "26983:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16763, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26983:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16764, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27005:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "26983:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26975:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16779, - "nodeType": "IfStatement", - "src": "26971:121:20", - "trueBody": { - "id": 16778, - "nodeType": "Block", - "src": "27008:84:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 16776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16767, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27022:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16769, - "indexExpression": { - "argumentTypes": null, - "id": 16768, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16748, - "src": "27035:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "27022:19:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16770, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27044:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16775, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16771, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27057:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16772, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27057:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27079:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "27057:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "27044:37:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "src": "27022:59:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "id": 16777, - "nodeType": "ExpressionStatement", - "src": "27022:59:20" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 16783, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "27102:21:20", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16780, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27102:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16782, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27102:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16784, - "nodeType": "ExpressionStatement", - "src": "27102:21:20" - } - ] - }, - "documentation": "@param index Index of transaction to remove.\n Transaction ordering may have changed since adding.", - "id": 16786, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16751, - "modifierName": { - "argumentTypes": null, - "id": 16750, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "26879:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26879:7:20" - } - ], - "name": "removeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16748, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 16786, - "src": "26842:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16747, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "26842:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26841:12:20" - }, - "returnParameters": { - "id": 16752, - "nodeType": "ParameterList", - "parameters": [], - "src": "26891:0:20" - }, - "scope": 16828, - "src": "26815:315:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16810, - "nodeType": "Block", - "src": "27400:144:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16796, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16788, - "src": "27418:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16797, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27426:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16798, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27426:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27418:27:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206d75737420626520696e2072616e6765206f662073746f726564207478206c697374", - "id": 16800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27447:42:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - }, - "value": "index must be in range of stored tx list" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - } - ], - "id": 16795, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27410:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27410:80:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16802, - "nodeType": "ExpressionStatement", - "src": "27410:80:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16803, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27500:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16805, - "indexExpression": { - "argumentTypes": null, - "id": 16804, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16788, - "src": "27513:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "27500:19:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "id": 16806, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 15135, - "src": "27500:27:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16807, - "name": "enabled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16790, - "src": "27530:7:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "27500:37:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16809, - "nodeType": "ExpressionStatement", - "src": "27500:37:20" - } - ] - }, - "documentation": "@param index Index of transaction. Transaction ordering may have changed since adding.\n@param enabled True for enabled, false for disabled.", - "id": 16811, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16793, - "modifierName": { - "argumentTypes": null, - "id": 16792, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "27388:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "27388:7:20" - } - ], - "name": "setTransactionEnabled", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16791, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16788, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 16811, - "src": "27337:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16787, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "27337:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16790, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 16811, - "src": "27349:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16789, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27349:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27336:26:20" - }, - "returnParameters": { - "id": 16794, - "nodeType": "ParameterList", - "parameters": [], - "src": "27400:0:20" - }, - "scope": 16828, - "src": "27306:238:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16826, - "nodeType": "Block", - "src": "27885:1112:20", - "statements": [ - { - "assignments": [ - 16821 - ], - "declarations": [ - { - "constant": false, - "id": 16821, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 16826, - "src": "27895:11:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16820, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27895:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16822, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "27895:11:20" - }, - { - "externalReferences": [ - { - "result": { - "declaration": 16821, - "isOffset": false, - "isSlot": false, - "src": "28273:6:20", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 16815, - "isOffset": false, - "isSlot": false, - "src": "28250:4:20", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 16815, - "isOffset": false, - "isSlot": false, - "src": "28764:4:20", - "valueSize": 1 - } - }, - { - "destination": { - "declaration": 16813, - "isOffset": false, - "isSlot": false, - "src": "28656:11:20", - "valueSize": 1 - } - } - ], - "id": 16823, - "nodeType": "InlineAssembly", - "operations": "{\n let outputAddress := mload(0x40)\n let dataAddress := add(data, 32)\n result := call(sub(gas(), 34710), destination, 0, dataAddress, mload(data), outputAddress, 0)\n}", - "src": "27916:1052:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16824, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16821, - "src": "28984:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 16819, - "id": 16825, - "nodeType": "Return", - "src": "28977:13:20" - } - ] - }, - "documentation": "@dev wrapper to call the encoded transactions on downstream consumers.\n@param destination Address of destination contract.\n@param data The encoded data payload.\n@return True on success", - "id": 16827, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "externalCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16813, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 16827, - "src": "27801:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16812, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27801:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16815, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 16827, - "src": "27822:17:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 16814, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "27822:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27800:40:20" - }, - "returnParameters": { - "id": 16819, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16818, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16827, - "src": "27875:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16817, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27875:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27874:6:20" - }, - "scope": 16828, - "src": "27779:1218:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 16829, - "src": "243:28756:20" - } - ], - "src": "0:29000:20" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/rebaser/YAMRebaser.sol", - "exportedSymbols": { - "YAMRebaser": [ - 16828 - ] - }, - "id": 16829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 15113, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:20" - }, - { - "id": 15114, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:20" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 15115, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 14806, - "src": "59:30:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 15116, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 14993, - "src": "90:29:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IUniswapV2Pair.sol", - "file": "../lib/IUniswapV2Pair.sol", - "id": 15117, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 14601, - "src": "120:35:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/UniswapV2OracleLibrary.sol", - "file": "../lib/UniswapV2OracleLibrary.sol", - "id": 15118, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 15112, - "src": "156:43:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 15119, - "nodeType": "ImportDirective", - "scope": 16829, - "sourceUnit": 19203, - "src": "200:40:20", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 16828, - "linearizedBaseContracts": [ - 16828 - ], - "name": "YAMRebaser", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 15122, - "libraryName": { - "contractScope": null, - "id": 15120, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "276:8:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "270:27:20", - "typeName": { - "id": 15121, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "289:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "body": { - "id": 15132, - "nodeType": "Block", - "src": "322:54:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15125, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "340:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "340:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15127, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "354:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "340:17:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 15124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "332:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "332:26:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15130, - "nodeType": "ExpressionStatement", - "src": "332:26:20" - }, - { - "id": 15131, - "nodeType": "PlaceholderStatement", - "src": "368:1:20" - } - ] - }, - "documentation": null, - "id": 15133, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 15123, - "nodeType": "ParameterList", - "parameters": [], - "src": "319:2:20" - }, - "src": "303:73:20", - "visibility": "internal" - }, - { - "canonicalName": "YAMRebaser.Transaction", - "id": 15140, - "members": [ - { - "constant": false, - "id": 15135, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 15140, - "src": "411:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15134, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "411:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15137, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 15140, - "src": "433:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15136, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "433:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15139, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 15140, - "src": "462:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 15138, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "462:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Transaction", - "nodeType": "StructDefinition", - "scope": 16828, - "src": "382:97:20", - "visibility": "public" - }, - { - "canonicalName": "YAMRebaser.UniVars", - "id": 15147, - "members": [ - { - "constant": false, - "id": 15142, - "name": "yamsToUni", - "nodeType": "VariableDeclaration", - "scope": 15147, - "src": "508:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15141, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "508:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15144, - "name": "amountFromReserves", - "nodeType": "VariableDeclaration", - "scope": 15147, - "src": "533:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15143, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "533:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15146, - "name": "mintToReserves", - "nodeType": "VariableDeclaration", - "scope": 15147, - "src": "567:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "567:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "UniVars", - "nodeType": "StructDefinition", - "scope": 16828, - "src": "485:111:20", - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 15155, - "name": "TransactionFailed", - "nodeType": "EventDefinition", - "parameters": { - "id": 15154, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15149, - "indexed": true, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 15155, - "src": "626:27:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15148, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "626:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15151, - "indexed": false, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 15155, - "src": "655:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15150, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "655:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15153, - "indexed": false, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 15155, - "src": "667:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 15152, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "667:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "625:53:20" - }, - "src": "602:77:20" - }, - { - "anonymous": false, - "documentation": null, - "id": 15161, - "name": "NewMaxSlippageFactor", - "nodeType": "EventDefinition", - "parameters": { - "id": 15160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15157, - "indexed": false, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 15161, - "src": "712:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "712:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15159, - "indexed": false, - "name": "newSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 15161, - "src": "739:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "739:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "711:54:20" - }, - "src": "685:81:20" - }, - { - "anonymous": false, - "documentation": null, - "id": 15167, - "name": "NewDeviationThreshold", - "nodeType": "EventDefinition", - "parameters": { - "id": 15166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15163, - "indexed": false, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 15167, - "src": "800:29:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "800:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15165, - "indexed": false, - "name": "newDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 15167, - "src": "831:29:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "831:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "799:62:20" - }, - "src": "772:90:20" - }, - { - "anonymous": false, - "documentation": "@notice Sets the treasury mint percentage of rebase", - "id": 15173, - "name": "NewRebaseMintPercent", - "nodeType": "EventDefinition", - "parameters": { - "id": 15172, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15169, - "indexed": false, - "name": "oldRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 15173, - "src": "970:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15168, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "970:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15171, - "indexed": false, - "name": "newRebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 15173, - "src": "997:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15170, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "997:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "969:54:20" - }, - "src": "943:81:20" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 15179, - "name": "NewReserveContract", - "nodeType": "EventDefinition", - "parameters": { - "id": 15178, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15175, - "indexed": false, - "name": "oldReserveContract", - "nodeType": "VariableDeclaration", - "scope": 15179, - "src": "1113:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15174, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1113:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15177, - "indexed": false, - "name": "newReserveContract", - "nodeType": "VariableDeclaration", - "scope": 15179, - "src": "1141:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1141:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1112:56:20" - }, - "src": "1088:81:20" - }, - { - "anonymous": false, - "documentation": "@notice Sets the reserve contract", - "id": 15189, - "name": "TreasuryIncreased", - "nodeType": "EventDefinition", - "parameters": { - "id": 15188, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15181, - "indexed": false, - "name": "reservesAdded", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1256:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1256:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15183, - "indexed": false, - "name": "yamsSold", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1279:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1279:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15185, - "indexed": false, - "name": "yamsFromReserves", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1297:24:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15184, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1297:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15187, - "indexed": false, - "name": "yamsToReserves", - "nodeType": "VariableDeclaration", - "scope": 15189, - "src": "1323:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15186, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1323:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1255:91:20" - }, - "src": "1232:115:20" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 15195, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 15194, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15191, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 15195, - "src": "1446:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15190, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1446:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15193, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 15195, - "src": "1469:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15192, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1469:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1445:46:20" - }, - "src": "1426:66:20" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 15201, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 15200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15197, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 15201, - "src": "1576:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1576:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15199, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 15201, - "src": "1592:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15198, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1592:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1575:32:20" - }, - "src": "1563:45:20" - }, - { - "constant": false, - "id": 15204, - "name": "transactions", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1656:33:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction[]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 15202, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15140, - "src": "1656:11:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction" - } - }, - "id": 15203, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1656:13:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage_ptr", - "typeString": "struct YAMRebaser.Transaction[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15206, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1732:18:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15205, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1732:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15208, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1800:25:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1800:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15210, - "name": "rebaseLag", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1879:24:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1879:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15212, - "name": "targetRate", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "1928:25:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15211, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1928:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15214, - "name": "rebaseMintPerc", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2028:29:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15213, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2028:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15216, - "name": "deviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2328:33:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15215, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2328:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15218, - "name": "minRebaseTimeIntervalSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2437:39:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15217, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2437:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15220, - "name": "lastRebaseTimestampSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2531:37:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2531:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15222, - "name": "rebaseWindowOffsetSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2760:36:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2760:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15224, - "name": "rebaseWindowLengthSec", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2900:36:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15223, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2900:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15226, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "2994:20:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2994:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15228, - "name": "rebasingActive", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3124:26:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15227, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3124:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 15231, - "name": "rebaseDelay", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3215:46:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15229, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3215:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3132", - "id": 15230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3253:8:20", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 15233, - "name": "timeOfTWAPInit", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3303:29:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3303:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15235, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3364:25:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15234, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3364:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15237, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3417:27:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15236, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3417:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15239, - "name": "reservesContract", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3482:31:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15238, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3482:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15241, - "name": "uniswap_pair", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3556:27:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15240, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3556:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15243, - "name": "blockTimestampLast", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3619:32:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15242, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3619:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15245, - "name": "priceCumulativeLast", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "3693:34:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15244, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3693:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15247, - "name": "maxSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "4042:32:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15246, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4042:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 15249, - "name": "isToken0", - "nodeType": "VariableDeclaration", - "scope": 16828, - "src": "4137:20:20", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15248, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4137:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 15358, - "nodeType": "Block", - "src": "4329:1304:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15260, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "4341:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3132", - "id": 15261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4368:8:20", - "subdenomination": "hours", - "typeDescriptions": { - "typeIdentifier": "t_rational_43200_by_1", - "typeString": "int_const 43200" - }, - "value": "12" - }, - "src": "4341:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15263, - "nodeType": "ExpressionStatement", - "src": "4341:35:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15264, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "4388:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3336303030", - "id": 15265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4412:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_36000_by_1", - "typeString": "int_const 36000" - }, - "value": "36000" - }, - "src": "4388:29:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15267, - "nodeType": "ExpressionStatement", - "src": "4388:29:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15268, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "4429:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15269, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15257, - "src": "4448:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4429:36:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15271, - "nodeType": "ExpressionStatement", - "src": "4429:36:20" - }, - { - "assignments": [ - 15273, - 15275 - ], - "declarations": [ - { - "constant": false, - "id": 15273, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 15358, - "src": "4478:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4478:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15275, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 15358, - "src": "4494:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15274, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4494:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15280, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15277, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15251, - "src": "4523:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15278, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15253, - "src": "4536:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15276, - "name": "sortTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16726, - "src": "4512:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$_t_address_$_t_address_$", - "typeString": "function (address,address) pure returns (address,address)" - } - }, - "id": 15279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4512:38:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4477:73:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15281, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15273, - "src": "4614:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15282, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15251, - "src": "4624:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4614:21:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15293, - "nodeType": "Block", - "src": "4687:45:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15289, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "4703:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 15290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4714:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4703:16:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15292, - "nodeType": "ExpressionStatement", - "src": "4703:16:20" - } - ] - }, - "id": 15294, - "nodeType": "IfStatement", - "src": "4610:122:20", - "trueBody": { - "id": 15288, - "nodeType": "Block", - "src": "4637:44:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 15286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15284, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "4653:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 15285, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4664:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "4653:15:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15287, - "nodeType": "ExpressionStatement", - "src": "4653:15:20" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 15301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15295, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "4782:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15297, - "name": "uniswap_factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15255, - "src": "4805:15:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15298, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15273, - "src": "4822:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15299, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15275, - "src": "4830:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15296, - "name": "pairFor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16683, - "src": "4797:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_address_$returns$_t_address_$", - "typeString": "function (address,address,address) pure returns (address)" - } - }, - "id": 15300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4797:40:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4782:55:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15302, - "nodeType": "ExpressionStatement", - "src": "4782:55:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15303, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "4892:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15304, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15257, - "src": "4911:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4892:36:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15306, - "nodeType": "ExpressionStatement", - "src": "4892:36:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15307, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15237, - "src": "5023:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15308, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15253, - "src": "5038:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5023:28:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15310, - "nodeType": "ExpressionStatement", - "src": "5023:28:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15311, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "5064:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15312, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15251, - "src": "5077:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5064:24:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15314, - "nodeType": "ExpressionStatement", - "src": "5064:24:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15315, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "5152:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - }, - "id": 15320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35343039323538", - "id": 15316, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5172:7:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5409258_by_1", - "typeString": "int_const 5409258" - }, - "value": "5409258" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - }, - "id": 15319, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5182:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5186:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5182:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - } - }, - "src": "5172:16:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_54092580000000000_by_1", - "typeString": "int_const 54092580000000000" - } - }, - "src": "5152:36:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15322, - "nodeType": "ExpressionStatement", - "src": "5152:36:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15323, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "5221:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15324, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5234:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15325, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5238:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "5234:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "src": "5221:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15328, - "nodeType": "ExpressionStatement", - "src": "5221:19:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15329, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15210, - "src": "5324:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15330, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5336:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "5324:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15332, - "nodeType": "ExpressionStatement", - "src": "5324:14:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15333, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "5368:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 15336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5385:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 15335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5389:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "5385:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "5368:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15338, - "nodeType": "ExpressionStatement", - "src": "5368:23:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15339, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "5420:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - }, - "id": 15344, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 15340, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5441:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - }, - "id": 15343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5445:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3136", - "id": 15342, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5449:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_16_by_1", - "typeString": "int_const 16" - }, - "value": "16" - }, - "src": "5445:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000000000_by_1", - "typeString": "int_const 10000000000000000" - } - }, - "src": "5441:10:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_50000000000000000_by_1", - "typeString": "int_const 50000000000000000" - } - }, - "src": "5420:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15346, - "nodeType": "ExpressionStatement", - "src": "5420:31:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15347, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15224, - "src": "5488:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_3600_by_1", - "typeString": "int_const 3600" - }, - "id": 15350, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 15348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5512:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3630", - "id": 15349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5517:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_60_by_1", - "typeString": "int_const 60" - }, - "value": "60" - }, - "src": "5512:7:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_3600_by_1", - "typeString": "int_const 3600" - } - }, - "src": "5488:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15352, - "nodeType": "ExpressionStatement", - "src": "5488:31:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15353, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "5609:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15354, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "5615:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5615:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5609:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15357, - "nodeType": "ExpressionStatement", - "src": "5609:16:20" - } - ] - }, - "documentation": null, - "id": 15359, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15258, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15251, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4185:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15250, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4185:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15253, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4214:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15252, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4214:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15255, - "name": "uniswap_factory", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4245:23:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15254, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4245:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15257, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 15359, - "src": "4278:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15256, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4278:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4175:134:20" - }, - "returnParameters": { - "id": 15259, - "nodeType": "ParameterList", - "parameters": [], - "src": "4329:0:20" - }, - "scope": 16828, - "src": "4164:1469:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15379, - "nodeType": "Block", - "src": "5785:184:20", - "statements": [ - { - "assignments": [ - 15367 - ], - "declarations": [ - { - "constant": false, - "id": 15367, - "name": "oldSlippageFactor", - "nodeType": "VariableDeclaration", - "scope": 15379, - "src": "5795:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15366, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5795:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15369, - "initialValue": { - "argumentTypes": null, - "id": 15368, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "5823:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5795:45:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15370, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "5850:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15371, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15361, - "src": "5870:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5850:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15373, - "nodeType": "ExpressionStatement", - "src": "5850:38:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15375, - "name": "oldSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15367, - "src": "5924:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15376, - "name": "maxSlippageFactor_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15361, - "src": "5943:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15374, - "name": "NewMaxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15161, - "src": "5903:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 15377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5903:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15378, - "nodeType": "EmitStatement", - "src": "5898:64:20" - } - ] - }, - "documentation": "@notice Updates slippage factor\n ", - "id": 15380, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15364, - "modifierName": { - "argumentTypes": null, - "id": 15363, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "5773:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "5773:7:20" - } - ], - "name": "setMaxSlippageFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15361, - "name": "maxSlippageFactor_", - "nodeType": "VariableDeclaration", - "scope": 15380, - "src": "5722:26:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15360, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5722:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5721:28:20" - }, - "returnParameters": { - "id": 15365, - "nodeType": "ParameterList", - "parameters": [], - "src": "5785:0:20" - }, - "scope": 16828, - "src": "5692:277:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15400, - "nodeType": "Block", - "src": "6122:152:20", - "statements": [ - { - "assignments": [ - 15388 - ], - "declarations": [ - { - "constant": false, - "id": 15388, - "name": "oldPerc", - "nodeType": "VariableDeclaration", - "scope": 15400, - "src": "6132:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15387, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6132:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15390, - "initialValue": { - "argumentTypes": null, - "id": 15389, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "6150:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6132:32:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15391, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "6174:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15392, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15382, - "src": "6191:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6174:32:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15394, - "nodeType": "ExpressionStatement", - "src": "6174:32:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15396, - "name": "oldPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15388, - "src": "6242:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15397, - "name": "rebaseMintPerc_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15382, - "src": "6251:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15395, - "name": "NewRebaseMintPercent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15173, - "src": "6221:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 15398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6221:46:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15399, - "nodeType": "EmitStatement", - "src": "6216:51:20" - } - ] - }, - "documentation": "@notice Updates rebase mint percentage\n ", - "id": 15401, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15385, - "modifierName": { - "argumentTypes": null, - "id": 15384, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "6110:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6110:7:20" - } - ], - "name": "setRebaseMintPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15383, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15382, - "name": "rebaseMintPerc_", - "nodeType": "VariableDeclaration", - "scope": 15401, - "src": "6062:23:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6062:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6061:25:20" - }, - "returnParameters": { - "id": 15386, - "nodeType": "ParameterList", - "parameters": [], - "src": "6122:0:20" - }, - "scope": 16828, - "src": "6035:239:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15421, - "nodeType": "Block", - "src": "6425:182:20", - "statements": [ - { - "assignments": [ - 15409 - ], - "declarations": [ - { - "constant": false, - "id": 15409, - "name": "oldReservesContract", - "nodeType": "VariableDeclaration", - "scope": 15421, - "src": "6435:27:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15408, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6435:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15411, - "initialValue": { - "argumentTypes": null, - "id": 15410, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "6465:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6435:46:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15412, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "6491:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15413, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15403, - "src": "6510:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6491:36:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15415, - "nodeType": "ExpressionStatement", - "src": "6491:36:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15417, - "name": "oldReservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15409, - "src": "6561:19:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15418, - "name": "reservesContract_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15403, - "src": "6582:17:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15416, - "name": "NewReserveContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15179, - "src": "6542:18:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 15419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6542:58:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15420, - "nodeType": "EmitStatement", - "src": "6537:63:20" - } - ] - }, - "documentation": "@notice Updates reserve contract\n ", - "id": 15422, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15406, - "modifierName": { - "argumentTypes": null, - "id": 15405, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "6413:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6413:7:20" - } - ], - "name": "setReserveContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15403, - "name": "reservesContract_", - "nodeType": "VariableDeclaration", - "scope": 15422, - "src": "6363:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15402, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6363:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6362:27:20" - }, - "returnParameters": { - "id": 15407, - "nodeType": "ParameterList", - "parameters": [], - "src": "6425:0:20" - }, - "scope": 16828, - "src": "6335:272:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15442, - "nodeType": "Block", - "src": "6829:141:20", - "statements": [ - { - "assignments": [ - 15430 - ], - "declarations": [ - { - "constant": false, - "id": 15430, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 15442, - "src": "6839:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15429, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6839:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15432, - "initialValue": { - "argumentTypes": null, - "id": 15431, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "6863:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6839:34:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15433, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "6883:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15434, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15424, - "src": "6896:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6883:24:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15436, - "nodeType": "ExpressionStatement", - "src": "6883:24:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15438, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15430, - "src": "6936:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15439, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15424, - "src": "6951:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15437, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15195, - "src": "6922:13:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 15440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6922:41:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15441, - "nodeType": "EmitStatement", - "src": "6917:46:20" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 15443, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 15427, - "modifierName": { - "argumentTypes": null, - "id": 15426, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "6817:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6817:7:20" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15425, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15424, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 15443, - "src": "6771:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15423, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6771:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6770:21:20" - }, - "returnParameters": { - "id": 15428, - "nodeType": "ParameterList", - "parameters": [], - "src": "6829:0:20" - }, - "scope": 16828, - "src": "6747:223:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 15473, - "nodeType": "Block", - "src": "7084:185:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15447, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7102:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7102:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15449, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "7116:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7102:24:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 15451, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7128:10:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 15446, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7094:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7094:45:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15453, - "nodeType": "ExpressionStatement", - "src": "7094:45:20" - }, - { - "assignments": [ - 15455 - ], - "declarations": [ - { - "constant": false, - "id": 15455, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 15473, - "src": "7149:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15454, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7149:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15457, - "initialValue": { - "argumentTypes": null, - "id": 15456, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "7166:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7149:20:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15458, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "7179:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15459, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "7185:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7179:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15461, - "nodeType": "ExpressionStatement", - "src": "7179:16:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15462, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15208, - "src": "7205:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 15464, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7226:1:20", - "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": 15463, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7218:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15465, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7218:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7205:23:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 15467, - "nodeType": "ExpressionStatement", - "src": "7205:23:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15469, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15455, - "src": "7250:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15470, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15206, - "src": "7258:3:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15468, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15201, - "src": "7243:6:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 15471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7243:19:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15472, - "nodeType": "EmitStatement", - "src": "7238:24:20" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 15474, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15444, - "nodeType": "ParameterList", - "parameters": [], - "src": "7060:2:20" - }, - "returnParameters": { - "id": 15445, - "nodeType": "ParameterList", - "parameters": [], - "src": "7084:0:20" - }, - "scope": 16828, - "src": "7041:228:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 15513, - "nodeType": "Block", - "src": "7407:388:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15478, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "7425:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15479, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7443:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7425:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920616374697661746564", - "id": 15481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7446:19:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - }, - "value": "already activated" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ede150f7c1acb28569fa7e8690e549b27e144f357dd5d934f773e0663a6e8a33", - "typeString": "literal_string \"already activated\"" - } - ], - "id": 15477, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7417:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7417:49:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15483, - "nodeType": "ExpressionStatement", - "src": "7417:49:20" - }, - { - "assignments": [ - 15485, - 15487 - ], - "declarations": [ - { - "constant": false, - "id": 15485, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 15513, - "src": "7477:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15484, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7477:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15487, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 15513, - "src": "7499:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 15486, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "7499:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15493, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15490, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "7582:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15491, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "7596:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 15488, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15111, - "src": "7535:22:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$15111_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 15489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 15110, - "src": "7535:46:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 15492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7535:70:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7476:129:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 15497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15495, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15487, - "src": "7623:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7640:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7623:18:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f20747261646573", - "id": 15498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7643:11:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - }, - "value": "no trades" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ead4fb8664c5d08129bf3b045ea1ab35b63567595e647ad3978cd3ca7245536", - "typeString": "literal_string \"no trades\"" - } - ], - "id": 15494, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7615:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7615:40:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15500, - "nodeType": "ExpressionStatement", - "src": "7615:40:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15501, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15243, - "src": "7665:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15502, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15487, - "src": "7686:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7665:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 15504, - "nodeType": "ExpressionStatement", - "src": "7665:35:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15505, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15245, - "src": "7710:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15506, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15485, - "src": "7732:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7710:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15508, - "nodeType": "ExpressionStatement", - "src": "7710:37:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15509, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "7757:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15510, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15487, - "src": "7774:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "7757:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15512, - "nodeType": "ExpressionStatement", - "src": "7757:31:20" - } - ] - }, - "documentation": "@notice Initializes TWAP start point, starts countdown to first rebase\n ", - "id": 15514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "init_twap", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15475, - "nodeType": "ParameterList", - "parameters": [], - "src": "7385:2:20" - }, - "returnParameters": { - "id": 15476, - "nodeType": "ParameterList", - "parameters": [], - "src": "7407:0:20" - }, - "scope": 16828, - "src": "7367:428:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15537, - "nodeType": "Block", - "src": "7959:240:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15518, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "7977:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15519, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7994:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7977:18:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "74776170207761736e7420696e74697469617465642c2063616c6c20696e69745f747761702829", - "id": 15521, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7997:41:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - }, - "value": "twap wasnt intitiated, call init_twap()" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1ba293819f78fb0c985f8dd459dccf09bc7d0fae1de884135eb3e56a6d358a83", - "typeString": "literal_string \"twap wasnt intitiated, call init_twap()\"" - } - ], - "id": 15517, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "7969:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7969:70:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15523, - "nodeType": "ExpressionStatement", - "src": "7969:70:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15525, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8110:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15526, - "name": "timeOfTWAPInit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15233, - "src": "8117:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 15527, - "name": "rebaseDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15231, - "src": "8134:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8117:28:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8110:35:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "21656e645f64656c6179", - "id": 15530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8147:12:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - }, - "value": "!end_delay" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_481f7871aff8cf1f32ce997e429f9a9003cffdcd81f8e87c880e4044265326bc", - "typeString": "literal_string \"!end_delay\"" - } - ], - "id": 15524, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8102:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8102:58:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15532, - "nodeType": "ExpressionStatement", - "src": "8102:58:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15533, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15228, - "src": "8171:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 15534, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8188:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8171:21:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15536, - "nodeType": "ExpressionStatement", - "src": "8171:21:20" - } - ] - }, - "documentation": "@notice Activates rebasing\n @dev One way function, cannot be undone, callable by anyone", - "id": 15538, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "activate_rebasing", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15515, - "nodeType": "ParameterList", - "parameters": [], - "src": "7937:2:20" - }, - "returnParameters": { - "id": 15516, - "nodeType": "ParameterList", - "parameters": [], - "src": "7959:0:20" - }, - "scope": 16828, - "src": "7911:288:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15699, - "nodeType": "Block", - "src": "8579:1620:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 15541, - "name": "_inRebaseWindow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16550, - "src": "8632:15:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$__$", - "typeString": "function () view" - } - }, - "id": 15542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8632:17:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15543, - "nodeType": "ExpressionStatement", - "src": "8632:17:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15547, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "8759:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15545, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15220, - "src": "8732:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "8732:26:20", - "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": 15548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8732:52:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 15549, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8787:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8732:58:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 15544, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "8724:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8724:67:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15552, - "nodeType": "ExpressionStatement", - "src": "8724:67:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15553, - "name": "lastRebaseTimestampSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15220, - "src": "8863:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15562, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "8948:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15558, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "8917:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15556, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8909:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 14968, - "src": "8909:7:20", - "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": 15559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8909:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15554, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "8888:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "8888:7:20", - "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": 15560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8888:55:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "8888:59:20", - "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": 15563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8888:82:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8863:107:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15565, - "nodeType": "ExpressionStatement", - "src": "8863:107:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15566, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15226, - "src": "8981:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 15569, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8999:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 15567, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15226, - "src": "8989:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "8989:9:20", - "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": 15570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8989:12:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8981:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15572, - "nodeType": "ExpressionStatement", - "src": "8981:20:20" - }, - { - "assignments": [ - 15574 - ], - "declarations": [ - { - "constant": false, - "id": 15574, - "name": "exchangeRate", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9049:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15573, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9049:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15577, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 15575, - "name": "getTWAP", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16407, - "src": "9072:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () returns (uint256)" - } - }, - "id": 15576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9072:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9049:32:20" - }, - { - "assignments": [ - 15579, - 15581 - ], - "declarations": [ - { - "constant": false, - "id": 15579, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9134:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9134:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15581, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9154:13:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 15580, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9154:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15585, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15583, - "name": "exchangeRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15574, - "src": "9189:12:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15582, - "name": "computeOffPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16605, - "src": "9171:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_bool_$", - "typeString": "function (uint256) view returns (uint256,bool)" - } - }, - "id": 15584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9171:31:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9133:69:20" - }, - { - "assignments": [ - 15587 - ], - "declarations": [ - { - "constant": false, - "id": 15587, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9213:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15586, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9213:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15589, - "initialValue": { - "argumentTypes": null, - "id": 15588, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15579, - "src": "9234:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9213:31:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15590, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9294:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15593, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15210, - "src": "9322:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15591, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9307:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9307:14:20", - "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": 15594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9307:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9294:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15596, - "nodeType": "ExpressionStatement", - "src": "9294:38:20" - }, - { - "assignments": [ - 15598 - ], - "declarations": [ - { - "constant": false, - "id": 15598, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9343:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 15597, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "9343:17:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15602, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15600, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "9385:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15599, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "9367:17:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 15601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9367:29:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9343:53:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 15603, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15581, - "src": "9411:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15631, - "nodeType": "IfStatement", - "src": "9407:183:20", - "trueBody": { - "id": 15630, - "nodeType": "Block", - "src": "9421:169:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9508:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9512:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9508:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15615, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9491:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15612, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9479:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15611, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9483:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9479:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "id": 15609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9471:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 15613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9471:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "9471:19:20", - "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": 15616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9471:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15605, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "9443:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19238, - "src": "9443:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9443:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9443:27:20", - "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": 15617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9443:60:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9443:64:20", - "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": 15622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9443:72:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15623, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "9518:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19120, - "src": "9518:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9518:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9443:97:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6577207363616c696e6720666163746f722077696c6c20626520746f6f20626967", - "id": 15627, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9542:36:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88492c32352e10f8ea97c185f2721f5b83e92075b5339799962a619fc82d5879", - "typeString": "literal_string \"new scaling factor will be too big\"" - }, - "value": "new scaling factor will be too big" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_88492c32352e10f8ea97c185f2721f5b83e92075b5339799962a619fc82d5879", - "typeString": "literal_string \"new scaling factor will be too big\"" - } - ], - "id": 15604, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "9435:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9435:144:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15629, - "nodeType": "ExpressionStatement", - "src": "9435:144:20" - } - ] - } - }, - { - "assignments": [ - 15633 - ], - "declarations": [ - { - "constant": false, - "id": 15633, - "name": "currSupply", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9601:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9601:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15637, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15634, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "9622:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "totalSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 19226, - "src": "9622:15:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9622:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9601:38:20" - }, - { - "assignments": [ - 15639 - ], - "declarations": [ - { - "constant": false, - "id": 15639, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9650:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15638, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9650:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15640, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "9650:18:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 15641, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15581, - "src": "9734:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15674, - "nodeType": "IfStatement", - "src": "9730:214:20", - "trueBody": { - "id": 15673, - "nodeType": "Block", - "src": "9744:200:20", - "statements": [ - { - "assignments": [ - 15643 - ], - "declarations": [ - { - "constant": false, - "id": 15643, - "name": "mintPerc", - "nodeType": "VariableDeclaration", - "scope": 15673, - "src": "9758:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15642, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9758:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15653, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15651, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15649, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9812:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9816:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9812:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15646, - "name": "rebaseMintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15214, - "src": "9792:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15644, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9777:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9777:14:20", - "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": 15647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9777:30:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9777:34:20", - "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": 15652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9777:42:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9758:61:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15654, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9833:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15657, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15643, - "src": "9861:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15655, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "9846:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "9846:14:20", - "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": 15658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9846:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9833:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15660, - "nodeType": "ExpressionStatement", - "src": "9833:37:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 15661, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15639, - "src": "9884:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 15669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 15667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9926:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 15668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9930:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "9926:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15664, - "name": "mintPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15643, - "src": "9912:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15662, - "name": "currSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15633, - "src": "9897:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9897:14:20", - "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": 15665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9897:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9897:28:20", - "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": 15670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9897:36:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9884:49:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15672, - "nodeType": "ExpressionStatement", - "src": "9884:49:20" - } - ] - } - }, - { - "assignments": [ - 15676 - ], - "declarations": [ - { - "constant": false, - "id": 15676, - "name": "supplyAfterRebase", - "nodeType": "VariableDeclaration", - "scope": 15699, - "src": "9972:25:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15675, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9972:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15683, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15679, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15226, - "src": "10011:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15680, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15587, - "src": "10018:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15681, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15581, - "src": "10030:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 15677, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "10000:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "rebase", - "nodeType": "MemberAccess", - "referencedDeclaration": 19183, - "src": "10000:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,bool) external returns (uint256)" - } - }, - "id": 15682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10000:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9972:67:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15685, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "10056:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19238, - "src": "10056:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10056:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15688, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15598, - "src": "10083:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "maxScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 19120, - "src": "10083:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 15690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10083:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10056:49:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 15684, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19255, - "src": "10049:6:20", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10049:57:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15693, - "nodeType": "ExpressionStatement", - "src": "10049:57:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15695, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15639, - "src": "10169:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15696, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15579, - "src": "10181:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15694, - "name": "afterRebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16350, - "src": "10157:11:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 15697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10157:35:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15698, - "nodeType": "ExpressionStatement", - "src": "10157:35:20" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is 1e18", - "id": 15700, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15539, - "nodeType": "ParameterList", - "parameters": [], - "src": "8557:2:20" - }, - "returnParameters": { - "id": 15540, - "nodeType": "ParameterList", - "parameters": [], - "src": "8579:0:20" - }, - "scope": 16828, - "src": "8542:1657:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 15844, - "nodeType": "Block", - "src": "10355:1650:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15712, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "10423:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 15713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10423:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 15714, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "10437:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10423:26:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206d73672e73656e646572", - "id": 15716, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10451:16:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - }, - "value": "bad msg.sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e485eb6972b7f3617c60a2e02531b9dc77eae498275725f671124a7f89c8968d", - "typeString": "literal_string \"bad msg.sender\"" - } - ], - "id": 15711, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10415:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10415:53:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15718, - "nodeType": "ExpressionStatement", - "src": "10415:53:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15720, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15702, - "src": "10539:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15722, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "10557:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 15721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10549:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10549:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10539:23:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "626164206f726967696e", - "id": 15725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10564:12:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - }, - "value": "bad origin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb98ef6156b9db848ff3d372dd772e52018e8e1b6330b5c67356844a876df67f", - "typeString": "literal_string \"bad origin\"" - } - ], - "id": 15719, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10531:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 15726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10531:46:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15727, - "nodeType": "ExpressionStatement", - "src": "10531:46:20" - }, - { - "assignments": [ - 15729 - ], - "declarations": [ - { - "constant": false, - "id": 15729, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 15844, - "src": "10588:22:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 15728, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15147, - "src": "10588:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_storage_ptr", - "typeString": "struct YAMRebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15736, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15732, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15708, - "src": "10625:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 15733, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15147, - "src": "10632:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - } - ], - "id": 15734, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10631:9:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - ], - "expression": { - "argumentTypes": null, - "id": 15730, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "10614:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 15731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10614:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 15735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10614:27:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10587:54:20" - }, - { - "assignments": [ - 15738 - ], - "declarations": [ - { - "constant": false, - "id": 15738, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 15844, - "src": "10652:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 15737, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "10652:17:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15742, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15740, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "10694:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15739, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "10676:17:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 15741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10676:29:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10652:53:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15743, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10720:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15744, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "10720:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15745, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10749:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10720:30:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15784, - "nodeType": "Block", - "src": "11248:97:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15779, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "11302:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15780, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11316:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15781, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11316:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15776, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "11293:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 19172, - "src": "11293:8:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 15782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11293:41:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15783, - "nodeType": "ExpressionStatement", - "src": "11293:41:20" - } - ] - }, - "id": 15785, - "nodeType": "IfStatement", - "src": "10716:629:20", - "trueBody": { - "id": 15775, - "nodeType": "Block", - "src": "10752:490:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15750, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "10841:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15751, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "10859:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15752, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10873:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "10873:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15747, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "10824:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 19065, - "src": "10824:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 15754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10824:76:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15755, - "nodeType": "ExpressionStatement", - "src": "10824:76:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15756, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10918:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15757, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "10918:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15758, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "10947:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15759, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "10947:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10918:46:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15774, - "nodeType": "IfStatement", - "src": "10914:318:20", - "trueBody": { - "id": 15773, - "nodeType": "Block", - "src": "10966:266:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15764, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "11153:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15768, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11189:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15769, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "11189:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15765, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11167:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15766, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11167:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "11167:21:20", - "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": 15770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11167:49:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15761, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "11144:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 19172, - "src": "11144:8:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 15771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11144:73:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15772, - "nodeType": "ExpressionStatement", - "src": "11144:73:20" - } - ] - } - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15786, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11396:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15787, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11396:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 15788, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11421:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11396:26:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 15799, - "nodeType": "IfStatement", - "src": "11392:107:20", - "trueBody": { - "id": 15798, - "nodeType": "Block", - "src": "11424:75:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15793, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "11447:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15794, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11465:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15795, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11465:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15790, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15738, - "src": "11438:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 19172, - "src": "11438:8:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 15796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11438:50:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 15797, - "nodeType": "ExpressionStatement", - "src": "11438:50:20" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "id": 15800, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "11559:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 15842, - "nodeType": "Block", - "src": "11787:212:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15826, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15237, - "src": "11831:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15825, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "11824:6:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 15827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11824:20:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 15828, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "11846:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15829, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15704, - "src": "11864:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15822, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14805, - "src": "11801:9:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$14805_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 15824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14633, - "src": "11801:22:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 15830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11801:71:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15831, - "nodeType": "ExpressionStatement", - "src": "11801:71:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15833, - "name": "amount0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15704, - "src": "11909:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15834, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11918:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15835, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11918:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15836, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11937:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15837, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "11937:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15838, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11965:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15839, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11965:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15832, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15189, - "src": "11891:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 15840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11891:97:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15841, - "nodeType": "EmitStatement", - "src": "11886:102:20" - } - ] - }, - "id": 15843, - "nodeType": "IfStatement", - "src": "11555:444:20", - "trueBody": { - "id": 15821, - "nodeType": "Block", - "src": "11569:212:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15805, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15237, - "src": "11613:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15804, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "11606:6:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 15806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11606:20:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 15807, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "11628:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 15808, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15706, - "src": "11646:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15801, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14805, - "src": "11583:9:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$14805_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 15803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14633, - "src": "11583:22:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 15809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11583:71:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15810, - "nodeType": "ExpressionStatement", - "src": "11583:71:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15812, - "name": "amount1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15706, - "src": "11691:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15813, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11700:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15814, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "11700:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15815, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11719:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15816, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "11719:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15817, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15729, - "src": "11747:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15818, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "11747:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15811, - "name": "TreasuryIncreased", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15189, - "src": "11673:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint256)" - } - }, - "id": 15819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11673:97:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15820, - "nodeType": "EmitStatement", - "src": "11668:102:20" - } - ] - } - } - ] - }, - "documentation": null, - "id": 15845, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapV2Call", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15709, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15702, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10238:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10238:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15704, - "name": "amount0", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10262:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15703, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10262:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15706, - "name": "amount1", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10287:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10287:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15708, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 15845, - "src": "10312:17:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 15707, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10312:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10228:107:20" - }, - "returnParameters": { - "id": 15710, - "nodeType": "ParameterList", - "parameters": [], - "src": "10355:0:20" - }, - "scope": 16828, - "src": "10206:1799:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 16141, - "nodeType": "Block", - "src": "12125:4537:20", - "statements": [ - { - "assignments": [ - 15853 - ], - "declarations": [ - { - "constant": false, - "id": 15853, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12135:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - }, - "typeName": { - "contractScope": null, - "id": 15852, - "name": "UniswapPair", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14600, - "src": "12135:11:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15857, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15855, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "12166:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15854, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14600, - "src": "12154:11:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14600_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 15856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12154:25:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12135:44:20" - }, - { - "assignments": [ - 15859 - ], - "declarations": [ - { - "constant": false, - "id": 15859, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12190:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - }, - "typeName": { - "contractScope": null, - "id": 15858, - "name": "YAMTokenInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19202, - "src": "12190:17:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15863, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15861, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15235, - "src": "12232:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 15860, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "12214:17:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 15862, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12214:29:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12190:53:20" - }, - { - "assignments": [ - 15865, - 15867, - null - ], - "declarations": [ - { - "constant": false, - "id": 15865, - "name": "token0Reserves", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12279:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15864, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12279:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15867, - "name": "token1Reserves", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12303:22:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12303:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 15871, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 15868, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "12331:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 15869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 14542, - "src": "12331:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "function () view external returns (uint112,uint112,uint32)" - } - }, - "id": 15870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12331:18:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint112_$_t_uint112_$_t_uint32_$", - "typeString": "tuple(uint112,uint112,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12278:71:20" - }, - { - "assignments": [ - 15873 - ], - "declarations": [ - { - "constant": false, - "id": 15873, - "name": "excess", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12419:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15872, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12419:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15878, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15876, - "name": "reservesContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15239, - "src": "12450:16:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 15874, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15859, - "src": "12436:3:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 15875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 19072, - "src": "12436:13:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 15877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12436:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12419:48:20" - }, - { - "assignments": [ - 15880 - ], - "declarations": [ - { - "constant": false, - "id": 15880, - "name": "tokens_to_max_slippage", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12479:30:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15879, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12479:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15886, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15882, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "12531:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15883, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "12547:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15884, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15849, - "src": "12563:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15881, - "name": "uniswapMaxSlippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16218, - "src": "12512:18:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) view returns (uint256)" - } - }, - "id": 15885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12512:62:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12479:95:20" - }, - { - "assignments": [ - 15888 - ], - "declarations": [ - { - "constant": false, - "id": 15888, - "name": "uniVars", - "nodeType": "VariableDeclaration", - "scope": 16141, - "src": "12585:22:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars" - }, - "typeName": { - "contractScope": null, - "id": 15887, - "name": "UniVars", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15147, - "src": "12585:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_storage_ptr", - "typeString": "struct YAMRebaser.UniVars" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15894, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15890, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "12641:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15891, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "12726:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 15892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12805:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 15889, - "name": "UniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15147, - "src": "12610:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_UniVars_$15147_storage_ptr_$", - "typeString": "type(struct YAMRebaser.UniVars storage pointer)" - } - }, - "id": 15893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "yamsToUni", - "amountFromReserves", - "mintToReserves" - ], - "nodeType": "FunctionCall", - "src": "12610:251:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12585:276:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 15895, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "13119:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16139, - "nodeType": "Block", - "src": "14926:1730:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16018, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14944:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16021, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "14984:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16019, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "14969:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "14969:14:20", - "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": 16022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14969:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14944:47:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16137, - "nodeType": "Block", - "src": "15444:1202:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16063, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "15466:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 16064, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15491:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15466:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16135, - "nodeType": "Block", - "src": "16079:553:20", - "statements": [ - { - "assignments": [ - 16102 - ], - "declarations": [ - { - "constant": false, - "id": 16102, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16135, - "src": "16158:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16158:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16108, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16104, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "16191:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16105, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "16215:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16106, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "16231:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16103, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "16178:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 16107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16178:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16158:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16109, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16268:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16111, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "16268:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16112, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "16297:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16268:51:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16114, - "nodeType": "ExpressionStatement", - "src": "16268:51:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16115, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16341:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16117, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "16341:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16118, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "16366:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16341:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16120, - "nodeType": "ExpressionStatement", - "src": "16341:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16124, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16102, - "src": "16564:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 16125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16575:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16127, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "16586:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16578:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16578:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16131, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16604:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16129, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "16593:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16130, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16593:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16593:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16121, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "16554:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "16554:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16554:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16134, - "nodeType": "ExpressionStatement", - "src": "16554:59:20" - } - ] - }, - "id": 16136, - "nodeType": "IfStatement", - "src": "15462:1170:20", - "trueBody": { - "id": 16100, - "nodeType": "Block", - "src": "15499:574:20", - "statements": [ - { - "assignments": [ - 16067 - ], - "declarations": [ - { - "constant": false, - "id": 16067, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16100, - "src": "15579:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16066, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15579:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16073, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16069, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "15612:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16070, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "15636:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16071, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "15652:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16068, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "15599:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 16072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15599:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15579:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16074, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15794:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "15794:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16079, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "15836:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 16080, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15861:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15836:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 16082, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15835:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16077, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "15819:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "15819:14:20", - "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": 16083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15819:50:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15794:75:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16085, - "nodeType": "ExpressionStatement", - "src": "15794:75:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16089, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16067, - "src": "16005:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 16090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16016:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16092, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "16027:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16091, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16019:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16019:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16096, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "16045:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16094, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "16034:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16034:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16034:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16086, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "15995:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "15995:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15995:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16099, - "nodeType": "ExpressionStatement", - "src": "15995:59:20" - } - ] - } - } - ] - }, - "id": 16138, - "nodeType": "IfStatement", - "src": "14940:1706:20", - "trueBody": { - "id": 16062, - "nodeType": "Block", - "src": "14993:445:20", - "statements": [ - { - "assignments": [ - 16025 - ], - "declarations": [ - { - "constant": false, - "id": 16025, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16062, - "src": "15066:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16024, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15066:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16033, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16027, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "15099:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 16028, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15112:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15099:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16030, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "15120:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16031, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "15136:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16026, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "15086:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 16032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15086:65:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15066:85:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16034, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15169:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16036, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "15169:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16037, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "15189:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 16038, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15202:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15189:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15169:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16041, - "nodeType": "ExpressionStatement", - "src": "15169:39:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16042, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15226:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 16044, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "15226:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16045, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "15255:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15226:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16047, - "nodeType": "ExpressionStatement", - "src": "15226:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16051, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16025, - "src": "15374:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 16052, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15385:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16054, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "15396:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16053, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15388:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15388:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16058, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "15414:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16056, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "15403:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16057, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15403:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15403:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16048, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "15364:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "15364:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15364:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16061, - "nodeType": "ExpressionStatement", - "src": "15364:59:20" - } - ] - } - } - ] - }, - "id": 16140, - "nodeType": "IfStatement", - "src": "13115:3541:20", - "trueBody": { - "id": 16017, - "nodeType": "Block", - "src": "13129:1791:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15896, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "13147:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15899, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13187:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15897, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "13172:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "13172:14:20", - "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": 15900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13172:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13147:47:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16015, - "nodeType": "Block", - "src": "13813:1097:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15941, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "13835:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 15942, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13860:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13835:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16013, - "nodeType": "Block", - "src": "14343:553:20", - "statements": [ - { - "assignments": [ - 15980 - ], - "declarations": [ - { - "constant": false, - "id": 15980, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 16013, - "src": "14422:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15979, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14422:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15986, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15982, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14455:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15983, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "14479:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15984, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "14495:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15981, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "14442:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 15985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14442:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14422:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15987, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14532:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15989, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "14532:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15990, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14561:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14532:51:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15992, - "nodeType": "ExpressionStatement", - "src": "14532:51:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15993, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14605:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15995, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "14605:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15996, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "14630:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14605:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15998, - "nodeType": "ExpressionStatement", - "src": "14605:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14828:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 16003, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15980, - "src": "14831:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16005, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "14850:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 16004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14842:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14842:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16009, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14868:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16007, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "14857:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14857:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14857:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15999, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "14818:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "14818:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 16011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14818:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16012, - "nodeType": "ExpressionStatement", - "src": "14818:59:20" - } - ] - }, - "id": 16014, - "nodeType": "IfStatement", - "src": "13831:1065:20", - "trueBody": { - "id": 15978, - "nodeType": "Block", - "src": "13868:469:20", - "statements": [ - { - "assignments": [ - 15945 - ], - "declarations": [ - { - "constant": false, - "id": 15945, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 15978, - "src": "13948:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15944, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13948:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15951, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15947, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "13981:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15948, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "14005:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15949, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "14021:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15946, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "13968:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 15950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13968:68:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13948:88:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15952, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14163:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15954, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "mintToReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15146, - "src": "14163:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15957, - "name": "tokens_to_max_slippage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15880, - "src": "14204:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 15958, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "14229:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14204:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 15960, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14203:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 15955, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "14188:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "14188:14:20", - "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": 15961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14188:49:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14163:74:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15963, - "nodeType": "ExpressionStatement", - "src": "14163:74:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 15967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14269:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 15968, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15945, - "src": "14272:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15970, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "14291:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 15969, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14283:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15971, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14283:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15974, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "14309:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15972, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "14298:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 15973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14298:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 15975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14298:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15964, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "14259:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 15966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "14259:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 15976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14259:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15977, - "nodeType": "ExpressionStatement", - "src": "14259:59:20" - } - ] - } - } - ] - }, - "id": 16016, - "nodeType": "IfStatement", - "src": "13143:1767:20", - "trueBody": { - "id": 15940, - "nodeType": "Block", - "src": "13196:611:20", - "statements": [ - { - "assignments": [ - 15903 - ], - "declarations": [ - { - "constant": false, - "id": 15903, - "name": "buyTokens", - "nodeType": "VariableDeclaration", - "scope": 15940, - "src": "13435:17:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15902, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13435:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 15911, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15905, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "13468:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 15906, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13481:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13468:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15908, - "name": "token0Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15865, - "src": "13489:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 15909, - "name": "token1Reserves", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15867, - "src": "13505:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 15904, - "name": "getAmountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16278, - "src": "13455:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" - } - }, - "id": 15910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13455:65:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13435:85:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15912, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "13538:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15914, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "yamsToUni", - "nodeType": "MemberAccess", - "referencedDeclaration": 15142, - "src": "13538:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 15917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 15915, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15847, - "src": "13558:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 15916, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13571:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13558:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13538:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15919, - "nodeType": "ExpressionStatement", - "src": "13538:39:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 15924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 15920, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "13595:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - }, - "id": 15922, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "amountFromReserves", - "nodeType": "MemberAccess", - "referencedDeclaration": 15144, - "src": "13595:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 15923, - "name": "excess", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15873, - "src": "13624:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13595:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15925, - "nodeType": "ExpressionStatement", - "src": "13595:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 15929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13743:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 15930, - "name": "buyTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15903, - "src": "13746:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15932, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19332, - "src": "13765:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMRebaser_$16828", - "typeString": "contract YAMRebaser" - } - ], - "id": 15931, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13757:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 15933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13757:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 15936, - "name": "uniVars", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15888, - "src": "13783:7:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_UniVars_$15147_memory_ptr", - "typeString": "struct YAMRebaser.UniVars memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15934, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "13772:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 15935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13772:10:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 15937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13772:19:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 15926, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15853, - "src": "13733:4:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 15928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "swap", - "nodeType": "MemberAccess", - "referencedDeclaration": 14584, - "src": "13733:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address,bytes memory) external" - } - }, - "id": 15938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13733:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 15939, - "nodeType": "ExpressionStatement", - "src": "13733:59:20" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 16142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "buyReserveAndTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 15850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15847, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 16142, - "src": "12051:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15846, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12051:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15849, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 16142, - "src": "12079:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15848, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12079:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12041:62:20" - }, - "returnParameters": { - "id": 15851, - "nodeType": "ParameterList", - "parameters": [], - "src": "12125:0:20" - }, - "scope": 16828, - "src": "12011:4651:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16217, - "nodeType": "Block", - "src": "16832:912:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 16153, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "16846:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16215, - "nodeType": "Block", - "src": "17523:215:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16185, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "17541:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 16188, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17555:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 16187, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17559:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "17555:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "17541:20:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16213, - "nodeType": "Block", - "src": "17650:78:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16208, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17706:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16209, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17710:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17706:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16203, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "17686:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 16204, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17699:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "17686:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16201, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16146, - "src": "17675:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "17675:10:20", - "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": 16206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17675:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "17675:30:20", - "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": 16211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17675:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16212, - "nodeType": "Return", - "src": "17668:45:20" - } - ] - }, - "id": 16214, - "nodeType": "IfStatement", - "src": "17537:191:20", - "trueBody": { - "id": 16200, - "nodeType": "Block", - "src": "17563:81:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16197, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16195, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17622:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17626:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17622:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16192, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "17599:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16190, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16146, - "src": "17588:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "17588:10:20", - "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": 16193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17588:29:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "17588:33:20", - "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": 16198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17588:41:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16199, - "nodeType": "Return", - "src": "17581:48:20" - } - ] - } - } - ] - }, - "id": 16216, - "nodeType": "IfStatement", - "src": "16842:896:20", - "trueBody": { - "id": 16184, - "nodeType": "Block", - "src": "16856:661:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16154, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "16872:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - }, - "id": 16157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16155, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16886:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 16156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16890:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "16886:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000_by_1", - "typeString": "int_const 100000000000000000" - } - }, - "src": "16872:20:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16182, - "nodeType": "Block", - "src": "17007:500:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17487:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17491:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "17487:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16172, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16148, - "src": "17467:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 16173, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17480:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "17467:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16170, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16144, - "src": "17456:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "17456:10:20", - "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": 16175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17456:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "17456:30:20", - "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": 16180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17456:38:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16181, - "nodeType": "Return", - "src": "17449:45:20" - } - ] - }, - "id": 16183, - "nodeType": "IfStatement", - "src": "16868:639:20", - "trueBody": { - "id": 16169, - "nodeType": "Block", - "src": "16894:107:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16981:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16985:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "16981:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16161, - "name": "maxSlippageFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15247, - "src": "16958:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16159, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16144, - "src": "16947:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "16947:10:20", - "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": 16162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16947:29:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "16947:33:20", - "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": 16167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16947:41:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 16152, - "id": 16168, - "nodeType": "Return", - "src": "16940:48:20" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 16218, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uniswapMaxSlippage", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16144, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16705:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16143, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16705:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16146, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16729:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16729:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16148, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16753:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16147, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16753:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16695:82:20" - }, - "returnParameters": { - "id": 16152, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16151, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16218, - "src": "16819:7:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16150, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16819:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16818:9:20" - }, - "scope": 16828, - "src": "16668:1076:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16277, - "nodeType": "Block", - "src": "18029:394:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16230, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16220, - "src": "18046:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16231, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18057:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18046:12:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54", - "id": 16233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18060:45:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ec21b006eb37ef20d0f4abcabd34de6854fa68af48294244e0263dc05c1dbbae", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\"" - } - ], - "id": 16229, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18038:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18038:68:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16235, - "nodeType": "ExpressionStatement", - "src": "18038:68:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16237, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16222, - "src": "18123:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18135:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18123:13:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16240, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16224, - "src": "18140:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18153:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18140:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18123:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459", - "id": 16244, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18156:42:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - }, - "value": "UniswapV2Library: INSUFFICIENT_LIQUIDITY" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e8d6b265173dbbd87b3b9e2bf4238bea6caf2b2bbeb63f859a738aec9e761c8", - "typeString": "literal_string \"UniswapV2Library: INSUFFICIENT_LIQUIDITY\"" - } - ], - "id": 16236, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "18115:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18115:84:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16246, - "nodeType": "ExpressionStatement", - "src": "18115:84:20" - }, - { - "assignments": [ - 16248 - ], - "declarations": [ - { - "constant": false, - "id": 16248, - "name": "amountInWithFee", - "nodeType": "VariableDeclaration", - "scope": 16277, - "src": "18208:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16247, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18208:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16253, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "393937", - "id": 16251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18244:3:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - }, - "value": "997" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_997_by_1", - "typeString": "int_const 997" - } - ], - "expression": { - "argumentTypes": null, - "id": 16249, - "name": "amountIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16220, - "src": "18231:8:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "18231:12:20", - "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": 16252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18231:17:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18208:40:20" - }, - { - "assignments": [ - 16255 - ], - "declarations": [ - { - "constant": false, - "id": 16255, - "name": "numerator", - "nodeType": "VariableDeclaration", - "scope": 16277, - "src": "18257:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16254, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18257:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16260, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16258, - "name": "reserveOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16224, - "src": "18294:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16256, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16248, - "src": "18274:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "18274:19:20", - "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": 16259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18274:31:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18257:48:20" - }, - { - "assignments": [ - 16262 - ], - "declarations": [ - { - "constant": false, - "id": 16262, - "name": "denominator", - "nodeType": "VariableDeclaration", - "scope": 16277, - "src": "18314:16:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16261, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18314:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16270, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16268, - "name": "amountInWithFee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16248, - "src": "18357:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31303030", - "id": 16265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18347:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - }, - "value": "1000" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - } - ], - "expression": { - "argumentTypes": null, - "id": 16263, - "name": "reserveIn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16222, - "src": "18333:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "18333:13:20", - "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": 16266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18333:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "18333:23:20", - "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": 16269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18333:40:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18314:59:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16271, - "name": "amountOut", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16227, - "src": "18382:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16272, - "name": "numerator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16255, - "src": "18394:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 16273, - "name": "denominator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16262, - "src": "18406:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18394:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18382:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16276, - "nodeType": "ExpressionStatement", - "src": "18382:35:20" - } - ] - }, - "documentation": null, - "id": 16278, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAmountOut", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16220, - "name": "amountIn", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "17893:13:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16219, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17893:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16222, - "name": "reserveIn", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "17916:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16221, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17916:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16224, - "name": "reserveOut", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "17940:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16223, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17940:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17883:78:20" - }, - "returnParameters": { - "id": 16228, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16227, - "name": "amountOut", - "nodeType": "VariableDeclaration", - "scope": 16278, - "src": "18009:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16226, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18009:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18008:16:20" - }, - "scope": 16828, - "src": "17862:561:20", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16349, - "nodeType": "Block", - "src": "18534:677:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16286, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "18582:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16285, - "name": "UniswapPair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14600, - "src": "18570:11:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapPair_$14600_$", - "typeString": "type(contract UniswapPair)" - } - }, - "id": 16287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18570:25:20", - "typeDescriptions": { - "typeIdentifier": "t_contract$_UniswapPair_$14600", - "typeString": "contract UniswapPair" - } - }, - "id": 16288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sync", - "nodeType": "MemberAccess", - "referencedDeclaration": 14592, - "src": "18570:30:20", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 16289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18570:32:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16290, - "nodeType": "ExpressionStatement", - "src": "18570:32:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16291, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16280, - "src": "18617:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18630:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18617:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16300, - "nodeType": "IfStatement", - "src": "18613:136:20", - "trueBody": { - "id": 16299, - "nodeType": "Block", - "src": "18633:116:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16295, - "name": "mintAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16280, - "src": "18686:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16296, - "name": "offPegPerc", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16282, - "src": "18714:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16294, - "name": "buyReserveAndTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16142, - "src": "18647:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 16297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18647:91:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16298, - "nodeType": "ExpressionStatement", - "src": "18647:91:20" - } - ] - } - }, - { - "body": { - "id": 16347, - "nodeType": "Block", - "src": "18842:363:20", - "statements": [ - { - "assignments": [ - 16313 - ], - "declarations": [ - { - "constant": false, - "id": 16313, - "name": "t", - "nodeType": "VariableDeclaration", - "scope": 16347, - "src": "18856:21:20", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction" - }, - "typeName": { - "contractScope": null, - "id": 16312, - "name": "Transaction", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15140, - "src": "18856:11:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16317, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16314, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "18880:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16316, - "indexExpression": { - "argumentTypes": null, - "id": 16315, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "18893:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18880:15:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18856:39:20" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16318, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "18913:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 15135, - "src": "18913:9:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16346, - "nodeType": "IfStatement", - "src": "18909:286:20", - "trueBody": { - "id": 16345, - "nodeType": "Block", - "src": "18924:271:20", - "statements": [ - { - "assignments": [ - 16321 - ], - "declarations": [ - { - "constant": false, - "id": 16321, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 16345, - "src": "18942:11:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16320, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "18942:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16328, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16323, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "18989:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16324, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 15137, - "src": "18989:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16325, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "19004:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16326, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 15139, - "src": "19004:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 16322, - "name": "externalCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16827, - "src": "18976:12:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_bool_$", - "typeString": "function (address,bytes memory) returns (bool)" - } - }, - "id": 16327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18976:35:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18942:69:20" - }, - { - "condition": { - "argumentTypes": null, - "id": 16330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "19033:7:20", - "subExpression": { - "argumentTypes": null, - "id": 16329, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16321, - "src": "19034:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16344, - "nodeType": "IfStatement", - "src": "19029:152:20", - "trueBody": { - "id": 16343, - "nodeType": "Block", - "src": "19042:139:20", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16332, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "19087:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16333, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destination", - "nodeType": "MemberAccess", - "referencedDeclaration": 15137, - "src": "19087:13:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16334, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "19102:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16335, - "name": "t", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16313, - "src": "19105:1:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage_ptr", - "typeString": "struct YAMRebaser.Transaction storage pointer" - } - }, - "id": 16336, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": 15139, - "src": "19105:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - ], - "id": 16331, - "name": "TransactionFailed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15155, - "src": "19069:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,bytes memory)" - } - }, - "id": 16337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19069:43:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16338, - "nodeType": "EmitStatement", - "src": "19064:48:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "5472616e73616374696f6e204661696c6564", - "id": 16340, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19141:20:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - }, - "value": "Transaction Failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f49bab5693f8c67a6b906bdcc8c0fbaa6df8951336f67051f176c0232fe9f578", - "typeString": "literal_string \"Transaction Failed\"" - } - ], - "id": 16339, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19271, - 19272 - ], - "referencedDeclaration": 19272, - "src": "19134:6:20", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 16341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19134:28:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16342, - "nodeType": "ExpressionStatement", - "src": "19134:28:20" - } - ] - } - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16305, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "18812:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16306, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "18816:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16307, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18816:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18812:23:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16348, - "initializationExpression": { - "assignments": [ - 16302 - ], - "declarations": [ - { - "constant": false, - "id": 16302, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 16348, - "src": "18800:6:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16301, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18800:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16304, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 16303, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18809:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18800:10:20" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 16310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18837:3:20", - "subExpression": { - "argumentTypes": null, - "id": 16309, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16302, - "src": "18837:1:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16311, - "nodeType": "ExpressionStatement", - "src": "18837:3:20" - }, - "nodeType": "ForStatement", - "src": "18795:410:20" - } - ] - }, - "documentation": null, - "id": 16350, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "afterRebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16283, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16280, - "name": "mintAmount", - "nodeType": "VariableDeclaration", - "scope": 16350, - "src": "18460:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16279, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18460:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16282, - "name": "offPegPerc", - "nodeType": "VariableDeclaration", - "scope": 16350, - "src": "18488:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16281, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18488:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18450:62:20" - }, - "returnParameters": { - "id": 16284, - "nodeType": "ParameterList", - "parameters": [], - "src": "18534:0:20" - }, - "scope": 16828, - "src": "18430:781:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16406, - "nodeType": "Block", - "src": "19698:768:20", - "statements": [ - { - "assignments": [ - 16356, - 16358 - ], - "declarations": [ - { - "constant": false, - "id": 16356, - "name": "priceCumulative", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "19707:20:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16355, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19707:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16358, - "name": "blockTimestamp", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "19729:21:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 16357, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19729:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16364, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16361, - "name": "uniswap_pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15241, - "src": "19810:12:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16362, - "name": "isToken0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15249, - "src": "19824:8:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 16359, - "name": "UniswapV2OracleLibrary", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15111, - "src": "19763:22:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$15111_$", - "typeString": "type(library UniswapV2OracleLibrary)" - } - }, - "id": 16360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "currentCumulativePrices", - "nodeType": "MemberAccess", - "referencedDeclaration": 15110, - "src": "19763:46:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bool_$returns$_t_uint256_$_t_uint32_$", - "typeString": "function (address,bool) view returns (uint256,uint32)" - } - }, - "id": 16363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19763:70:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$", - "typeString": "tuple(uint256,uint32)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19706:127:20" - }, - { - "assignments": [ - 16366 - ], - "declarations": [ - { - "constant": false, - "id": 16366, - "name": "timeElapsed", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "19842:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 16365, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "19842:6:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16370, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 16369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16367, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16358, - "src": "19863:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 16368, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15243, - "src": "19880:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "19863:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19842:56:20" - }, - { - "assignments": [ - 16374 - ], - "declarations": [ - { - "constant": false, - "id": 16374, - "name": "priceAverage", - "nodeType": "VariableDeclaration", - "scope": 16406, - "src": "20163:40:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory_ptr", - "typeString": "struct FixedPoint.uq112x112" - }, - "typeName": { - "contractScope": null, - "id": 16373, - "name": "FixedPoint.uq112x112", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14066, - "src": "20163:20:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_storage_ptr", - "typeString": "struct FixedPoint.uq112x112" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16378, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16356, - "src": "20236:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 16379, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15245, - "src": "20254:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20236:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 16381, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20235:39:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 16382, - "name": "timeElapsed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16366, - "src": "20277:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "20235:53:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20227:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint224_$", - "typeString": "type(uint224)" - }, - "typeName": "uint224" - }, - "id": 16384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20227:62:20", - "typeDescriptions": { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint224", - "typeString": "uint224" - } - ], - "expression": { - "argumentTypes": null, - "id": 16375, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14289, - "src": "20206:10:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14289_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 16376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "uq112x112", - "nodeType": "MemberAccess", - "referencedDeclaration": 14066, - "src": "20206:20:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_uq112x112_$14066_storage_ptr_$", - "typeString": "type(struct FixedPoint.uq112x112 storage pointer)" - } - }, - "id": 16385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20206:84:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20163:127:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16387, - "name": "priceCumulativeLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15245, - "src": "20301:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16388, - "name": "priceCumulative", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16356, - "src": "20323:15:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20301:37:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16390, - "nodeType": "ExpressionStatement", - "src": "20301:37:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16391, - "name": "blockTimestampLast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15243, - "src": "20348:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16392, - "name": "blockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16358, - "src": "20369:14:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "20348:35:20", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 16394, - "nodeType": "ExpressionStatement", - "src": "20348:35:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16399, - "name": "priceAverage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16374, - "src": "20437:12:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16402, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20451:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16401, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20455:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "20451:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_uq112x112_$14066_memory_ptr", - "typeString": "struct FixedPoint.uq112x112 memory" - }, - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "id": 16397, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14289, - "src": "20422:10:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14289_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 16398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14183, - "src": "20422:14:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_uq112x112_$14066_memory_ptr_$_t_uint256_$returns$_t_struct$_uq144x112_$14069_memory_ptr_$", - "typeString": "function (struct FixedPoint.uq112x112 memory,uint256) pure returns (struct FixedPoint.uq144x112 memory)" - } - }, - "id": 16403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20422:36:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_uq144x112_$14069_memory_ptr", - "typeString": "struct FixedPoint.uq144x112 memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_uq144x112_$14069_memory_ptr", - "typeString": "struct FixedPoint.uq144x112 memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16395, - "name": "FixedPoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14289, - "src": "20401:10:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_FixedPoint_$14289_$", - "typeString": "type(library FixedPoint)" - } - }, - "id": 16396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decode144", - "nodeType": "MemberAccess", - "referencedDeclaration": 14241, - "src": "20401:20:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_uq144x112_$14069_memory_ptr_$returns$_t_uint144_$", - "typeString": "function (struct FixedPoint.uq144x112 memory) pure returns (uint144)" - } - }, - "id": 16404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20401:58:20", - "typeDescriptions": { - "typeIdentifier": "t_uint144", - "typeString": "uint144" - } - }, - "functionReturnParameters": 16354, - "id": 16405, - "nodeType": "Return", - "src": "20394:65:20" - } - ] - }, - "documentation": "@notice Calculates TWAP from uniswap\n * @dev When liquidity is low, this can be manipulated by an end of block -> next block\n attack. We delay the activation of rebases 12 hours after liquidity incentives\n to reduce this attack vector. Additional there is very little supply\n to be able to manipulate this during that time period of highest vuln.", - "id": 16407, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTWAP", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16351, - "nodeType": "ParameterList", - "parameters": [], - "src": "19648:2:20" - }, - "returnParameters": { - "id": 16354, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16353, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16407, - "src": "19685:7:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16352, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19685:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19684:9:20" - }, - "scope": 16828, - "src": "19632:834:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16433, - "nodeType": "Block", - "src": "20888:238:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16415, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "20906:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16416, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20927:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20906:22:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16414, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "20898:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20898:31:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16419, - "nodeType": "ExpressionStatement", - "src": "20898:31:20" - }, - { - "assignments": [ - 16421 - ], - "declarations": [ - { - "constant": false, - "id": 16421, - "name": "oldDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 16433, - "src": "20939:29:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16420, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20939:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16423, - "initialValue": { - "argumentTypes": null, - "id": 16422, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "20971:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20939:50:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16424, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "20999:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16425, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16409, - "src": "21020:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20999:40:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16427, - "nodeType": "ExpressionStatement", - "src": "20999:40:20" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16429, - "name": "oldDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16421, - "src": "21076:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 16430, - "name": "deviationThreshold_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16409, - "src": "21099:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16428, - "name": "NewDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15167, - "src": "21054:21:20", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 16431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21054:65:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16432, - "nodeType": "EmitStatement", - "src": "21049:70:20" - } - ] - }, - "documentation": "@notice Sets the deviation threshold fraction. If the exchange rate given by the market\n oracle is within this fractional distance from the targetRate, then no supply\n modifications are made.\n@param deviationThreshold_ The new exchange rate threshold fraction.", - "id": 16434, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16412, - "modifierName": { - "argumentTypes": null, - "id": 16411, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "20876:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "20876:7:20" - } - ], - "name": "setDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16410, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16409, - "name": "deviationThreshold_", - "nodeType": "VariableDeclaration", - "scope": 16434, - "src": "20822:27:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16408, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20822:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20821:29:20" - }, - "returnParameters": { - "id": 16413, - "nodeType": "ParameterList", - "parameters": [], - "src": "20888:0:20" - }, - "scope": 16828, - "src": "20791:335:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16451, - "nodeType": "Block", - "src": "21658:72:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16442, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16436, - "src": "21676:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21689:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21676:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16441, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "21668:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21668:23:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16446, - "nodeType": "ExpressionStatement", - "src": "21668:23:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16447, - "name": "rebaseLag", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15210, - "src": "21701:9:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16448, - "name": "rebaseLag_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16436, - "src": "21713:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21701:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16450, - "nodeType": "ExpressionStatement", - "src": "21701:22:20" - } - ] - }, - "documentation": "@notice Sets the rebase lag parameter.\nIt is used to dampen the applied supply adjustment by 1 / rebaseLag\nIf the rebase lag R, equals 1, the smallest value for R, then the full supply\ncorrection is applied on each rebase cycle.\nIf it is greater than 1, then a correction of 1/R of is applied on each rebase.\n@param rebaseLag_ The new rebase lag parameter.", - "id": 16452, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16439, - "modifierName": { - "argumentTypes": null, - "id": 16438, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "21646:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21646:7:20" - } - ], - "name": "setRebaseLag", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16436, - "name": "rebaseLag_", - "nodeType": "VariableDeclaration", - "scope": 16452, - "src": "21601:18:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21601:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21600:20:20" - }, - "returnParameters": { - "id": 16440, - "nodeType": "ParameterList", - "parameters": [], - "src": "21658:0:20" - }, - "scope": 16828, - "src": "21579:151:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16469, - "nodeType": "Block", - "src": "21936:75:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16460, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16454, - "src": "21954:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16461, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21968:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "21954:15:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16459, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "21946:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21946:24:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16464, - "nodeType": "ExpressionStatement", - "src": "21946:24:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16465, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "21980:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16466, - "name": "targetRate_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16454, - "src": "21993:11:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21980:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16468, - "nodeType": "ExpressionStatement", - "src": "21980:24:20" - } - ] - }, - "documentation": "@notice Sets the targetRate parameter.\n@param targetRate_ The new target rate parameter.", - "id": 16470, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16457, - "modifierName": { - "argumentTypes": null, - "id": 16456, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "21924:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21924:7:20" - } - ], - "name": "setTargetRate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16455, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16454, - "name": "targetRate_", - "nodeType": "VariableDeclaration", - "scope": 16470, - "src": "21878:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16453, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21878:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21877:21:20" - }, - "returnParameters": { - "id": 16458, - "nodeType": "ParameterList", - "parameters": [], - "src": "21936:0:20" - }, - "scope": 16828, - "src": "21855:156:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16505, - "nodeType": "Block", - "src": "22887:299:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16482, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16472, - "src": "22905:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 16483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22933:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "22905:29:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16481, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "22897:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22897:38:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16486, - "nodeType": "ExpressionStatement", - "src": "22897:38:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16488, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16474, - "src": "22953:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16489, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16472, - "src": "22978:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22953:50:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16487, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "22945:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22945:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16492, - "nodeType": "ExpressionStatement", - "src": "22945:59:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16493, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "23015:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16494, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16472, - "src": "23042:25:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23015:52:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16496, - "nodeType": "ExpressionStatement", - "src": "23015:52:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16497, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "23077:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16498, - "name": "rebaseWindowOffsetSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16474, - "src": "23101:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23077:46:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16500, - "nodeType": "ExpressionStatement", - "src": "23077:46:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16501, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15224, - "src": "23133:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16502, - "name": "rebaseWindowLengthSec_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16476, - "src": "23157:22:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23133:46:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16504, - "nodeType": "ExpressionStatement", - "src": "23133:46:20" - } - ] - }, - "documentation": "@notice Sets the parameters which control the timing and frequency of\n rebase operations.\n a) the minimum time period that must elapse between rebase cycles.\n b) the rebase window offset parameter.\n c) the rebase window length parameter.\n@param minRebaseTimeIntervalSec_ More than this much time must pass between rebase\n operations, in seconds.\n@param rebaseWindowOffsetSec_ The number of seconds from the beginning of\nthe rebase interval, where the rebase window begins.\n@param rebaseWindowLengthSec_ The length of the rebase window in seconds.", - "id": 16506, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16479, - "modifierName": { - "argumentTypes": null, - "id": 16478, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "22875:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "22875:7:20" - } - ], - "name": "setRebaseTimingParameters", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16477, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16472, - "name": "minRebaseTimeIntervalSec_", - "nodeType": "VariableDeclaration", - "scope": 16506, - "src": "22735:33:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16471, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22735:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16474, - "name": "rebaseWindowOffsetSec_", - "nodeType": "VariableDeclaration", - "scope": 16506, - "src": "22778:30:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16473, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22778:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16476, - "name": "rebaseWindowLengthSec_", - "nodeType": "VariableDeclaration", - "scope": 16506, - "src": "22818:30:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16475, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22818:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22725:124:20" - }, - "returnParameters": { - "id": 16480, - "nodeType": "ParameterList", - "parameters": [], - "src": "22887:0:20" - }, - "scope": 16828, - "src": "22691:495:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16516, - "nodeType": "Block", - "src": "23398:118:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 16511, - "name": "_inRebaseWindow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16550, - "src": "23471:15:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$__$", - "typeString": "function () view" - } - }, - "id": 16512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23471:17:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16513, - "nodeType": "ExpressionStatement", - "src": "23471:17:20" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 16514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23505:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 16510, - "id": 16515, - "nodeType": "Return", - "src": "23498:11:20" - } - ] - }, - "documentation": "@return If the latest block timestamp is within the rebase time window it, returns true.\n Otherwise, returns false.", - "id": 16517, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "inRebaseWindow", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16507, - "nodeType": "ParameterList", - "parameters": [], - "src": "23368:2:20" - }, - "returnParameters": { - "id": 16510, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16509, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16517, - "src": "23392:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16508, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "23392:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23391:6:20" - }, - "scope": 16828, - "src": "23345:171:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 16549, - "nodeType": "Block", - "src": "23563:334:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16521, - "name": "rebasingActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15228, - "src": "23644:14:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7265626173696e67206e6f7420616374697665", - "id": 16522, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23660:21:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad25834b8f3f88668e564881394410690284dfcb705ccb210611bb91472068eb", - "typeString": "literal_string \"rebasing not active\"" - }, - "value": "rebasing not active" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad25834b8f3f88668e564881394410690284dfcb705ccb210611bb91472068eb", - "typeString": "literal_string \"rebasing not active\"" - } - ], - "id": 16520, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "23636:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23636:46:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16524, - "nodeType": "ExpressionStatement", - "src": "23636:46:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16528, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "23709:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16526, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "23701:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 14968, - "src": "23701:7:20", - "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": 16529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23701:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 16530, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "23738:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23701:58:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "746f6f206561726c79", - "id": 16532, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23761:11:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d87d05e52726880c4bb1003e00ed00463d214b7b936d9983b909b11b18ccd468", - "typeString": "literal_string \"too early\"" - }, - "value": "too early" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d87d05e52726880c4bb1003e00ed00463d214b7b936d9983b909b11b18ccd468", - "typeString": "literal_string \"too early\"" - } - ], - "id": 16525, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "23693:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23693:80:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16534, - "nodeType": "ExpressionStatement", - "src": "23693:80:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16538, - "name": "minRebaseTimeIntervalSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15218, - "src": "23799:24:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16536, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19268, - "src": "23791:3:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mod", - "nodeType": "MemberAccess", - "referencedDeclaration": 14968, - "src": "23791:7:20", - "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": 16539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23791:33:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16542, - "name": "rebaseWindowLengthSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15224, - "src": "23854:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16540, - "name": "rebaseWindowOffsetSec", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15222, - "src": "23828:21:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "23828:25:20", - "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": 16543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23828:48:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 16544, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "23827:50:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23791:86:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "746f6f206c617465", - "id": 16546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23879:10:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d9653d91002129bb8471bce01d6c8bb486aa66e48f407a0dd073e6b452e1b6e5", - "typeString": "literal_string \"too late\"" - }, - "value": "too late" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d9653d91002129bb8471bce01d6c8bb486aa66e48f407a0dd073e6b452e1b6e5", - "typeString": "literal_string \"too late\"" - } - ], - "id": 16535, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "23783:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23783:107:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16548, - "nodeType": "ExpressionStatement", - "src": "23783:107:20" - } - ] - }, - "documentation": null, - "id": 16550, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_inRebaseWindow", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16518, - "nodeType": "ParameterList", - "parameters": [], - "src": "23546:2:20" - }, - "returnParameters": { - "id": 16519, - "nodeType": "ParameterList", - "parameters": [], - "src": "23563:0:20" - }, - "scope": 16828, - "src": "23522:375:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16604, - "nodeType": "Block", - "src": "24085:368:20", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16560, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24124:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16559, - "name": "withinDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16649, - "src": "24099:24:20", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 16561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24099:30:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16567, - "nodeType": "IfStatement", - "src": "24095:78:20", - "trueBody": { - "id": 16566, - "nodeType": "Block", - "src": "24131:42:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24153:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 16563, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24156:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 16564, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24152:10:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_bool_$", - "typeString": "tuple(int_const 0,bool)" - } - }, - "functionReturnParameters": 16558, - "id": 16565, - "nodeType": "Return", - "src": "24145:17:20" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16568, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24245:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 16569, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24252:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24245:17:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 16602, - "nodeType": "Block", - "src": "24358:89:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16597, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24417:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16594, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24405:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16593, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24409:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24405:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16589, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24395:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16587, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24380:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "24380:14:20", - "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": 16590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24380:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "24380:24:20", - "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": 16595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24380:32:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "24380:36:20", - "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": 16598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24380:48:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 16599, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24430:5:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "id": 16600, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24379:57:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 16558, - "id": 16601, - "nodeType": "Return", - "src": "24372:64:20" - } - ] - }, - "id": 16603, - "nodeType": "IfStatement", - "src": "24241:206:20", - "trueBody": { - "id": 16586, - "nodeType": "Block", - "src": "24264:88:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16581, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24323:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16578, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24311:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24315:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24311:6:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16573, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24295:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16571, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16552, - "src": "24286:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "24286:8:20", - "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": 16574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24286:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "24286:24:20", - "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": 16579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24286:32:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "24286:36:20", - "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": 16582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24286:48:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 16583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24336:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "id": 16584, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24285:56:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,bool)" - } - }, - "functionReturnParameters": 16558, - "id": 16585, - "nodeType": "Return", - "src": "24278:63:20" - } - ] - } - } - ] - }, - "documentation": "@return Computes in % how far off market is from peg", - "id": 16605, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "computeOffPegPerc", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16552, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 16605, - "src": "24006:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16551, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24006:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24005:14:20" - }, - "returnParameters": { - "id": 16558, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16555, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16605, - "src": "24066:7:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16554, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24066:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16557, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16605, - "src": "24075:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16556, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "24075:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24065:15:20" - }, - "scope": 16828, - "src": "23979:474:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 16648, - "nodeType": "Block", - "src": "24797:294:20", - "statements": [ - { - "assignments": [ - 16613 - ], - "declarations": [ - { - "constant": false, - "id": 16613, - "name": "absoluteDeviationThreshold", - "nodeType": "VariableDeclaration", - "scope": 16648, - "src": "24807:34:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16612, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24807:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16623, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 16621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 16619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24896:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 16620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24902:2:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "24896:8:20", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16616, - "name": "deviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15216, - "src": "24859:18:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16614, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24844:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "24844:14:20", - "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": 16617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24844:34:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "24844:51:20", - "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": 16622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24844:61:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "24807:98:20" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16624, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "24924:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 16625, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24932:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24924:18:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16629, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "24955:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16627, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "24946:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "24946:8:20", - "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": 16630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24946:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16631, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16613, - "src": "24969:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "24946:49:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24924:71:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 16634, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "24923:73:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 16644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16635, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "25013:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16636, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "25020:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25013:17:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16640, - "name": "rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16607, - "src": "25049:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 16638, - "name": "targetRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15212, - "src": "25034:10:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "25034:14:20", - "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": 16641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25034:20:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16642, - "name": "absoluteDeviationThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16613, - "src": "25057:26:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25034:49:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "25013:70:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 16645, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "25012:72:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "24923:161:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 16611, - "id": 16647, - "nodeType": "Return", - "src": "24916:168:20" - } - ] - }, - "documentation": "@param rate The current exchange rate, an 18 decimal fixed point number.\n@return If the rate is within the deviation threshold from the target rate, returns true.\n Otherwise, returns false.", - "id": 16649, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withinDeviationThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16608, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16607, - "name": "rate", - "nodeType": "VariableDeclaration", - "scope": 16649, - "src": "24727:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16606, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24727:7:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24726:14:20" - }, - "returnParameters": { - "id": 16611, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16610, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16649, - "src": "24787:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16609, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "24787:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24786:6:20" - }, - "scope": 16828, - "src": "24693:398:20", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 16682, - "nodeType": "Block", - "src": "25376:296:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 16680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16660, - "name": "pair", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16658, - "src": "25386:4:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "ff", - "id": 16666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25450:7:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - }, - { - "argumentTypes": null, - "id": 16667, - "name": "factory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16651, - "src": "25475:7:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16671, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16653, - "src": "25527:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16672, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16655, - "src": "25535:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 16669, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "25510:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25510:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25510:32:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 16668, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "25500:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 16674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25500:43:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "hexValue": "96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", - "id": 16675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25561:69:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - "value": null - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_stringliteral_66d76495d34dc7613deaf40ec013ef0fbd2f03604ae509b7212971c455edfb7a", - "typeString": "literal_string (contains invalid UTF-8 sequence at position 0)" - } - ], - "expression": { - "argumentTypes": null, - "id": 16664, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19253, - "src": "25416:3:20", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 16665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25416:16:20", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 16676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25416:246:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 16663, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19260, - "src": "25406:9:20", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 16677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25406:257:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 16662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25401:4:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 16678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25401:263:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 16661, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25393:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25393:272:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "25386:279:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16681, - "nodeType": "ExpressionStatement", - "src": "25386:279:20" - } - ] - }, - "documentation": null, - "id": 16683, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "pairFor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16656, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16651, - "name": "factory", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25241:15:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16650, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25241:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16653, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25266:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16652, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25266:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16655, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25290:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16654, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25290:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25231:79:20" - }, - "returnParameters": { - "id": 16659, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16658, - "name": "pair", - "nodeType": "VariableDeclaration", - "scope": 16683, - "src": "25358:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16657, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25358:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25357:14:20" - }, - "scope": 16828, - "src": "25215:457:20", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16725, - "nodeType": "Block", - "src": "25935:238:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16695, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "25953:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 16696, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "25963:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "25953:16:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553", - "id": 16698, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25971:39:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - }, - "value": "UniswapV2Library: IDENTICAL_ADDRESSES" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4ddc3ca35a8b7ccaa016ab70252fdf3396ded4f4fd8375f95b1e9d99790fcdca", - "typeString": "literal_string \"UniswapV2Library: IDENTICAL_ADDRESSES\"" - } - ], - "id": 16694, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "25945:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25945:66:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16700, - "nodeType": "ExpressionStatement", - "src": "25945:66:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16714, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 16701, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16690, - "src": "26022:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16702, - "name": "token1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16692, - "src": "26030:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 16703, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "26021:16:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16704, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "26040:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 16705, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "26049:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "26040:15:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 16710, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "26078:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16711, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "26086:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 16712, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "26077:16:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "id": 16713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "26040:53:20", - "trueExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 16707, - "name": "tokenA", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16685, - "src": "26059:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16708, - "name": "tokenB", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16687, - "src": "26067:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 16709, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "26058:16:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_address_$", - "typeString": "tuple(address,address)" - } - }, - "src": "26021:72:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16715, - "nodeType": "ExpressionStatement", - "src": "26021:72:20" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16717, - "name": "token0", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16690, - "src": "26111:6:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16719, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26129:1:20", - "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": 16718, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "26121:7:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16720, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26121:10:20", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "26111:20:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e697377617056324c6962726172793a205a45524f5f41444452455353", - "id": 16722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26133:32:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - }, - "value": "UniswapV2Library: ZERO_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_db0dda5a73ac3122e17df097fa2cbce2c5161b45d20c7d6cf363d3b147392c83", - "typeString": "literal_string \"UniswapV2Library: ZERO_ADDRESS\"" - } - ], - "id": 16716, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26103:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26103:63:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16724, - "nodeType": "ExpressionStatement", - "src": "26103:63:20" - } - ] - }, - "documentation": null, - "id": 16726, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sortTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16685, - "name": "tokenA", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25807:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16684, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25807:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16687, - "name": "tokenB", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25831:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25831:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25797:54:20" - }, - "returnParameters": { - "id": 16693, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16690, - "name": "token0", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25899:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16689, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25899:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16692, - "name": "token1", - "nodeType": "VariableDeclaration", - "scope": 16726, - "src": "25915:14:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16691, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "25915:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25898:32:20" - }, - "scope": 16828, - "src": "25778:395:20", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 16745, - "nodeType": "Block", - "src": "26520:148:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 16739, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26583:4:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 16740, - "name": "destination", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16728, - "src": "26614:11:20", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16741, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16730, - "src": "26645:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - ], - "id": 16738, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15140, - "src": "26548:11:20", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Transaction_$15140_storage_ptr_$", - "typeString": "type(struct YAMRebaser.Transaction storage pointer)" - } - }, - "id": 16742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "enabled", - "destination", - "data" - ], - "nodeType": "FunctionCall", - "src": "26548:112:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_memory", - "typeString": "struct YAMRebaser.Transaction memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Transaction_$15140_memory", - "typeString": "struct YAMRebaser.Transaction memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 16735, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "26530:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26530:17:20", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Transaction_$15140_storage_$returns$_t_uint256_$", - "typeString": "function (struct YAMRebaser.Transaction storage ref) returns (uint256)" - } - }, - "id": 16743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26530:131:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16744, - "nodeType": "ExpressionStatement", - "src": "26530:131:20" - } - ] - }, - "documentation": "@notice Adds a transaction that gets called for a downstream receiver of rebases\n@param destination Address of contract destination\n@param data Transaction data payload", - "id": 16746, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16733, - "modifierName": { - "argumentTypes": null, - "id": 16732, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "26508:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26508:7:20" - } - ], - "name": "addTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16731, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16728, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 16746, - "src": "26441:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16727, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "26441:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16730, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 16746, - "src": "26462:19:20", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 16729, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "26462:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26440:42:20" - }, - "returnParameters": { - "id": 16734, - "nodeType": "ParameterList", - "parameters": [], - "src": "26520:0:20" - }, - "scope": 16828, - "src": "26417:251:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16785, - "nodeType": "Block", - "src": "26891:239:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16754, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16748, - "src": "26909:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16755, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "26917:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16756, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26917:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26909:27:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206f7574206f6620626f756e6473", - "id": 16758, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26938:21:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - }, - "value": "index out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eed516072b2550c72e3348ead859d99a87d4879a686eafecb170998606c300b2", - "typeString": "literal_string \"index out of bounds\"" - } - ], - "id": 16753, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "26901:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26901:59:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16760, - "nodeType": "ExpressionStatement", - "src": "26901:59:20" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16761, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16748, - "src": "26975:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16762, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "26983:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16763, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26983:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16764, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27005:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "26983:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26975:31:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 16779, - "nodeType": "IfStatement", - "src": "26971:121:20", - "trueBody": { - "id": 16778, - "nodeType": "Block", - "src": "27008:84:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 16776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16767, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27022:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16769, - "indexExpression": { - "argumentTypes": null, - "id": 16768, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16748, - "src": "27035:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "27022:19:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16770, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27044:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16775, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16771, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27057:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16772, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27057:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27079:1:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "27057:23:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "27044:37:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "src": "27022:59:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "id": 16777, - "nodeType": "ExpressionStatement", - "src": "27022:59:20" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 16783, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "27102:21:20", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16780, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27102:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16782, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27102:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 16784, - "nodeType": "ExpressionStatement", - "src": "27102:21:20" - } - ] - }, - "documentation": "@param index Index of transaction to remove.\n Transaction ordering may have changed since adding.", - "id": 16786, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16751, - "modifierName": { - "argumentTypes": null, - "id": 16750, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "26879:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "26879:7:20" - } - ], - "name": "removeTransaction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16748, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 16786, - "src": "26842:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16747, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "26842:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "26841:12:20" - }, - "returnParameters": { - "id": 16752, - "nodeType": "ParameterList", - "parameters": [], - "src": "26891:0:20" - }, - "scope": 16828, - "src": "26815:315:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16810, - "nodeType": "Block", - "src": "27400:144:20", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 16796, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16788, - "src": "27418:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16797, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27426:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16798, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27426:19:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27418:27:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "696e646578206d75737420626520696e2072616e6765206f662073746f726564207478206c697374", - "id": 16800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27447:42:20", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - }, - "value": "index must be in range of stored tx list" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3ddda1af604b97706fded227591b4aa594200182b7df450e3efcb0bd23ee4028", - "typeString": "literal_string \"index must be in range of stored tx list\"" - } - ], - "id": 16795, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "27410:7:20", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27410:80:20", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16802, - "nodeType": "ExpressionStatement", - "src": "27410:80:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 16803, - "name": "transactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15204, - "src": "27500:12:20", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Transaction_$15140_storage_$dyn_storage", - "typeString": "struct YAMRebaser.Transaction storage ref[] storage ref" - } - }, - "id": 16805, - "indexExpression": { - "argumentTypes": null, - "id": 16804, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16788, - "src": "27513:5:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "27500:19:20", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Transaction_$15140_storage", - "typeString": "struct YAMRebaser.Transaction storage ref" - } - }, - "id": 16806, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "enabled", - "nodeType": "MemberAccess", - "referencedDeclaration": 15135, - "src": "27500:27:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16807, - "name": "enabled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16790, - "src": "27530:7:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "27500:37:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16809, - "nodeType": "ExpressionStatement", - "src": "27500:37:20" - } - ] - }, - "documentation": "@param index Index of transaction. Transaction ordering may have changed since adding.\n@param enabled True for enabled, false for disabled.", - "id": 16811, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16793, - "modifierName": { - "argumentTypes": null, - "id": 16792, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15133, - "src": "27388:7:20", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "27388:7:20" - } - ], - "name": "setTransactionEnabled", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16791, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16788, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 16811, - "src": "27337:10:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16787, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "27337:4:20", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16790, - "name": "enabled", - "nodeType": "VariableDeclaration", - "scope": 16811, - "src": "27349:12:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16789, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27349:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27336:26:20" - }, - "returnParameters": { - "id": 16794, - "nodeType": "ParameterList", - "parameters": [], - "src": "27400:0:20" - }, - "scope": 16828, - "src": "27306:238:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16826, - "nodeType": "Block", - "src": "27885:1112:20", - "statements": [ - { - "assignments": [ - 16821 - ], - "declarations": [ - { - "constant": false, - "id": 16821, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 16826, - "src": "27895:11:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16820, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27895:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16822, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "27895:11:20" - }, - { - "externalReferences": [ - { - "result": { - "declaration": 16821, - "isOffset": false, - "isSlot": false, - "src": "28273:6:20", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 16815, - "isOffset": false, - "isSlot": false, - "src": "28250:4:20", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 16815, - "isOffset": false, - "isSlot": false, - "src": "28764:4:20", - "valueSize": 1 - } - }, - { - "destination": { - "declaration": 16813, - "isOffset": false, - "isSlot": false, - "src": "28656:11:20", - "valueSize": 1 - } - } - ], - "id": 16823, - "nodeType": "InlineAssembly", - "operations": "{\n let outputAddress := mload(0x40)\n let dataAddress := add(data, 32)\n result := call(sub(gas(), 34710), destination, 0, dataAddress, mload(data), outputAddress, 0)\n}", - "src": "27916:1052:20" - }, - { - "expression": { - "argumentTypes": null, - "id": 16824, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16821, - "src": "28984:6:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 16819, - "id": 16825, - "nodeType": "Return", - "src": "28977:13:20" - } - ] - }, - "documentation": "@dev wrapper to call the encoded transactions on downstream consumers.\n@param destination Address of destination contract.\n@param data The encoded data payload.\n@return True on success", - "id": 16827, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "externalCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16813, - "name": "destination", - "nodeType": "VariableDeclaration", - "scope": 16827, - "src": "27801:19:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16812, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "27801:7:20", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16815, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 16827, - "src": "27822:17:20", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 16814, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "27822:5:20", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27800:40:20" - }, - "returnParameters": { - "id": 16819, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16818, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16827, - "src": "27875:4:20", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 16817, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "27875:4:20", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "27874:6:20" - }, - "scope": 16828, - "src": "27779:1218:20", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 16829, - "src": "243:28756:20" - } - ], - "src": "0:29000:20" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x2a5cda4d16fba415b52d90b59ee30d4cb16494da9fd1ee51c4d5bac4a1f75bbe": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldDeviationThreshold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newDeviationThreshold", - "type": "uint256" - } - ], - "name": "NewDeviationThreshold", - "type": "event", - "signature": "0x2a5cda4d16fba415b52d90b59ee30d4cb16494da9fd1ee51c4d5bac4a1f75bbe" - }, - "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event", - "signature": "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523" - }, - "0xe21b25c4eda0340cd924f3247795d0acde6c304b68ae77657bb2d4e840198bf8": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldSlippageFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newSlippageFactor", - "type": "uint256" - } - ], - "name": "NewMaxSlippageFactor", - "type": "event", - "signature": "0xe21b25c4eda0340cd924f3247795d0acde6c304b68ae77657bb2d4e840198bf8" - }, - "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event", - "signature": "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e" - }, - "0x59b3ffce759ec92c629beee27554d8fbc2ca1a05020fa0cf500c890c172094be": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldRebaseMintPerc", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newRebaseMintPerc", - "type": "uint256" - } - ], - "name": "NewRebaseMintPercent", - "type": "event", - "signature": "0x59b3ffce759ec92c629beee27554d8fbc2ca1a05020fa0cf500c890c172094be" - }, - "0xce840d2205f08f33375689943da5da9fdfde146fcbb5553b17910a60c8284a20": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldReserveContract", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newReserveContract", - "type": "address" - } - ], - "name": "NewReserveContract", - "type": "event", - "signature": "0xce840d2205f08f33375689943da5da9fdfde146fcbb5553b17910a60c8284a20" - }, - "0x8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c263": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "TransactionFailed", - "type": "event", - "signature": "0x8091ecaaa54ebb82e02d36c2c336528e0fcb9b3430fc1291ac88295032b9c263" - }, - "0xb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reservesAdded", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsSold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsFromReserves", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "yamsToReserves", - "type": "uint256" - } - ], - "name": "TreasuryIncreased", - "type": "event", - "signature": "0xb335015c214ae37ed112cc5eb042235c0ea40a7617987e1bd847839143872350" - } - }, - "links": {}, - "address": "0x26d376fbD67A36122f6c7F20F3A55C7F697aAd4a", - "transactionHash": "0xae374a3a3818c26ebde1d1dac03dc155b80179520e4f4fba1e2904fb1632544a" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.451Z", - "devdoc": { - "methods": { - "_setPendingGov(address)": { - "params": { - "pendingGov_": "The address of the rebaser contract to use for authentication." - } - }, - "activate_rebasing()": { - "details": "One way function, cannot be undone, callable by anyone" - }, - "addTransaction(address,bytes)": { - "params": { - "data": "Transaction data payload", - "destination": "Address of contract destination" - } - }, - "inRebaseWindow()": { - "return": "If the latest block timestamp is within the rebase time window it, returns true. Otherwise, returns false." - }, - "rebase()": { - "details": "The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is 1e18" - }, - "removeTransaction(uint256)": { - "params": { - "index": "Index of transaction to remove. Transaction ordering may have changed since adding." - } - }, - "setDeviationThreshold(uint256)": { - "params": { - "deviationThreshold_": "The new exchange rate threshold fraction." - } - }, - "setRebaseLag(uint256)": { - "params": { - "rebaseLag_": "The new rebase lag parameter." - } - }, - "setRebaseTimingParameters(uint256,uint256,uint256)": { - "params": { - "minRebaseTimeIntervalSec_": "More than this much time must pass between rebase operations, in seconds.", - "rebaseWindowLengthSec_": "The length of the rebase window in seconds.", - "rebaseWindowOffsetSec_": "The number of seconds from the beginning of the rebase interval, where the rebase window begins." - } - }, - "setTargetRate(uint256)": { - "params": { - "targetRate_": "The new target rate parameter." - } - }, - "setTransactionEnabled(uint256,bool)": { - "params": { - "enabled": "True for enabled, false for disabled.", - "index": "Index of transaction. Transaction ordering may have changed since adding." - } - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "lets msg.sender accept governance " - }, - "_setPendingGov(address)": { - "notice": "sets the pendingGov" - }, - "activate_rebasing()": { - "notice": "Activates rebasing" - }, - "addTransaction(address,bytes)": { - "notice": "Adds a transaction that gets called for a downstream receiver of rebases" - }, - "init_twap()": { - "notice": "Initializes TWAP start point, starts countdown to first rebase " - }, - "rebase()": { - "notice": "Initiates a new rebase operation, provided the minimum time period has elapsed." - }, - "setDeviationThreshold(uint256)": { - "notice": "Sets the deviation threshold fraction. If the exchange rate given by the market oracle is within this fractional distance from the targetRate, then no supply modifications are made." - }, - "setMaxSlippageFactor(uint256)": { - "notice": "Updates slippage factor " - }, - "setRebaseLag(uint256)": { - "notice": "Sets the rebase lag parameter. It is used to dampen the applied supply adjustment by 1 / rebaseLag If the rebase lag R, equals 1, the smallest value for R, then the full supply correction is applied on each rebase cycle. If it is greater than 1, then a correction of 1/R of is applied on each rebase." - }, - "setRebaseMintPerc(uint256)": { - "notice": "Updates rebase mint percentage " - }, - "setRebaseTimingParameters(uint256,uint256,uint256)": { - "notice": "Sets the parameters which control the timing and frequency of rebase operations. a) the minimum time period that must elapse between rebase cycles. b) the rebase window offset parameter. c) the rebase window length parameter." - }, - "setReserveContract(address)": { - "notice": "Updates reserve contract " - }, - "setTargetRate(uint256)": { - "notice": "Sets the targetRate parameter." - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMReserve.json b/build/contracts/YAMReserve.json deleted file mode 100644 index 62d3bb9..0000000 --- a/build/contracts/YAMReserve.json +++ /dev/null @@ -1,6089 +0,0 @@ -{ - "contractName": "YAMReserve", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "reserveToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "yamAddress_", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newReserve", - "type": "address" - }, - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "migrateReserves", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"reserveToken_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"yamAddress_\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newReserve\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"migrateReserves\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_setPendingGov(address)\":{\"params\":{\"pendingGov_\":\"The address of the rebaser contract to use for authentication.\"}}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"lets msg.sender accept governance\"},\"_setPendingGov(address)\":{\"notice\":\"sets the pendingGov\"},\"migrateReserves(address,address[])\":{\"notice\":\"Moves all tokens to a new reserve contract\"},\"reserves()\":{\"notice\":\"Gets the current amount of reserves token held by this contract\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol\":\"YAMReserve\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Address.sol\":{\"keccak256\":\"0xfcf985fe775d3891eb6f1df2b0926b13392f7411550fbddbb2a51e2dfb4c328f\",\"urls\":[\"bzz-raw://557db9c06dce45db040c1a8a87cc2100cbaa86b3fd7cbdf49acf983e110673df\",\"dweb:/ipfs/QmVRxJhBro2YT42FkofepMfseF4rxbDFNXySA2doFSf2Lq\"]},\"/Users/brockelmore/YAM/contracts/lib/IERC20.sol\":{\"keccak256\":\"0xb654abe85060b241b440e22ead01dabb724dda69034d49b483e5e3e55ee64400\",\"urls\":[\"bzz-raw://53f67e469e2c4dfc10411d72f465a3c5b85939f1df4b2b26f12deb729f260b04\",\"dweb:/ipfs/QmSNUGpXPcmWNDczauAmUgZsypdcAB2pZNi3B2RGpYVyp2\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol\":{\"keccak256\":\"0x00c7887d6e2af7d5971473efbd93d312374d6e8478a6f435d7ec3b62fe62a523\",\"urls\":[\"bzz-raw://787539dc1ebb71a219dee830f1d71188d0b13c2d5f7e7bfd08a3cafa8ec9333c\",\"dweb:/ipfs/QmfFwH2Wt17vqVaeoCMpdXbRUFa3e2Kbm1i6HTybGFXv8h\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol\":{\"keccak256\":\"0x79e62c459b7c7d92254d072e4f5b6772a844027f9b620e9ec10c4ff459d4e25b\",\"urls\":[\"bzz-raw://b530ce048f69334eeba589d34ffaf0cfa8bf94b6f792ab83e868411815567f28\",\"dweb:/ipfs/QmURAPrU1BjpdhWUxZSX6rguar3VnTyt4RMFecTnVowJGs\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x1bd8b4cca7e27e739d0e8d0f8b6fa3568db8c496b65e5d324fa0dacdc2384fce\",\"urls\":[\"bzz-raw://45b14e97497ee1d3a0863bfb667fbc683039f4363c6e8295b9971fbbcacd8ca5\",\"dweb:/ipfs/QmQccvMGmZrtkk4s2VH2ZWBLKR54eH9Q6Z7DEEw1iVpwYG\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x89371a921d6f19be9f74ea6a6b7f21f7255577ec606b5c98b806b50d5a46791f\",\"urls\":[\"bzz-raw://cf00aa028948b0b1745ff4b874fa686b4f3cf0a2a88ee6ef7dc271d74d4f8c5b\",\"dweb:/ipfs/QmSM13qFuv6KCzveJonR4vwQLvMSXSZyRsPJFRphTTn8mA\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610d0b380380610d0b8339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b039384166001600160a01b03199182161790915560048054939092169281169290921790556001805490911633179055610c85806100866000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806373f03dff11610076578063d72cdafc1161005b578063d72cdafc1461021b578063f4325d6714610223578063fa8f34551461022b576100be565b806373f03dff146101ce57806375172a8b14610201576100be565b806312d43a51116100a757806312d43a51146101b657806325240810146101be5780634bda2e20146101c6576100be565b8063078e9d53146100c357806311fd8a8314610185575b600080fd5b610183600480360360408110156100d957600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561011157600080fd5b82018360208201111561012357600080fd5b8035906020019184602083028401116401000000008311171561014557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061025e945050505050565b005b61018d61036d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61018d610389565b61018d6103a5565b6101836103c1565b610183600480360360208110156101e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104da565b610209610586565b60408051918252519081900360200190f35b61018d610629565b61018d610645565b6101836004803603602081101561024157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610661565b60015473ffffffffffffffffffffffffffffffffffffffff16331461028257600080fd5b60005b815181101561036857600082828151811061029c57fe5b6020026020010151905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561032557600080fd5b505afa158015610339573d6000803e3d6000fd5b505050506040513d602081101561034f57600080fd5b5051905061035e82868361089f565b5050600101610285565b505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff16331461044757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff838116919091179586905591169091556040805192821680845293909116602083015280517f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d55239281900390910190a150565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104fe57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156105f857600080fd5b505afa15801561060c573d6000803e3d6000fd5b505050506040513d602081101561062257600080fd5b5051905090565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461068557600080fd5b60035460048054604080517fa457c2d700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9485169381018490527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024820152905192939091169163a457c2d7916044808201926020929091908290030181600087803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b5050600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691821790925560048054604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152928301939093527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248301529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561081d57600080fd5b505af1158015610831573d6000803e3d6000fd5b505050506040513d602081101561084757600080fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff80841682528416602082015281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526103689084906060610989826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166109ff9092919063ffffffff16565b805190915015610368578080602001905160208110156109a857600080fd5b5051610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610c27602a913960400191505060405180910390fd5b6060610a0e8484600085610a16565b949350505050565b6060610a2185610c20565b610a8c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310610af657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610ab9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610b58576040519150601f19603f3d011682016040523d82523d6000602084013e610b5d565b606091505b50915091508115610b71579150610a0e9050565b805115610b815780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610be5578181015183820152602001610bcd565b50505050905090810190601f168015610c125780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820607346babcf9564b75e47e0743fcbc08f2fc4b41e0c4e68aec638aff71175b2364736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c806373f03dff11610076578063d72cdafc1161005b578063d72cdafc1461021b578063f4325d6714610223578063fa8f34551461022b576100be565b806373f03dff146101ce57806375172a8b14610201576100be565b806312d43a51116100a757806312d43a51146101b657806325240810146101be5780634bda2e20146101c6576100be565b8063078e9d53146100c357806311fd8a8314610185575b600080fd5b610183600480360360408110156100d957600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561011157600080fd5b82018360208201111561012357600080fd5b8035906020019184602083028401116401000000008311171561014557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061025e945050505050565b005b61018d61036d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61018d610389565b61018d6103a5565b6101836103c1565b610183600480360360208110156101e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104da565b610209610586565b60408051918252519081900360200190f35b61018d610629565b61018d610645565b6101836004803603602081101561024157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610661565b60015473ffffffffffffffffffffffffffffffffffffffff16331461028257600080fd5b60005b815181101561036857600082828151811061029c57fe5b6020026020010151905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561032557600080fd5b505afa158015610339573d6000803e3d6000fd5b505050506040513d602081101561034f57600080fd5b5051905061035e82868361089f565b5050600101610285565b505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff16331461044757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff838116919091179586905591169091556040805192821680845293909116602083015280517f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d55239281900390910190a150565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104fe57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156105f857600080fd5b505afa15801561060c573d6000803e3d6000fd5b505050506040513d602081101561062257600080fd5b5051905090565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461068557600080fd5b60035460048054604080517fa457c2d700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9485169381018490527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024820152905192939091169163a457c2d7916044808201926020929091908290030181600087803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b5050600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691821790925560048054604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152928301939093527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248301529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561081d57600080fd5b505af1158015610831573d6000803e3d6000fd5b505050506040513d602081101561084757600080fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff80841682528416602082015281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526103689084906060610989826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166109ff9092919063ffffffff16565b805190915015610368578080602001905160208110156109a857600080fd5b5051610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610c27602a913960400191505060405180910390fd5b6060610a0e8484600085610a16565b949350505050565b6060610a2185610c20565b610a8c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310610af657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610ab9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610b58576040519150601f19603f3d011682016040523d82523d6000602084013e610b5d565b606091505b50915091508115610b71579150610a0e9050565b805115610b815780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610be5578181015183820152602001610bcd565b50505050905090810190601f168015610c125780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820607346babcf9564b75e47e0743fcbc08f2fc4b41e0c4e68aec638aff71175b2364736f6c63430005110032", - "sourceMap": "126:2603:15:-;;;849:202;8:9:-1;5:2;;;30:1;27;20:12;5:2;849:202:15;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;849:202:15;;;;;;;956:12;:28;;-1:-1:-1;;;;;956:28:15;;;-1:-1:-1;;;;;;956:28:15;;;;;;;994:10;:24;;;;;;;;;;;;;;;956:28;1028:16;;;;;1034:10;1028:16;;;126:2603;;;;;;", - "deployedSourceMap": "126:2603:15:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;126:2603:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2131:363;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2131:363:15;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;2131:363:15;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2131:363:15;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;2131:363:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2131:363:15;;-1:-1:-1;2131:363:15;;-1:-1:-1;;;;;2131:363:15:i;:::-;;290:22;;;:::i;:::-;;;;;;;;;;;;;;;;;;;233:18;;;:::i;258:25::-;;;:::i;1838:228::-;;;:::i;1544:223::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1544:223:15;;;;:::i;2580:147::-;;;:::i;:::-;;;;;;;;;;;;;;;;319:25;;;:::i;199:27::-;;;:::i;1057:348::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1057:348:15;;;;:::i;2131:363::-;821:3;;;;807:10;:17;799:26;;;;;;2273:9;2268:220;2292:6;:13;2288:1;:17;2268:220;;;2326:12;2349:6;2356:1;2349:9;;;;;;;;;;;;;;2326:33;;2373:11;2387:5;:15;;;2411:4;2387:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2387:30:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2387:30:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2387:30:15;;-1:-1:-1;2431:46:15;2454:5;2461:10;2387:30;2431:22;:46::i;:::-;-1:-1:-1;;2307:3:15;;2268:220;;;;2131:363;;:::o;290:22::-;;;;;;:::o;233:18::-;;;;;;:::o;258:25::-;;;;;;:::o;1838:228::-;1913:10;;;;1899;:24;1891:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1963:3;;;1982:10;;;1976:16;;;;1963:3;1982:10;;;1976:16;;;;;;;;2002:23;;;;;2040:19;;;1963:3;;;2040:19;;;2055:3;;;;2040:19;;;;;;;;;;;;;;;;1838:228;:::o;1544:223::-;821:3;;;;807:10;:17;799:26;;;;;;1660:10;;;;1680:24;;;;;;;;;;;1719:41;;;1660:10;;;;1719:41;;;;;;;;;;;;;;;;;;;;;;;835:1;1544:223;:::o;2580:147::-;2645:7;2682:12;;2675:45;;;;;;2714:4;2675:45;;;;;;2682:12;;;;;2675:30;;:45;;;;;;;;;;;;;;;2682:12;2675:45;;;5:2:-1;;;;30:1;27;20:12;5:2;2675:45:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2675:45:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2675:45:15;;-1:-1:-1;2580:147:15;:::o;319:25::-;;;;;;:::o;199:27::-;;;;;;:::o;1057:348::-;821:3;;;;807:10;:17;799:26;;;;;;1164:7;;1199:10;;;1181:72;;;;;;1164:7;;;;1181:72;;;;;;1249:2;1181:72;;;;;;1164:7;;1199:10;;;;1181:47;;:72;;;;;;;;;;;;;;;-1:-1:-1;1199:10:15;1181:72;;;5:2:-1;;;;30:1;27;20:12;5:2;1181:72:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1181:72:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;1263:7:15;:18;;;;;;;;;;;;;;1309:10;;;1291:60;;;;;;;;;;;;;1347:2;1291:60;;;;;;1309:10;;;;;1291:37;;:60;;;;;1181:72;;1291:60;;;;;;;-1:-1:-1;1309:10:15;1291:60;;;5:2:-1;;;;30:1;27;20:12;5:2;1291:60:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1291:60:15;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;1366:32:15;;;;;;;;;;;1291:60;1366:32;;;;;;;;;;;;;;;;835:1;1057:348;:::o;678:175:11:-;787:58;;;810:14;787:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;787:58:11;;;;;;;;25:18:-1;;61:17;;787:58:11;182:15:-1;810:23:11;179:29:-1;160:49;;760:86:11;;780:5;;3360:23;3386:69;3414:4;3386:69;;;;;;;;;;;;;;;;;3394:5;3386:27;;;;:69;;;;;:::i;:::-;3469:17;;3360:95;;-1:-1:-1;3469:21:11;3465:221;;3609:10;3598:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3598:30:11;3590:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3571:194:6;3674:12;3705:53;3728:6;3736:4;3742:1;3745:12;3705:22;:53::i;:::-;3698:60;3571:194;-1:-1:-1;;;;3571:194:6:o;4918:955::-;5048:12;5080:18;5091:6;5080:10;:18::i;:::-;5072:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5203:12;5217:23;5244:6;:11;;5262:8;5272:4;5244:33;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;5244:33:6;;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;5202:75:6;;;;5291:7;5287:580;;;5321:10;-1:-1:-1;5314:17:6;;-1:-1:-1;5314:17:6;5287:580;5432:17;;:21;5428:429;;5690:10;5684:17;5750:15;5737:10;5733:2;5729:19;5722:44;5639:145;5829:12;5822:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5822:20:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;719:413;1079:20;1117:8;;;719:413::o", - "source": "pragma solidity 0.5.17;\n\nimport \"../lib/IERC20.sol\";\nimport \"../lib/SafeERC20.sol\";\nimport \"../token/YAMTokenInterface.sol\";\n\ncontract YAMReserve {\n\n // Token that serves as a reserve for YAM\n address public reserveToken;\n\n address public gov;\n\n address public pendingGov;\n\n address public rebaser;\n\n address public yamAddress;\n\n /*** Gov Events ***/\n\n /**\n * @notice Event emitted when pendingGov is changed\n */\n event NewPendingGov(address oldPendingGov, address newPendingGov);\n\n /**\n * @notice Event emitted when gov is changed\n */\n event NewGov(address oldGov, address newGov);\n\n /**\n * @notice Event emitted when rebaser is changed\n */\n event NewRebaser(address oldRebaser, address newRebaser);\n\n\n modifier onlyGov() {\n require(msg.sender == gov);\n _;\n }\n\n constructor(\n address reserveToken_,\n address yamAddress_\n )\n public\n {\n reserveToken = reserveToken_;\n yamAddress = yamAddress_;\n gov = msg.sender;\n }\n\n function _setRebaser(address rebaser_)\n external\n onlyGov\n {\n address oldRebaser = rebaser;\n YAMTokenInterface(yamAddress).decreaseAllowance(oldRebaser, uint256(-1));\n rebaser = rebaser_;\n YAMTokenInterface(yamAddress).approve(rebaser_, uint256(-1));\n emit NewRebaser(oldRebaser, rebaser_);\n }\n\n /** @notice sets the pendingGov\n * @param pendingGov_ The address of the rebaser contract to use for authentication.\n */\n function _setPendingGov(address pendingGov_)\n external\n onlyGov\n {\n address oldPendingGov = pendingGov;\n pendingGov = pendingGov_;\n emit NewPendingGov(oldPendingGov, pendingGov_);\n }\n\n /**\n * @notice lets msg.sender accept governance\n */\n function _acceptGov()\n external\n {\n require(msg.sender == pendingGov, \"!pending\");\n address oldGov = gov;\n gov = pendingGov;\n pendingGov = address(0);\n emit NewGov(oldGov, gov);\n }\n\n /// @notice Moves all tokens to a new reserve contract\n function migrateReserves(\n address newReserve,\n address[] memory tokens\n )\n public\n onlyGov\n {\n for (uint256 i = 0; i < tokens.length; i++) {\n IERC20 token = IERC20(tokens[i]);\n uint256 bal = token.balanceOf(address(this));\n SafeERC20.safeTransfer(token, newReserve, bal);\n }\n }\n\n /// @notice Gets the current amount of reserves token held by this contract\n function reserves()\n public\n view\n returns (uint256)\n {\n return IERC20(reserveToken).balanceOf(address(this));\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol", - "exportedSymbols": { - "YAMReserve": [ - 8822 - ] - }, - "id": 8823, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 8599, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:15" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "file": "../lib/IERC20.sol", - "id": 8600, - "nodeType": "ImportDirective", - "scope": 8823, - "sourceUnit": 6157, - "src": "25:27:15", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 8601, - "nodeType": "ImportDirective", - "scope": 8823, - "sourceUnit": 6604, - "src": "53:30:15", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 8602, - "nodeType": "ImportDirective", - "scope": 8823, - "sourceUnit": 10714, - "src": "84:40:15", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8822, - "linearizedBaseContracts": [ - 8822 - ], - "name": "YAMReserve", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8604, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "199:27:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "199:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8606, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "233:18:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8605, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "233:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8608, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "258:25:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "258:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8610, - "name": "rebaser", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "290:22:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8609, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "290:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8612, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "319:25:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8611, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "319:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 8618, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 8617, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8614, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 8618, - "src": "469:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8613, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "469:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8616, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 8618, - "src": "492:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8615, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "492:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "468:46:15" - }, - "src": "449:66:15" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 8624, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 8623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8620, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 8624, - "src": "599:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "599:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8622, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 8624, - "src": "615:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "615:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "598:32:15" - }, - "src": "586:45:15" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when rebaser is changed", - "id": 8630, - "name": "NewRebaser", - "nodeType": "EventDefinition", - "parameters": { - "id": 8629, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8626, - "indexed": false, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 8630, - "src": "723:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8625, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "723:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8628, - "indexed": false, - "name": "newRebaser", - "nodeType": "VariableDeclaration", - "scope": 8630, - "src": "743:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8627, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "743:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "722:40:15" - }, - "src": "706:57:15" - }, - { - "body": { - "id": 8640, - "nodeType": "Block", - "src": "789:54:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8633, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "807:3:15", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "807:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8635, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "821:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "807:17:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8632, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "799:7:15", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "799:26:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8638, - "nodeType": "ExpressionStatement", - "src": "799:26:15" - }, - { - "id": 8639, - "nodeType": "PlaceholderStatement", - "src": "835:1:15" - } - ] - }, - "documentation": null, - "id": 8641, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8631, - "nodeType": "ParameterList", - "parameters": [], - "src": "786:2:15" - }, - "src": "770:73:15", - "visibility": "internal" - }, - { - "body": { - "id": 8661, - "nodeType": "Block", - "src": "946:105:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8648, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8604, - "src": "956:12:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8649, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8643, - "src": "971:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "956:28:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8651, - "nodeType": "ExpressionStatement", - "src": "956:28:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8652, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8612, - "src": "994:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8653, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8645, - "src": "1007:11:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "994:24:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8655, - "nodeType": "ExpressionStatement", - "src": "994:24:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8656, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "1028:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8657, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "1034:3:15", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1034:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1028:16:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8660, - "nodeType": "ExpressionStatement", - "src": "1028:16:15" - } - ] - }, - "documentation": null, - "id": 8662, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8646, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8643, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 8662, - "src": "870:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "870:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8645, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 8662, - "src": "901:19:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8644, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "901:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "860:66:15" - }, - "returnParameters": { - "id": 8647, - "nodeType": "ParameterList", - "parameters": [], - "src": "946:0:15" - }, - "scope": 8822, - "src": "849:202:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8704, - "nodeType": "Block", - "src": "1133:272:15", - "statements": [ - { - "assignments": [ - 8670 - ], - "declarations": [ - { - "constant": false, - "id": 8670, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 8704, - "src": "1143:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8669, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1143:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8672, - "initialValue": { - "argumentTypes": null, - "id": 8671, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8610, - "src": "1164:7:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1143:28:15" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8677, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8670, - "src": "1229:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8680, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1249:2:15", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1250:1:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 8678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1241:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 8681, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1241:11:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8674, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8612, - "src": "1199:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8673, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "1181:17:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 8675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1181:29:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 8676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decreaseAllowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 10671, - "src": "1181:47:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1181:72:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8683, - "nodeType": "ExpressionStatement", - "src": "1181:72:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8684, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8610, - "src": "1263:7:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8685, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8664, - "src": "1273:8:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1263:18:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8687, - "nodeType": "ExpressionStatement", - "src": "1263:18:15" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8692, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8664, - "src": "1329:8:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1347:2:15", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1348:1:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 8693, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1339:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 8696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1339:11:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8689, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8612, - "src": "1309:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8688, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "1291:17:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 8690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1291:29:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 8691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 10653, - "src": "1291:37:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1291:60:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8698, - "nodeType": "ExpressionStatement", - "src": "1291:60:15" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8700, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8670, - "src": "1377:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8701, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8664, - "src": "1389:8:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8699, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8630, - "src": "1366:10:15", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1366:32:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8703, - "nodeType": "EmitStatement", - "src": "1361:37:15" - } - ] - }, - "documentation": null, - "id": 8705, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8667, - "modifierName": { - "argumentTypes": null, - "id": 8666, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8641, - "src": "1121:7:15", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1121:7:15" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8665, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8664, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 8705, - "src": "1078:16:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8663, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1078:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1077:18:15" - }, - "returnParameters": { - "id": 8668, - "nodeType": "ParameterList", - "parameters": [], - "src": "1133:0:15" - }, - "scope": 8822, - "src": "1057:348:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8725, - "nodeType": "Block", - "src": "1626:141:15", - "statements": [ - { - "assignments": [ - 8713 - ], - "declarations": [ - { - "constant": false, - "id": 8713, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 8725, - "src": "1636:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8712, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1636:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8715, - "initialValue": { - "argumentTypes": null, - "id": 8714, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1660:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1636:34:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8716, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1680:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8717, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8707, - "src": "1693:11:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1680:24:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8719, - "nodeType": "ExpressionStatement", - "src": "1680:24:15" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8721, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8713, - "src": "1733:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8722, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8707, - "src": "1748:11:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8720, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8618, - "src": "1719:13:15", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1719:41:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8724, - "nodeType": "EmitStatement", - "src": "1714:46:15" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 8726, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8710, - "modifierName": { - "argumentTypes": null, - "id": 8709, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8641, - "src": "1614:7:15", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1614:7:15" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8708, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8707, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 8726, - "src": "1568:19:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8706, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1568:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1567:21:15" - }, - "returnParameters": { - "id": 8711, - "nodeType": "ParameterList", - "parameters": [], - "src": "1626:0:15" - }, - "scope": 8822, - "src": "1544:223:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8756, - "nodeType": "Block", - "src": "1881:185:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8730, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "1899:3:15", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1899:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8732, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1913:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1899:24:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 8734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1925:10:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 8729, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "1891:7:15", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1891:45:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8736, - "nodeType": "ExpressionStatement", - "src": "1891:45:15" - }, - { - "assignments": [ - 8738 - ], - "declarations": [ - { - "constant": false, - "id": 8738, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 8756, - "src": "1946:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8737, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1946:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8740, - "initialValue": { - "argumentTypes": null, - "id": 8739, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "1963:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1946:20:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8741, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "1976:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8742, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1982:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1976:16:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8744, - "nodeType": "ExpressionStatement", - "src": "1976:16:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8745, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "2002:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8747, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2023:1:15", - "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": 8746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2015:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8748, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2015:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2002:23:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8750, - "nodeType": "ExpressionStatement", - "src": "2002:23:15" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8752, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8738, - "src": "2047:6:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8753, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "2055:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8751, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8624, - "src": "2040:6:15", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2040:19:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8755, - "nodeType": "EmitStatement", - "src": "2035:24:15" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance", - "id": 8757, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8727, - "nodeType": "ParameterList", - "parameters": [], - "src": "1857:2:15" - }, - "returnParameters": { - "id": 8728, - "nodeType": "ParameterList", - "parameters": [], - "src": "1881:0:15" - }, - "scope": 8822, - "src": "1838:228:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8805, - "nodeType": "Block", - "src": "2258:236:15", - "statements": [ - { - "body": { - "id": 8803, - "nodeType": "Block", - "src": "2312:176:15", - "statements": [ - { - "assignments": [ - 8779 - ], - "declarations": [ - { - "constant": false, - "id": 8779, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8803, - "src": "2326:12:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8778, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6156, - "src": "2326:6:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8785, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8781, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8762, - "src": "2349:6:15", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 8783, - "indexExpression": { - "argumentTypes": null, - "id": 8782, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "2356:1:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2349:9:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8780, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "2342:6:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2342:17:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2326:33:15" - }, - { - "assignments": [ - 8787 - ], - "declarations": [ - { - "constant": false, - "id": 8787, - "name": "bal", - "nodeType": "VariableDeclaration", - "scope": 8803, - "src": "2373:11:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8786, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2373:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8794, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8791, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10838, - "src": "2411:4:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - ], - "id": 8790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2403:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2403:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8788, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8779, - "src": "2387:5:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "id": 8789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 6101, - "src": "2387:15:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 8793, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2387:30:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2373:44:15" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8798, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8779, - "src": "2454:5:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 8799, - "name": "newReserve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8759, - "src": "2461:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8800, - "name": "bal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8787, - "src": "2473:3:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8795, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6603, - "src": "2431:9:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$6603_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 8797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6431, - "src": "2431:22:15", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6156_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 8801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2431:46:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8802, - "nodeType": "ExpressionStatement", - "src": "2431:46:15" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8771, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "2288:1:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8772, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8762, - "src": "2292:6:15", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 8773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2292:13:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2288:17:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8804, - "initializationExpression": { - "assignments": [ - 8768 - ], - "declarations": [ - { - "constant": false, - "id": 8768, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 8804, - "src": "2273:9:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8767, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2273:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8770, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 8769, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2285:1:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "2273:13:15" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 8776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2307:3:15", - "subExpression": { - "argumentTypes": null, - "id": 8775, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "2307:1:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8777, - "nodeType": "ExpressionStatement", - "src": "2307:3:15" - }, - "nodeType": "ForStatement", - "src": "2268:220:15" - } - ] - }, - "documentation": "@notice Moves all tokens to a new reserve contract", - "id": 8806, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8765, - "modifierName": { - "argumentTypes": null, - "id": 8764, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8641, - "src": "2246:7:15", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2246:7:15" - } - ], - "name": "migrateReserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8759, - "name": "newReserve", - "nodeType": "VariableDeclaration", - "scope": 8806, - "src": "2165:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8758, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2165:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8762, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 8806, - "src": "2193:23:15", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 8760, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2193:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2193:9:15", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2155:67:15" - }, - "returnParameters": { - "id": 8766, - "nodeType": "ParameterList", - "parameters": [], - "src": "2258:0:15" - }, - "scope": 8822, - "src": "2131:363:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8820, - "nodeType": "Block", - "src": "2658:69:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8816, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10838, - "src": "2714:4:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - ], - "id": 8815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2706:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2706:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8812, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8604, - "src": "2682:12:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8811, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "2675:6:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2675:20:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "id": 8814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 6101, - "src": "2675:30:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 8818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2675:45:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8810, - "id": 8819, - "nodeType": "Return", - "src": "2668:52:15" - } - ] - }, - "documentation": "@notice Gets the current amount of reserves token held by this contract", - "id": 8821, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "reserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8807, - "nodeType": "ParameterList", - "parameters": [], - "src": "2597:2:15" - }, - "returnParameters": { - "id": 8810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8809, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8821, - "src": "2645:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8808, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2645:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2644:9:15" - }, - "scope": 8822, - "src": "2580:147:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 8823, - "src": "126:2603:15" - } - ], - "src": "0:2730:15" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol", - "exportedSymbols": { - "YAMReserve": [ - 8822 - ] - }, - "id": 8823, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 8599, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:15" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "file": "../lib/IERC20.sol", - "id": 8600, - "nodeType": "ImportDirective", - "scope": 8823, - "sourceUnit": 6157, - "src": "25:27:15", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 8601, - "nodeType": "ImportDirective", - "scope": 8823, - "sourceUnit": 6604, - "src": "53:30:15", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 8602, - "nodeType": "ImportDirective", - "scope": 8823, - "sourceUnit": 10714, - "src": "84:40:15", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8822, - "linearizedBaseContracts": [ - 8822 - ], - "name": "YAMReserve", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8604, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "199:27:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "199:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8606, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "233:18:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8605, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "233:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8608, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "258:25:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "258:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8610, - "name": "rebaser", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "290:22:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8609, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "290:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8612, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 8822, - "src": "319:25:15", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8611, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "319:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 8618, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 8617, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8614, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 8618, - "src": "469:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8613, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "469:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8616, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 8618, - "src": "492:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8615, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "492:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "468:46:15" - }, - "src": "449:66:15" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 8624, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 8623, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8620, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 8624, - "src": "599:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "599:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8622, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 8624, - "src": "615:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8621, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "615:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "598:32:15" - }, - "src": "586:45:15" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when rebaser is changed", - "id": 8630, - "name": "NewRebaser", - "nodeType": "EventDefinition", - "parameters": { - "id": 8629, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8626, - "indexed": false, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 8630, - "src": "723:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8625, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "723:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8628, - "indexed": false, - "name": "newRebaser", - "nodeType": "VariableDeclaration", - "scope": 8630, - "src": "743:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8627, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "743:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "722:40:15" - }, - "src": "706:57:15" - }, - { - "body": { - "id": 8640, - "nodeType": "Block", - "src": "789:54:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8633, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "807:3:15", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "807:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8635, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "821:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "807:17:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 8632, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10775, - "src": "799:7:15", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 8637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "799:26:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8638, - "nodeType": "ExpressionStatement", - "src": "799:26:15" - }, - { - "id": 8639, - "nodeType": "PlaceholderStatement", - "src": "835:1:15" - } - ] - }, - "documentation": null, - "id": 8641, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8631, - "nodeType": "ParameterList", - "parameters": [], - "src": "786:2:15" - }, - "src": "770:73:15", - "visibility": "internal" - }, - { - "body": { - "id": 8661, - "nodeType": "Block", - "src": "946:105:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8648, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8604, - "src": "956:12:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8649, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8643, - "src": "971:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "956:28:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8651, - "nodeType": "ExpressionStatement", - "src": "956:28:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8652, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8612, - "src": "994:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8653, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8645, - "src": "1007:11:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "994:24:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8655, - "nodeType": "ExpressionStatement", - "src": "994:24:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8656, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "1028:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8657, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "1034:3:15", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1034:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1028:16:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8660, - "nodeType": "ExpressionStatement", - "src": "1028:16:15" - } - ] - }, - "documentation": null, - "id": 8662, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8646, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8643, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 8662, - "src": "870:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "870:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8645, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 8662, - "src": "901:19:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8644, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "901:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "860:66:15" - }, - "returnParameters": { - "id": 8647, - "nodeType": "ParameterList", - "parameters": [], - "src": "946:0:15" - }, - "scope": 8822, - "src": "849:202:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8704, - "nodeType": "Block", - "src": "1133:272:15", - "statements": [ - { - "assignments": [ - 8670 - ], - "declarations": [ - { - "constant": false, - "id": 8670, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 8704, - "src": "1143:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8669, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1143:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8672, - "initialValue": { - "argumentTypes": null, - "id": 8671, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8610, - "src": "1164:7:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1143:28:15" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8677, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8670, - "src": "1229:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8680, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1249:2:15", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1250:1:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 8678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1241:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 8681, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1241:11:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8674, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8612, - "src": "1199:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8673, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "1181:17:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 8675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1181:29:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 8676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decreaseAllowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 10671, - "src": "1181:47:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1181:72:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8683, - "nodeType": "ExpressionStatement", - "src": "1181:72:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8684, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8610, - "src": "1263:7:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8685, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8664, - "src": "1273:8:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1263:18:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8687, - "nodeType": "ExpressionStatement", - "src": "1263:18:15" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8692, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8664, - "src": "1329:8:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1347:2:15", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 8694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1348:1:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 8693, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1339:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 8696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1339:11:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8689, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8612, - "src": "1309:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8688, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10713, - "src": "1291:17:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$10713_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 8690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1291:29:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$10713", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 8691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 10653, - "src": "1291:37:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1291:60:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8698, - "nodeType": "ExpressionStatement", - "src": "1291:60:15" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8700, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8670, - "src": "1377:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8701, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8664, - "src": "1389:8:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8699, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8630, - "src": "1366:10:15", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1366:32:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8703, - "nodeType": "EmitStatement", - "src": "1361:37:15" - } - ] - }, - "documentation": null, - "id": 8705, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8667, - "modifierName": { - "argumentTypes": null, - "id": 8666, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8641, - "src": "1121:7:15", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1121:7:15" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8665, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8664, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 8705, - "src": "1078:16:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8663, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1078:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1077:18:15" - }, - "returnParameters": { - "id": 8668, - "nodeType": "ParameterList", - "parameters": [], - "src": "1133:0:15" - }, - "scope": 8822, - "src": "1057:348:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8725, - "nodeType": "Block", - "src": "1626:141:15", - "statements": [ - { - "assignments": [ - 8713 - ], - "declarations": [ - { - "constant": false, - "id": 8713, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 8725, - "src": "1636:21:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8712, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1636:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8715, - "initialValue": { - "argumentTypes": null, - "id": 8714, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1660:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1636:34:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8716, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1680:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8717, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8707, - "src": "1693:11:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1680:24:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8719, - "nodeType": "ExpressionStatement", - "src": "1680:24:15" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8721, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8713, - "src": "1733:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8722, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8707, - "src": "1748:11:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8720, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8618, - "src": "1719:13:15", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1719:41:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8724, - "nodeType": "EmitStatement", - "src": "1714:46:15" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 8726, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8710, - "modifierName": { - "argumentTypes": null, - "id": 8709, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8641, - "src": "1614:7:15", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1614:7:15" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8708, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8707, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 8726, - "src": "1568:19:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8706, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1568:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1567:21:15" - }, - "returnParameters": { - "id": 8711, - "nodeType": "ParameterList", - "parameters": [], - "src": "1626:0:15" - }, - "scope": 8822, - "src": "1544:223:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8756, - "nodeType": "Block", - "src": "1881:185:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8730, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10772, - "src": "1899:3:15", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1899:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8732, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1913:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1899:24:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 8734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1925:10:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 8729, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10775, - 10776 - ], - "referencedDeclaration": 10776, - "src": "1891:7:15", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1891:45:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8736, - "nodeType": "ExpressionStatement", - "src": "1891:45:15" - }, - { - "assignments": [ - 8738 - ], - "declarations": [ - { - "constant": false, - "id": 8738, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 8756, - "src": "1946:14:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8737, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1946:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8740, - "initialValue": { - "argumentTypes": null, - "id": 8739, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "1963:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1946:20:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8741, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "1976:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8742, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "1982:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1976:16:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8744, - "nodeType": "ExpressionStatement", - "src": "1976:16:15" - }, - { - "expression": { - "argumentTypes": null, - "id": 8749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8745, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8608, - "src": "2002:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8747, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2023:1:15", - "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": 8746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2015:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8748, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2015:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2002:23:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8750, - "nodeType": "ExpressionStatement", - "src": "2002:23:15" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8752, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8738, - "src": "2047:6:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8753, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8606, - "src": "2055:3:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8751, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8624, - "src": "2040:6:15", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2040:19:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8755, - "nodeType": "EmitStatement", - "src": "2035:24:15" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance", - "id": 8757, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8727, - "nodeType": "ParameterList", - "parameters": [], - "src": "1857:2:15" - }, - "returnParameters": { - "id": 8728, - "nodeType": "ParameterList", - "parameters": [], - "src": "1881:0:15" - }, - "scope": 8822, - "src": "1838:228:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8805, - "nodeType": "Block", - "src": "2258:236:15", - "statements": [ - { - "body": { - "id": 8803, - "nodeType": "Block", - "src": "2312:176:15", - "statements": [ - { - "assignments": [ - 8779 - ], - "declarations": [ - { - "constant": false, - "id": 8779, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8803, - "src": "2326:12:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8778, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6156, - "src": "2326:6:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8785, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8781, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8762, - "src": "2349:6:15", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 8783, - "indexExpression": { - "argumentTypes": null, - "id": 8782, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "2356:1:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2349:9:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8780, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "2342:6:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2342:17:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2326:33:15" - }, - { - "assignments": [ - 8787 - ], - "declarations": [ - { - "constant": false, - "id": 8787, - "name": "bal", - "nodeType": "VariableDeclaration", - "scope": 8803, - "src": "2373:11:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8786, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2373:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8794, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8791, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10838, - "src": "2411:4:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - ], - "id": 8790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2403:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2403:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8788, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8779, - "src": "2387:5:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "id": 8789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 6101, - "src": "2387:15:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 8793, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2387:30:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2373:44:15" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8798, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8779, - "src": "2454:5:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 8799, - "name": "newReserve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8759, - "src": "2461:10:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8800, - "name": "bal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8787, - "src": "2473:3:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8795, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6603, - "src": "2431:9:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$6603_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 8797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 6431, - "src": "2431:22:15", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$6156_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 8801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2431:46:15", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8802, - "nodeType": "ExpressionStatement", - "src": "2431:46:15" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8771, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "2288:1:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8772, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8762, - "src": "2292:6:15", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 8773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2292:13:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2288:17:15", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 8804, - "initializationExpression": { - "assignments": [ - 8768 - ], - "declarations": [ - { - "constant": false, - "id": 8768, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 8804, - "src": "2273:9:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8767, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2273:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8770, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 8769, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2285:1:15", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "2273:13:15" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 8776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2307:3:15", - "subExpression": { - "argumentTypes": null, - "id": 8775, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "2307:1:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8777, - "nodeType": "ExpressionStatement", - "src": "2307:3:15" - }, - "nodeType": "ForStatement", - "src": "2268:220:15" - } - ] - }, - "documentation": "@notice Moves all tokens to a new reserve contract", - "id": 8806, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8765, - "modifierName": { - "argumentTypes": null, - "id": 8764, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8641, - "src": "2246:7:15", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2246:7:15" - } - ], - "name": "migrateReserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8759, - "name": "newReserve", - "nodeType": "VariableDeclaration", - "scope": 8806, - "src": "2165:18:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8758, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2165:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8762, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 8806, - "src": "2193:23:15", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 8760, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2193:7:15", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2193:9:15", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2155:67:15" - }, - "returnParameters": { - "id": 8766, - "nodeType": "ParameterList", - "parameters": [], - "src": "2258:0:15" - }, - "scope": 8822, - "src": "2131:363:15", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8820, - "nodeType": "Block", - "src": "2658:69:15", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8816, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10838, - "src": "2714:4:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserve_$8822", - "typeString": "contract YAMReserve" - } - ], - "id": 8815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2706:7:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2706:13:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8812, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8604, - "src": "2682:12:15", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8811, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6156, - "src": "2675:6:15", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$6156_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2675:20:15", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$6156", - "typeString": "contract IERC20" - } - }, - "id": 8814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 6101, - "src": "2675:30:15", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 8818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2675:45:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8810, - "id": 8819, - "nodeType": "Return", - "src": "2668:52:15" - } - ] - }, - "documentation": "@notice Gets the current amount of reserves token held by this contract", - "id": 8821, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "reserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8807, - "nodeType": "ParameterList", - "parameters": [], - "src": "2597:2:15" - }, - "returnParameters": { - "id": 8810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8809, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8821, - "src": "2645:7:15", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8808, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2645:7:15", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2644:9:15" - }, - "scope": 8822, - "src": "2580:147:15", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 8823, - "src": "126:2603:15" - } - ], - "src": "0:2730:15" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-06T14:57:57.136Z", - "devdoc": { - "methods": { - "_setPendingGov(address)": { - "params": { - "pendingGov_": "The address of the rebaser contract to use for authentication." - } - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "lets msg.sender accept governance" - }, - "_setPendingGov(address)": { - "notice": "sets the pendingGov" - }, - "migrateReserves(address,address[])": { - "notice": "Moves all tokens to a new reserve contract" - }, - "reserves()": { - "notice": "Gets the current amount of reserves token held by this contract" - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMReserves.json b/build/contracts/YAMReserves.json deleted file mode 100644 index 4acc240..0000000 --- a/build/contracts/YAMReserves.json +++ /dev/null @@ -1,6157 +0,0 @@ -{ - "contractName": "YAMReserves", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "reserveToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "yamAddress_", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newReserve", - "type": "address" - }, - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "migrateReserves", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"reserveToken_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"yamAddress_\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newReserve\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"migrateReserves\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_setPendingGov(address)\":{\"params\":{\"pendingGov_\":\"The address of the rebaser contract to use for authentication.\"}}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"lets msg.sender accept governance\"},\"_setPendingGov(address)\":{\"notice\":\"sets the pendingGov\"},\"migrateReserves(address,address[])\":{\"notice\":\"Moves all tokens to a new reserve contract\"},\"reserves()\":{\"notice\":\"Gets the current amount of reserves token held by this contract\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol\":\"YAMReserves\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/Address.sol\":{\"keccak256\":\"0xfcf985fe775d3891eb6f1df2b0926b13392f7411550fbddbb2a51e2dfb4c328f\",\"urls\":[\"bzz-raw://557db9c06dce45db040c1a8a87cc2100cbaa86b3fd7cbdf49acf983e110673df\",\"dweb:/ipfs/QmVRxJhBro2YT42FkofepMfseF4rxbDFNXySA2doFSf2Lq\"]},\"/Users/brockelmore/YAM/contracts/lib/IERC20.sol\":{\"keccak256\":\"0xb654abe85060b241b440e22ead01dabb724dda69034d49b483e5e3e55ee64400\",\"urls\":[\"bzz-raw://53f67e469e2c4dfc10411d72f465a3c5b85939f1df4b2b26f12deb729f260b04\",\"dweb:/ipfs/QmSNUGpXPcmWNDczauAmUgZsypdcAB2pZNi3B2RGpYVyp2\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol\":{\"keccak256\":\"0x00c7887d6e2af7d5971473efbd93d312374d6e8478a6f435d7ec3b62fe62a523\",\"urls\":[\"bzz-raw://787539dc1ebb71a219dee830f1d71188d0b13c2d5f7e7bfd08a3cafa8ec9333c\",\"dweb:/ipfs/QmfFwH2Wt17vqVaeoCMpdXbRUFa3e2Kbm1i6HTybGFXv8h\"]},\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol\":{\"keccak256\":\"0xf1abacbcf637281bb6a61ec089514911948e1ce9b94cf277afa742cb76d72453\",\"urls\":[\"bzz-raw://5d277b33d62b102d53f6e3211e98789deb61855ae260c70789205fc5b6f7c153\",\"dweb:/ipfs/QmTNa472BsZVeMBtxczDrHnEQA4Ap6pVqd9VR5dC3aTaEB\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610d0b380380610d0b8339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b039384166001600160a01b03199182161790915560048054939092169281169290921790556001805490911633179055610c85806100866000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806373f03dff11610076578063d72cdafc1161005b578063d72cdafc1461021b578063f4325d6714610223578063fa8f34551461022b576100be565b806373f03dff146101ce57806375172a8b14610201576100be565b806312d43a51116100a757806312d43a51146101b657806325240810146101be5780634bda2e20146101c6576100be565b8063078e9d53146100c357806311fd8a8314610185575b600080fd5b610183600480360360408110156100d957600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561011157600080fd5b82018360208201111561012357600080fd5b8035906020019184602083028401116401000000008311171561014557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061025e945050505050565b005b61018d61036d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61018d610389565b61018d6103a5565b6101836103c1565b610183600480360360208110156101e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104da565b610209610586565b60408051918252519081900360200190f35b61018d610629565b61018d610645565b6101836004803603602081101561024157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610661565b60015473ffffffffffffffffffffffffffffffffffffffff16331461028257600080fd5b60005b815181101561036857600082828151811061029c57fe5b6020026020010151905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561032557600080fd5b505afa158015610339573d6000803e3d6000fd5b505050506040513d602081101561034f57600080fd5b5051905061035e82868361089f565b5050600101610285565b505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff16331461044757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff838116919091179586905591169091556040805192821680845293909116602083015280517f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d55239281900390910190a150565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104fe57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156105f857600080fd5b505afa15801561060c573d6000803e3d6000fd5b505050506040513d602081101561062257600080fd5b5051905090565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461068557600080fd5b60035460048054604080517fa457c2d700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9485169381018490527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024820152905192939091169163a457c2d7916044808201926020929091908290030181600087803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b5050600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691821790925560048054604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152928301939093527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248301529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561081d57600080fd5b505af1158015610831573d6000803e3d6000fd5b505050506040513d602081101561084757600080fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff80841682528416602082015281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526103689084906060610989826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166109ff9092919063ffffffff16565b805190915015610368578080602001905160208110156109a857600080fd5b5051610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610c27602a913960400191505060405180910390fd5b6060610a0e8484600085610a16565b949350505050565b6060610a2185610c20565b610a8c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310610af657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610ab9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610b58576040519150601f19603f3d011682016040523d82523d6000602084013e610b5d565b606091505b50915091508115610b71579150610a0e9050565b805115610b815780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610be5578181015183820152602001610bcd565b50505050905090810190601f168015610c125780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820125aef7d918fbb64cc5e8cb3bcc13056e779fafb6db306e245de4bcfb450301e64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c806373f03dff11610076578063d72cdafc1161005b578063d72cdafc1461021b578063f4325d6714610223578063fa8f34551461022b576100be565b806373f03dff146101ce57806375172a8b14610201576100be565b806312d43a51116100a757806312d43a51146101b657806325240810146101be5780634bda2e20146101c6576100be565b8063078e9d53146100c357806311fd8a8314610185575b600080fd5b610183600480360360408110156100d957600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561011157600080fd5b82018360208201111561012357600080fd5b8035906020019184602083028401116401000000008311171561014557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061025e945050505050565b005b61018d61036d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61018d610389565b61018d6103a5565b6101836103c1565b610183600480360360208110156101e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104da565b610209610586565b60408051918252519081900360200190f35b61018d610629565b61018d610645565b6101836004803603602081101561024157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610661565b60015473ffffffffffffffffffffffffffffffffffffffff16331461028257600080fd5b60005b815181101561036857600082828151811061029c57fe5b6020026020010151905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561032557600080fd5b505afa158015610339573d6000803e3d6000fd5b505050506040513d602081101561034f57600080fd5b5051905061035e82868361089f565b5050600101610285565b505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff16331461044757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60018054600280547fffffffffffffffffffffffff000000000000000000000000000000000000000080841673ffffffffffffffffffffffffffffffffffffffff838116919091179586905591169091556040805192821680845293909116602083015280517f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d55239281900390910190a150565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104fe57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b60008054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156105f857600080fd5b505afa15801561060c573d6000803e3d6000fd5b505050506040513d602081101561062257600080fd5b5051905090565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461068557600080fd5b60035460048054604080517fa457c2d700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9485169381018490527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024820152905192939091169163a457c2d7916044808201926020929091908290030181600087803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b5050600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691821790925560048054604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152928301939093527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248301529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561081d57600080fd5b505af1158015610831573d6000803e3d6000fd5b505050506040513d602081101561084757600080fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff80841682528416602082015281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526103689084906060610989826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166109ff9092919063ffffffff16565b805190915015610368578080602001905160208110156109a857600080fd5b5051610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610c27602a913960400191505060405180910390fd5b6060610a0e8484600085610a16565b949350505050565b6060610a2185610c20565b610a8c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310610af657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610ab9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610b58576040519150601f19603f3d011682016040523d82523d6000602084013e610b5d565b606091505b50915091508115610b71579150610a0e9050565b805115610b815780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610be5578181015183820152602001610bcd565b50505050905090810190601f168015610c125780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820125aef7d918fbb64cc5e8cb3bcc13056e779fafb6db306e245de4bcfb450301e64736f6c63430005110032", - "sourceMap": "126:2604:21:-;;;850:202;8:9:-1;5:2;;;30:1;27;20:12;5:2;850:202:21;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;850:202:21;;;;;;;957:12;:28;;-1:-1:-1;;;;;957:28:21;;;-1:-1:-1;;;;;;957:28:21;;;;;;;995:10;:24;;;;;;;;;;;;;;;957:28;1029:16;;;;;1035:10;1029:16;;;126:2604;;;;;;", - "deployedSourceMap": "126:2604:21:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;126:2604:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2132:363;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2132:363:21;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;2132:363:21;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2132:363:21;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;2132:363:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2132:363:21;;-1:-1:-1;2132:363:21;;-1:-1:-1;;;;;2132:363:21:i;:::-;;291:22;;;:::i;:::-;;;;;;;;;;;;;;;;;;;234:18;;;:::i;259:25::-;;;:::i;1839:228::-;;;:::i;1545:223::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1545:223:21;;;;:::i;2581:147::-;;;:::i;:::-;;;;;;;;;;;;;;;;320:25;;;:::i;200:27::-;;;:::i;1058:348::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1058:348:21;;;;:::i;2132:363::-;822:3;;;;808:10;:17;800:26;;;;;;2274:9;2269:220;2293:6;:13;2289:1;:17;2269:220;;;2327:12;2350:6;2357:1;2350:9;;;;;;;;;;;;;;2327:33;;2374:11;2388:5;:15;;;2412:4;2388:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2388:30:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2388:30:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2388:30:21;;-1:-1:-1;2432:46:21;2455:5;2462:10;2388:30;2432:22;:46::i;:::-;-1:-1:-1;;2308:3:21;;2269:220;;;;2132:363;;:::o;291:22::-;;;;;;:::o;234:18::-;;;;;;:::o;259:25::-;;;;;;:::o;1839:228::-;1914:10;;;;1900;:24;1892:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1964:3;;;1983:10;;;1977:16;;;;1964:3;1983:10;;;1977:16;;;;;;;;2003:23;;;;;2041:19;;;1964:3;;;2041:19;;;2056:3;;;;2041:19;;;;;;;;;;;;;;;;1839:228;:::o;1545:223::-;822:3;;;;808:10;:17;800:26;;;;;;1661:10;;;;1681:24;;;;;;;;;;;1720:41;;;1661:10;;;;1720:41;;;;;;;;;;;;;;;;;;;;;;;836:1;1545:223;:::o;2581:147::-;2646:7;2683:12;;2676:45;;;;;;2715:4;2676:45;;;;;;2683:12;;;;;2676:30;;:45;;;;;;;;;;;;;;;2683:12;2676:45;;;5:2:-1;;;;30:1;27;20:12;5:2;2676:45:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2676:45:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2676:45:21;;-1:-1:-1;2581:147:21;:::o;320:25::-;;;;;;:::o;200:27::-;;;;;;:::o;1058:348::-;822:3;;;;808:10;:17;800:26;;;;;;1165:7;;1200:10;;;1182:72;;;;;;1165:7;;;;1182:72;;;;;;1250:2;1182:72;;;;;;1165:7;;1200:10;;;;1182:47;;:72;;;;;;;;;;;;;;;-1:-1:-1;1200:10:21;1182:72;;;5:2:-1;;;;30:1;27;20:12;5:2;1182:72:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1182:72:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;1264:7:21;:18;;;;;;;;;;;;;;1310:10;;;1292:60;;;;;;;;;;;;;1348:2;1292:60;;;;;;1310:10;;;;;1292:37;;:60;;;;;1182:72;;1292:60;;;;;;;-1:-1:-1;1310:10:21;1292:60;;;5:2:-1;;;;30:1;27;20:12;5:2;1292:60:21;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1292:60:21;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;1367:32:21;;;;;;;;;;;1292:60;1367:32;;;;;;;;;;;;;;;;836:1;1058:348;:::o;678:175:17:-;787:58;;;810:14;787:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;787:58:17;;;;;;;;25:18:-1;;61:17;;787:58:17;182:15:-1;810:23:17;179:29:-1;160:49;;760:86:17;;780:5;;3360:23;3386:69;3414:4;3386:69;;;;;;;;;;;;;;;;;3394:5;3386:27;;;;:69;;;;;:::i;:::-;3469:17;;3360:95;;-1:-1:-1;3469:21:17;3465:221;;3609:10;3598:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3598:30:17;3590:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3571:194:12;3674:12;3705:53;3728:6;3736:4;3742:1;3745:12;3705:22;:53::i;:::-;3698:60;3571:194;-1:-1:-1;;;;3571:194:12:o;4918:955::-;5048:12;5080:18;5091:6;5080:10;:18::i;:::-;5072:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5203:12;5217:23;5244:6;:11;;5262:8;5272:4;5244:33;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;5244:33:12;;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;5202:75:12;;;;5291:7;5287:580;;;5321:10;-1:-1:-1;5314:17:12;;-1:-1:-1;5314:17:12;5287:580;5432:17;;:21;5428:429;;5690:10;5684:17;5750:15;5737:10;5733:2;5729:19;5722:44;5639:145;5829:12;5822:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5822:20:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;719:413;1079:20;1117:8;;;719:413::o", - "source": "pragma solidity 0.5.17;\n\nimport \"../lib/IERC20.sol\";\nimport \"../lib/SafeERC20.sol\";\nimport \"../token/YAMTokenInterface.sol\";\n\ncontract YAMReserves {\n\n // Token that serves as a reserve for YAM\n address public reserveToken;\n\n address public gov;\n\n address public pendingGov;\n\n address public rebaser;\n\n address public yamAddress;\n\n /*** Gov Events ***/\n\n /**\n * @notice Event emitted when pendingGov is changed\n */\n event NewPendingGov(address oldPendingGov, address newPendingGov);\n\n /**\n * @notice Event emitted when gov is changed\n */\n event NewGov(address oldGov, address newGov);\n\n /**\n * @notice Event emitted when rebaser is changed\n */\n event NewRebaser(address oldRebaser, address newRebaser);\n\n\n modifier onlyGov() {\n require(msg.sender == gov);\n _;\n }\n\n constructor(\n address reserveToken_,\n address yamAddress_\n )\n public\n {\n reserveToken = reserveToken_;\n yamAddress = yamAddress_;\n gov = msg.sender;\n }\n\n function _setRebaser(address rebaser_)\n external\n onlyGov\n {\n address oldRebaser = rebaser;\n YAMTokenInterface(yamAddress).decreaseAllowance(oldRebaser, uint256(-1));\n rebaser = rebaser_;\n YAMTokenInterface(yamAddress).approve(rebaser_, uint256(-1));\n emit NewRebaser(oldRebaser, rebaser_);\n }\n\n /** @notice sets the pendingGov\n * @param pendingGov_ The address of the rebaser contract to use for authentication.\n */\n function _setPendingGov(address pendingGov_)\n external\n onlyGov\n {\n address oldPendingGov = pendingGov;\n pendingGov = pendingGov_;\n emit NewPendingGov(oldPendingGov, pendingGov_);\n }\n\n /**\n * @notice lets msg.sender accept governance\n */\n function _acceptGov()\n external\n {\n require(msg.sender == pendingGov, \"!pending\");\n address oldGov = gov;\n gov = pendingGov;\n pendingGov = address(0);\n emit NewGov(oldGov, gov);\n }\n\n /// @notice Moves all tokens to a new reserve contract\n function migrateReserves(\n address newReserve,\n address[] memory tokens\n )\n public\n onlyGov\n {\n for (uint256 i = 0; i < tokens.length; i++) {\n IERC20 token = IERC20(tokens[i]);\n uint256 bal = token.balanceOf(address(this));\n SafeERC20.safeTransfer(token, newReserve, bal);\n }\n }\n\n /// @notice Gets the current amount of reserves token held by this contract\n function reserves()\n public\n view\n returns (uint256)\n {\n return IERC20(reserveToken).balanceOf(address(this));\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol", - "exportedSymbols": { - "YAMReserves": [ - 17053 - ] - }, - "id": 17054, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 16830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:21" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "file": "../lib/IERC20.sol", - "id": 16831, - "nodeType": "ImportDirective", - "scope": 17054, - "sourceUnit": 14359, - "src": "25:27:21", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 16832, - "nodeType": "ImportDirective", - "scope": 17054, - "sourceUnit": 14806, - "src": "53:30:21", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 16833, - "nodeType": "ImportDirective", - "scope": 17054, - "sourceUnit": 19203, - "src": "84:40:21", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17053, - "linearizedBaseContracts": [ - 17053 - ], - "name": "YAMReserves", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 16835, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "200:27:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "200:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16837, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "234:18:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16836, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "234:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16839, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "259:25:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16838, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "259:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16841, - "name": "rebaser", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "291:22:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16840, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "291:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16843, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "320:25:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16842, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "320:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 16849, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 16848, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16845, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 16849, - "src": "470:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16844, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "470:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16847, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 16849, - "src": "493:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16846, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "493:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "469:46:21" - }, - "src": "450:66:21" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 16855, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 16854, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16851, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 16855, - "src": "600:14:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16850, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "600:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16853, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 16855, - "src": "616:14:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16852, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "616:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "599:32:21" - }, - "src": "587:45:21" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when rebaser is changed", - "id": 16861, - "name": "NewRebaser", - "nodeType": "EventDefinition", - "parameters": { - "id": 16860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16857, - "indexed": false, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 16861, - "src": "724:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16856, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "724:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16859, - "indexed": false, - "name": "newRebaser", - "nodeType": "VariableDeclaration", - "scope": 16861, - "src": "744:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16858, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "744:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "723:40:21" - }, - "src": "707:57:21" - }, - { - "body": { - "id": 16871, - "nodeType": "Block", - "src": "790:54:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16864, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "808:3:21", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 16865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "808:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 16866, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "822:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "808:17:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16863, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "800:7:21", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "800:26:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16869, - "nodeType": "ExpressionStatement", - "src": "800:26:21" - }, - { - "id": 16870, - "nodeType": "PlaceholderStatement", - "src": "836:1:21" - } - ] - }, - "documentation": null, - "id": 16872, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 16862, - "nodeType": "ParameterList", - "parameters": [], - "src": "787:2:21" - }, - "src": "771:73:21", - "visibility": "internal" - }, - { - "body": { - "id": 16892, - "nodeType": "Block", - "src": "947:105:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 16881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16879, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16835, - "src": "957:12:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16880, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16874, - "src": "972:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "957:28:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16882, - "nodeType": "ExpressionStatement", - "src": "957:28:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16883, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16843, - "src": "995:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16884, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16876, - "src": "1008:11:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "995:24:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16886, - "nodeType": "ExpressionStatement", - "src": "995:24:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16887, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "1029:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1035:3:21", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 16889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1035:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1029:16:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16891, - "nodeType": "ExpressionStatement", - "src": "1029:16:21" - } - ] - }, - "documentation": null, - "id": 16893, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16877, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16874, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 16893, - "src": "871:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16873, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "871:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16876, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 16893, - "src": "902:19:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "902:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "861:66:21" - }, - "returnParameters": { - "id": 16878, - "nodeType": "ParameterList", - "parameters": [], - "src": "947:0:21" - }, - "scope": 17053, - "src": "850:202:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 16935, - "nodeType": "Block", - "src": "1134:272:21", - "statements": [ - { - "assignments": [ - 16901 - ], - "declarations": [ - { - "constant": false, - "id": 16901, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 16935, - "src": "1144:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16900, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1144:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16903, - "initialValue": { - "argumentTypes": null, - "id": 16902, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16841, - "src": "1165:7:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1144:28:21" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16908, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16901, - "src": "1230:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1250:2:21", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16910, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1251:1:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 16909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1242:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 16912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1242:11:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16905, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16843, - "src": "1200:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16904, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "1182:17:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 16906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1182:29:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 16907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decreaseAllowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 19115, - "src": "1182:47:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 16913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1182:72:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16914, - "nodeType": "ExpressionStatement", - "src": "1182:72:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16915, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16841, - "src": "1264:7:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16916, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16895, - "src": "1274:8:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1264:18:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16918, - "nodeType": "ExpressionStatement", - "src": "1264:18:21" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16923, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16895, - "src": "1330:8:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1348:2:21", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16925, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1349:1:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 16924, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1340:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 16927, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1340:11:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16920, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16843, - "src": "1310:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16919, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "1292:17:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 16921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1292:29:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 16922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 19097, - "src": "1292:37:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 16928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1292:60:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16929, - "nodeType": "ExpressionStatement", - "src": "1292:60:21" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16931, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16901, - "src": "1378:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16932, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16895, - "src": "1390:8:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16930, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16861, - "src": "1367:10:21", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 16933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1367:32:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16934, - "nodeType": "EmitStatement", - "src": "1362:37:21" - } - ] - }, - "documentation": null, - "id": 16936, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16898, - "modifierName": { - "argumentTypes": null, - "id": 16897, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16872, - "src": "1122:7:21", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1122:7:21" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16896, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16895, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 16936, - "src": "1079:16:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1079:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1078:18:21" - }, - "returnParameters": { - "id": 16899, - "nodeType": "ParameterList", - "parameters": [], - "src": "1134:0:21" - }, - "scope": 17053, - "src": "1058:348:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16956, - "nodeType": "Block", - "src": "1627:141:21", - "statements": [ - { - "assignments": [ - 16944 - ], - "declarations": [ - { - "constant": false, - "id": 16944, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 16956, - "src": "1637:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16943, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1637:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16946, - "initialValue": { - "argumentTypes": null, - "id": 16945, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1661:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1637:34:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16947, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1681:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16948, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16938, - "src": "1694:11:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1681:24:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16950, - "nodeType": "ExpressionStatement", - "src": "1681:24:21" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16952, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16944, - "src": "1734:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16953, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16938, - "src": "1749:11:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16951, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16849, - "src": "1720:13:21", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 16954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1720:41:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16955, - "nodeType": "EmitStatement", - "src": "1715:46:21" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 16957, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16941, - "modifierName": { - "argumentTypes": null, - "id": 16940, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16872, - "src": "1615:7:21", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1615:7:21" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16939, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16938, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 16957, - "src": "1569:19:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16937, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1569:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1568:21:21" - }, - "returnParameters": { - "id": 16942, - "nodeType": "ParameterList", - "parameters": [], - "src": "1627:0:21" - }, - "scope": 17053, - "src": "1545:223:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16987, - "nodeType": "Block", - "src": "1882:185:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16961, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1900:3:21", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 16962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1900:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 16963, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1914:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1900:24:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 16965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1926:10:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 16960, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1892:7:21", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1892:45:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16967, - "nodeType": "ExpressionStatement", - "src": "1892:45:21" - }, - { - "assignments": [ - 16969 - ], - "declarations": [ - { - "constant": false, - "id": 16969, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 16987, - "src": "1947:14:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16968, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1947:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16971, - "initialValue": { - "argumentTypes": null, - "id": 16970, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "1964:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1947:20:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16972, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "1977:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16973, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1983:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1977:16:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16975, - "nodeType": "ExpressionStatement", - "src": "1977:16:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16976, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "2003:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2024:1:21", - "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": 16977, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2016:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2016:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2003:23:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16981, - "nodeType": "ExpressionStatement", - "src": "2003:23:21" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16983, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16969, - "src": "2048:6:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16984, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "2056:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16982, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16855, - "src": "2041:6:21", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 16985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2041:19:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16986, - "nodeType": "EmitStatement", - "src": "2036:24:21" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance", - "id": 16988, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16958, - "nodeType": "ParameterList", - "parameters": [], - "src": "1858:2:21" - }, - "returnParameters": { - "id": 16959, - "nodeType": "ParameterList", - "parameters": [], - "src": "1882:0:21" - }, - "scope": 17053, - "src": "1839:228:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 17036, - "nodeType": "Block", - "src": "2259:236:21", - "statements": [ - { - "body": { - "id": 17034, - "nodeType": "Block", - "src": "2313:176:21", - "statements": [ - { - "assignments": [ - 17010 - ], - "declarations": [ - { - "constant": false, - "id": 17010, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 17034, - "src": "2327:12:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 17009, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "2327:6:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17016, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17012, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16993, - "src": "2350:6:21", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 17014, - "indexExpression": { - "argumentTypes": null, - "id": 17013, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16999, - "src": "2357:1:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2350:9:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17011, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "2343:6:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 17015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2343:17:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2327:33:21" - }, - { - "assignments": [ - 17018 - ], - "declarations": [ - { - "constant": false, - "id": 17018, - "name": "bal", - "nodeType": "VariableDeclaration", - "scope": 17034, - "src": "2374:11:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17017, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2374:7:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17025, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17022, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19334, - "src": "2412:4:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - ], - "id": 17021, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2404:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2404:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 17019, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17010, - "src": "2388:5:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 17020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 14303, - "src": "2388:15:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 17024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2388:30:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2374:44:21" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17029, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17010, - "src": "2455:5:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 17030, - "name": "newReserve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16990, - "src": "2462:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17031, - "name": "bal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17018, - "src": "2474:3:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17026, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14805, - "src": "2432:9:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$14805_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 17028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14633, - "src": "2432:22:21", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 17032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2432:46:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17033, - "nodeType": "ExpressionStatement", - "src": "2432:46:21" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17002, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16999, - "src": "2289:1:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17003, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16993, - "src": "2293:6:21", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 17004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2293:13:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2289:17:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 17035, - "initializationExpression": { - "assignments": [ - 16999 - ], - "declarations": [ - { - "constant": false, - "id": 16999, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 17035, - "src": "2274:9:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2274:7:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17001, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 17000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2286:1:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "2274:13:21" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 17007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2308:3:21", - "subExpression": { - "argumentTypes": null, - "id": 17006, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16999, - "src": "2308:1:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17008, - "nodeType": "ExpressionStatement", - "src": "2308:3:21" - }, - "nodeType": "ForStatement", - "src": "2269:220:21" - } - ] - }, - "documentation": "@notice Moves all tokens to a new reserve contract", - "id": 17037, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16996, - "modifierName": { - "argumentTypes": null, - "id": 16995, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16872, - "src": "2247:7:21", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2247:7:21" - } - ], - "name": "migrateReserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16994, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16990, - "name": "newReserve", - "nodeType": "VariableDeclaration", - "scope": 17037, - "src": "2166:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16989, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2166:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16993, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 17037, - "src": "2194:23:21", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 16991, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2194:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16992, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2194:9:21", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2156:67:21" - }, - "returnParameters": { - "id": 16997, - "nodeType": "ParameterList", - "parameters": [], - "src": "2259:0:21" - }, - "scope": 17053, - "src": "2132:363:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17051, - "nodeType": "Block", - "src": "2659:69:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17047, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19334, - "src": "2715:4:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - ], - "id": 17046, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2707:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2707:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17043, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16835, - "src": "2683:12:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17042, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "2676:6:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 17044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2676:20:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 17045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 14303, - "src": "2676:30:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 17049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2676:45:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17041, - "id": 17050, - "nodeType": "Return", - "src": "2669:52:21" - } - ] - }, - "documentation": "@notice Gets the current amount of reserves token held by this contract", - "id": 17052, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "reserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17038, - "nodeType": "ParameterList", - "parameters": [], - "src": "2598:2:21" - }, - "returnParameters": { - "id": 17041, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17040, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17052, - "src": "2646:7:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17039, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2646:7:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2645:9:21" - }, - "scope": 17053, - "src": "2581:147:21", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17054, - "src": "126:2604:21" - } - ], - "src": "0:2731:21" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/reserves/YAMReserves.sol", - "exportedSymbols": { - "YAMReserves": [ - 17053 - ] - }, - "id": 17054, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 16830, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:21" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/IERC20.sol", - "file": "../lib/IERC20.sol", - "id": 16831, - "nodeType": "ImportDirective", - "scope": 17054, - "sourceUnit": 14359, - "src": "25:27:21", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeERC20.sol", - "file": "../lib/SafeERC20.sol", - "id": 16832, - "nodeType": "ImportDirective", - "scope": 17054, - "sourceUnit": 14806, - "src": "53:30:21", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "file": "../token/YAMTokenInterface.sol", - "id": 16833, - "nodeType": "ImportDirective", - "scope": 17054, - "sourceUnit": 19203, - "src": "84:40:21", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17053, - "linearizedBaseContracts": [ - 17053 - ], - "name": "YAMReserves", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 16835, - "name": "reserveToken", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "200:27:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "200:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16837, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "234:18:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16836, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "234:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16839, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "259:25:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16838, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "259:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16841, - "name": "rebaser", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "291:22:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16840, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "291:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16843, - "name": "yamAddress", - "nodeType": "VariableDeclaration", - "scope": 17053, - "src": "320:25:21", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16842, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "320:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 16849, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 16848, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16845, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 16849, - "src": "470:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16844, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "470:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16847, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 16849, - "src": "493:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16846, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "493:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "469:46:21" - }, - "src": "450:66:21" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 16855, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 16854, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16851, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 16855, - "src": "600:14:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16850, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "600:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16853, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 16855, - "src": "616:14:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16852, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "616:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "599:32:21" - }, - "src": "587:45:21" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when rebaser is changed", - "id": 16861, - "name": "NewRebaser", - "nodeType": "EventDefinition", - "parameters": { - "id": 16860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16857, - "indexed": false, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 16861, - "src": "724:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16856, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "724:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16859, - "indexed": false, - "name": "newRebaser", - "nodeType": "VariableDeclaration", - "scope": 16861, - "src": "744:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16858, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "744:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "723:40:21" - }, - "src": "707:57:21" - }, - { - "body": { - "id": 16871, - "nodeType": "Block", - "src": "790:54:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16864, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "808:3:21", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 16865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "808:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 16866, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "822:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "808:17:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 16863, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "800:7:21", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 16868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "800:26:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16869, - "nodeType": "ExpressionStatement", - "src": "800:26:21" - }, - { - "id": 16870, - "nodeType": "PlaceholderStatement", - "src": "836:1:21" - } - ] - }, - "documentation": null, - "id": 16872, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 16862, - "nodeType": "ParameterList", - "parameters": [], - "src": "787:2:21" - }, - "src": "771:73:21", - "visibility": "internal" - }, - { - "body": { - "id": 16892, - "nodeType": "Block", - "src": "947:105:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 16881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16879, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16835, - "src": "957:12:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16880, - "name": "reserveToken_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16874, - "src": "972:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "957:28:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16882, - "nodeType": "ExpressionStatement", - "src": "957:28:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16883, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16843, - "src": "995:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16884, - "name": "yamAddress_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16876, - "src": "1008:11:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "995:24:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16886, - "nodeType": "ExpressionStatement", - "src": "995:24:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16887, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "1029:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16888, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1035:3:21", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 16889, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1035:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1029:16:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16891, - "nodeType": "ExpressionStatement", - "src": "1029:16:21" - } - ] - }, - "documentation": null, - "id": 16893, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16877, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16874, - "name": "reserveToken_", - "nodeType": "VariableDeclaration", - "scope": 16893, - "src": "871:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16873, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "871:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16876, - "name": "yamAddress_", - "nodeType": "VariableDeclaration", - "scope": 16893, - "src": "902:19:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "902:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "861:66:21" - }, - "returnParameters": { - "id": 16878, - "nodeType": "ParameterList", - "parameters": [], - "src": "947:0:21" - }, - "scope": 17053, - "src": "850:202:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 16935, - "nodeType": "Block", - "src": "1134:272:21", - "statements": [ - { - "assignments": [ - 16901 - ], - "declarations": [ - { - "constant": false, - "id": 16901, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 16935, - "src": "1144:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16900, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1144:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16903, - "initialValue": { - "argumentTypes": null, - "id": 16902, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16841, - "src": "1165:7:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1144:28:21" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16908, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16901, - "src": "1230:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1250:2:21", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16910, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1251:1:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 16909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1242:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 16912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1242:11:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16905, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16843, - "src": "1200:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16904, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "1182:17:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 16906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1182:29:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 16907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decreaseAllowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 19115, - "src": "1182:47:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 16913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1182:72:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16914, - "nodeType": "ExpressionStatement", - "src": "1182:72:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16915, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16841, - "src": "1264:7:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16916, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16895, - "src": "1274:8:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1264:18:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16918, - "nodeType": "ExpressionStatement", - "src": "1264:18:21" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16923, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16895, - "src": "1330:8:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1348:2:21", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 16925, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1349:1:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 16924, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1340:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 16927, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1340:11:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16920, - "name": "yamAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16843, - "src": "1310:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16919, - "name": "YAMTokenInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19202, - "src": "1292:17:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAMTokenInterface_$19202_$", - "typeString": "type(contract YAMTokenInterface)" - } - }, - "id": 16921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1292:29:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenInterface_$19202", - "typeString": "contract YAMTokenInterface" - } - }, - "id": 16922, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 19097, - "src": "1292:37:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 16928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1292:60:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 16929, - "nodeType": "ExpressionStatement", - "src": "1292:60:21" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16931, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16901, - "src": "1378:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16932, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16895, - "src": "1390:8:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16930, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16861, - "src": "1367:10:21", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 16933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1367:32:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16934, - "nodeType": "EmitStatement", - "src": "1362:37:21" - } - ] - }, - "documentation": null, - "id": 16936, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16898, - "modifierName": { - "argumentTypes": null, - "id": 16897, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16872, - "src": "1122:7:21", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1122:7:21" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16896, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16895, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 16936, - "src": "1079:16:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1079:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1078:18:21" - }, - "returnParameters": { - "id": 16899, - "nodeType": "ParameterList", - "parameters": [], - "src": "1134:0:21" - }, - "scope": 17053, - "src": "1058:348:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16956, - "nodeType": "Block", - "src": "1627:141:21", - "statements": [ - { - "assignments": [ - 16944 - ], - "declarations": [ - { - "constant": false, - "id": 16944, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 16956, - "src": "1637:21:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16943, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1637:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16946, - "initialValue": { - "argumentTypes": null, - "id": 16945, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1661:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1637:34:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16947, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1681:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16948, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16938, - "src": "1694:11:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1681:24:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16950, - "nodeType": "ExpressionStatement", - "src": "1681:24:21" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16952, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16944, - "src": "1734:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16953, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16938, - "src": "1749:11:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16951, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16849, - "src": "1720:13:21", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 16954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1720:41:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16955, - "nodeType": "EmitStatement", - "src": "1715:46:21" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 16957, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16941, - "modifierName": { - "argumentTypes": null, - "id": 16940, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16872, - "src": "1615:7:21", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1615:7:21" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16939, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16938, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 16957, - "src": "1569:19:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16937, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1569:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1568:21:21" - }, - "returnParameters": { - "id": 16942, - "nodeType": "ParameterList", - "parameters": [], - "src": "1627:0:21" - }, - "scope": 17053, - "src": "1545:223:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 16987, - "nodeType": "Block", - "src": "1882:185:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 16964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 16961, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "1900:3:21", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 16962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1900:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 16963, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1914:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1900:24:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 16965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1926:10:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 16960, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "1892:7:21", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 16966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1892:45:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16967, - "nodeType": "ExpressionStatement", - "src": "1892:45:21" - }, - { - "assignments": [ - 16969 - ], - "declarations": [ - { - "constant": false, - "id": 16969, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 16987, - "src": "1947:14:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16968, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1947:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 16971, - "initialValue": { - "argumentTypes": null, - "id": 16970, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "1964:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1947:20:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16972, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "1977:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 16973, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "1983:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1977:16:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16975, - "nodeType": "ExpressionStatement", - "src": "1977:16:21" - }, - { - "expression": { - "argumentTypes": null, - "id": 16980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 16976, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16839, - "src": "2003:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 16978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2024:1:21", - "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": 16977, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2016:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 16979, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2016:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "2003:23:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16981, - "nodeType": "ExpressionStatement", - "src": "2003:23:21" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 16983, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16969, - "src": "2048:6:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 16984, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16837, - "src": "2056:3:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 16982, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16855, - "src": "2041:6:21", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 16985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2041:19:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16986, - "nodeType": "EmitStatement", - "src": "2036:24:21" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance", - "id": 16988, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16958, - "nodeType": "ParameterList", - "parameters": [], - "src": "1858:2:21" - }, - "returnParameters": { - "id": 16959, - "nodeType": "ParameterList", - "parameters": [], - "src": "1882:0:21" - }, - "scope": 17053, - "src": "1839:228:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 17036, - "nodeType": "Block", - "src": "2259:236:21", - "statements": [ - { - "body": { - "id": 17034, - "nodeType": "Block", - "src": "2313:176:21", - "statements": [ - { - "assignments": [ - 17010 - ], - "declarations": [ - { - "constant": false, - "id": 17010, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 17034, - "src": "2327:12:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 17009, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14358, - "src": "2327:6:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17016, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17012, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16993, - "src": "2350:6:21", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 17014, - "indexExpression": { - "argumentTypes": null, - "id": 17013, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16999, - "src": "2357:1:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2350:9:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17011, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "2343:6:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 17015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2343:17:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2327:33:21" - }, - { - "assignments": [ - 17018 - ], - "declarations": [ - { - "constant": false, - "id": 17018, - "name": "bal", - "nodeType": "VariableDeclaration", - "scope": 17034, - "src": "2374:11:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17017, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2374:7:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17025, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17022, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19334, - "src": "2412:4:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - ], - "id": 17021, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2404:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2404:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 17019, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17010, - "src": "2388:5:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 17020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 14303, - "src": "2388:15:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 17024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2388:30:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2374:44:21" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17029, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17010, - "src": "2455:5:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "id": 17030, - "name": "newReserve", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16990, - "src": "2462:10:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17031, - "name": "bal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17018, - "src": "2474:3:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17026, - "name": "SafeERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14805, - "src": "2432:9:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$14805_$", - "typeString": "type(library SafeERC20)" - } - }, - "id": 17028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 14633, - "src": "2432:22:21", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$14358_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 17032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2432:46:21", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17033, - "nodeType": "ExpressionStatement", - "src": "2432:46:21" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17002, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16999, - "src": "2289:1:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17003, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16993, - "src": "2293:6:21", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 17004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2293:13:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2289:17:21", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 17035, - "initializationExpression": { - "assignments": [ - 16999 - ], - "declarations": [ - { - "constant": false, - "id": 16999, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 17035, - "src": "2274:9:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16998, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2274:7:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17001, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 17000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2286:1:21", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "2274:13:21" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 17007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "2308:3:21", - "subExpression": { - "argumentTypes": null, - "id": 17006, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16999, - "src": "2308:1:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17008, - "nodeType": "ExpressionStatement", - "src": "2308:3:21" - }, - "nodeType": "ForStatement", - "src": "2269:220:21" - } - ] - }, - "documentation": "@notice Moves all tokens to a new reserve contract", - "id": 17037, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 16996, - "modifierName": { - "argumentTypes": null, - "id": 16995, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16872, - "src": "2247:7:21", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2247:7:21" - } - ], - "name": "migrateReserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16994, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16990, - "name": "newReserve", - "nodeType": "VariableDeclaration", - "scope": 17037, - "src": "2166:18:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 16989, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2166:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 16993, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 17037, - "src": "2194:23:21", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 16991, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2194:7:21", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 16992, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2194:9:21", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2156:67:21" - }, - "returnParameters": { - "id": 16997, - "nodeType": "ParameterList", - "parameters": [], - "src": "2259:0:21" - }, - "scope": 17053, - "src": "2132:363:21", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17051, - "nodeType": "Block", - "src": "2659:69:21", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17047, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19334, - "src": "2715:4:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMReserves_$17053", - "typeString": "contract YAMReserves" - } - ], - "id": 17046, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2707:7:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2707:13:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17043, - "name": "reserveToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16835, - "src": "2683:12:21", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17042, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14358, - "src": "2676:6:21", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$14358_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 17044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2676:20:21", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$14358", - "typeString": "contract IERC20" - } - }, - "id": 17045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 14303, - "src": "2676:30:21", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 17049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2676:45:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17041, - "id": 17050, - "nodeType": "Return", - "src": "2669:52:21" - } - ] - }, - "documentation": "@notice Gets the current amount of reserves token held by this contract", - "id": 17052, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "reserves", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17038, - "nodeType": "ParameterList", - "parameters": [], - "src": "2598:2:21" - }, - "returnParameters": { - "id": 17041, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17040, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17052, - "src": "2646:7:21", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17039, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2646:7:21", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2645:9:21" - }, - "scope": 17053, - "src": "2581:147:21", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17054, - "src": "126:2604:21" - } - ], - "src": "0:2731:21" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event", - "signature": "0x1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523" - }, - "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event", - "signature": "0x6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e" - }, - "0x51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event", - "signature": "0x51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545" - } - }, - "links": {}, - "address": "0x1B073A8F94d4677E9651f51135AeeA103d1A3E85", - "transactionHash": "0x9b8b530895a1acfb32588b794c3ff0c20582c03123ef60a49912c69b6fd96999" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.409Z", - "devdoc": { - "methods": { - "_setPendingGov(address)": { - "params": { - "pendingGov_": "The address of the rebaser contract to use for authentication." - } - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "lets msg.sender accept governance" - }, - "_setPendingGov(address)": { - "notice": "sets the pendingGov" - }, - "migrateReserves(address,address[])": { - "notice": "Moves all tokens to a new reserve contract" - }, - "reserves()": { - "notice": "Gets the current amount of reserves token held by this contract" - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMSNXPool.json b/build/contracts/YAMSNXPool.json deleted file mode 100644 index 5137f39..0000000 --- a/build/contracts/YAMSNXPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMSNXPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "snx", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"snx\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMSNXPool.sol\":\"YAMSNXPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMSNXPool.sol\":{\"keccak256\":\"0xc03ba9a22d699f5d915eb4b3a214833280c2e0e6f1fd01241c00f8cdee3c646d\",\"urls\":[\"bzz-raw://5d805159ffe3f46da8610899fc62e6e6e16d01e442e06bf9045fb6bae33620b6\",\"dweb:/ipfs/QmSsExCBsQihFeeGo11ZNdc2jCbDUj4zXjjpw4Ldr8en9o\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b031990811673c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f17825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c806380faa57d116100ee578063c8f33c9111610097578063e7d2799811610071578063e7d27998146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063c8f33c91146103b1578063cd3daf9d146103b9578063df136d65146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b14610378578063a694fc3a14610394576101ad565b806380faa57d1461032d5780638b876347146103355780638da5889714610368576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b6101e5610cc8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cdb565b6101e5610ced565b610232610cf3565b610380610d0f565b604080519115158252519081900360200190f35b61028e600480360360208110156103aa57600080fd5b5035610d4f565b6101e5610ee7565b6101e5610eed565b6101e5610f41565b610232610f47565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610eed565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d0f565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610eed565b600a556105cd610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610eed565b600a556107f3610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610eed565b600a556109a4610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d0f565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cd642600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d336111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d58610eed565b600a55610d63610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610dc457610d8b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ea457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ead8261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610ef76105ab565b610f045750600a546105af565b610cd6610f32610f126105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610cc8565b600a549063ffffffff61110116565b600a5481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d0f565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820cb08a1ec08858e9b3d90664bc98033b0635ec1957a0a314e96a3c9a7cd87979964736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c806380faa57d116100ee578063c8f33c9111610097578063e7d2799811610071578063e7d27998146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063c8f33c91146103b1578063cd3daf9d146103b9578063df136d65146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b14610378578063a694fc3a14610394576101ad565b806380faa57d1461032d5780638b876347146103355780638da5889714610368576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b6101e5610cc8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cdb565b6101e5610ced565b610232610cf3565b610380610d0f565b604080519115158252519081900360200190f35b61028e600480360360208110156103aa57600080fd5b5035610d4f565b6101e5610ee7565b6101e5610eed565b6101e5610f41565b610232610f47565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610eed565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d0f565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610eed565b600a556105cd610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610eed565b600a556107f3610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610eed565b600a556109a4610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d0f565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cd642600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d336111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d58610eed565b600a55610d63610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610dc457610d8b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ea457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ead8261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610ef76105ab565b610f045750600a546105af565b610cd6610f32610f126105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610cc8565b600a549063ffffffff61110116565b600a5481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d0f565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820cb08a1ec08858e9b3d90664bc98033b0635ec1957a0a314e96a3c9a7cd87979964736f6c63430005110032", - "sourceMap": "22371:3901:7:-;;;21553:70;;;-1:-1:-1;;;;;;21553:70:7;;;21580:42;21553:70;;;22445;;;;;;22472:42;22445:70;;;22611:10;22584:37;;22665:31;;;;22702:29;;9510:12;-1:-1:-1;;;;;9510:10:7;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:7;-1:-1:-1;;;;;9501:21:7;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:7;;-1:-1:-1;;9537:40:7;22371:3901;;8448:96;8527:10;8448:96;:::o;22371:3901::-;;;;;;;", - "deployedSourceMap": "22371:3901:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22371:3901:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24122:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24122:259:7;;;;:::i;:::-;;;;;;;;;;;;;;;;22876:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22876:42:7;;;;:::i;22445:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:7;;;;:::i;:::-;;20906:33;;;:::i;21716:89::-;;;:::i;22521:41::-;;;:::i;24673:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24673:210:7;;:::i;25438:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25438:832:7;;:::i;24989:443::-;;;:::i;21811:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21811:108:7;;;;:::i;10445:137::-;;;:::i;22702:29::-;;;:::i;23573:129::-;;;:::i;22813:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22813:57:7;;;;:::i;22584:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;24469:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24469:198:7;;:::i;22737:29::-;;;:::i;23708:408::-;;;:::i;22772:35::-;;;:::i;21553:70::-;;;:::i;24889:94::-;;;:::i;22665:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:7;;;;:::i;24122:259::-;24357:16;;;24176:7;24357:16;;;:7;:16;;;;;;;;;24275:22;:31;;;;;;24214:160;;24357:16;24214:121;;24330:4;;24214:94;;24254:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24214:18;24224:7;24214:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24195:179;24122:259;-1:-1:-1;;24122:259:7:o;22876:42::-;;;;;;;;;;;;;:::o;22445:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21716:89::-;21786:12;;21716:89;;:::o;22521:41::-;22556:6;22521:41;:::o;24673:210::-;24727:10;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;23199:9;;23180:15;:28;;23172:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24777:1;24768:6;:10;24760:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24810:22;24825:6;24810:14;:22::i;:::-;24847:29;;;;;;;;24857:10;;24847:29;;;;;;;;;;24673:210;;:::o;25438:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25559:1;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;25599:9;;25581:15;:27;25577:687;;;25645:12;;25626:15;:31;25622:310;;25688:20;:6;22556;25688:20;:10;:20;:::i;:::-;25675:10;:33;25622:310;;;25763:12;;25743:17;;25763:33;;25780:15;25763:33;:16;:33;:::i;:::-;25743:53;;25812:16;25831:25;25845:10;;25831:9;:13;;:25;;;;:::i;:::-;25812:44;-1:-1:-1;25885:34:7;22556:6;25885:20;:6;25812:44;25885:20;:10;:20;:::i;:34::-;25872:10;:47;-1:-1:-1;;25622:310:7;25960:15;25943:14;:32;;;26002:29;;22556:6;26002:29;:19;:29;:::i;:::-;25987:12;:44;26048:19;;;;;;;;;;;;;;;;;25577:687;;;26109:20;:6;22556;26109:20;:10;:20;:::i;:::-;26096:10;:33;26158:9;;26141:14;:26;;;26194:23;;22556:6;26194:23;:13;:23;:::i;:::-;26179:12;:38;26234:19;;;;;;;;;;;;;;;;;25577:687;21139:1;25438:832;:::o;24989:443::-;25030:10;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;23199:9;;23180:15;:28;;23172:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25063:14;25080:18;25087:10;25080:6;:18::i;:::-;25063:35;-1:-1:-1;25112:10:7;;25108:318;;25146:10;25160:1;25138:19;;;:7;:19;;;;;;;;:23;;;25211:3;;25199:37;;;;;;;25138:19;25211:3;;;;25199:35;;:37;;;;;;;;;;;25160:1;25211:3;25199:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25199:37:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25199:37:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25199:37:7;;-1:-1:-1;25250:18:7;25271:37;25301:6;25271:25;:6;25199:37;25271:25;:10;:25;:::i;:37::-;25322:3;;25250:58;;-1:-1:-1;25322:40:7;;:3;;25339:10;25250:58;25322:40;:16;:40;:::i;:::-;25381:34;;;;;;;;25392:10;;25381:34;;;;;;;;;;25108:318;;23231:1;24989:443;:::o;21811:108::-;21894:18;;21868:7;21894:18;;;:9;:18;;;;;;;21811:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22702:29::-;;;;:::o;23573:129::-;23630:7;23656:39;23665:15;23682:12;;23656:8;:39::i;:::-;23649:46;;23573:129;:::o;22813:57::-;;;;;;;;;;;;;:::o;22584:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;24469:198::-;24520:10;23317:16;:14;:16::i;:::-;23294:20;:39;23360:26;:24;:26::i;:::-;23343:14;:43;23400:21;;;;23396:154;;23456:15;23463:7;23456:6;:15::i;:::-;23437:16;;;;;;;:7;:16;;;;;;;;:34;;;;23519:20;;23485:22;:31;;;;;;:54;23396:154;23199:9;;23180:15;:28;;23172:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24570:1;24561:6;:10;24553:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24600:19;24612:6;24600:11;:19::i;:::-;24634:26;;;;;;;;24641:10;;24634:26;;;;;;;;;;24469:198;;:::o;22737:29::-;;;;:::o;23708:408::-;23755:7;23778:13;:11;:13::i;:::-;23774:76;;-1:-1:-1;23819:20:7;;23812:27;;23774:76;23878:231;23920:175;24081:13;:11;:13::i;:::-;23920:135;24050:4;23920:104;24013:10;;23920:67;23972:14;;23920:26;:24;:26::i;:175::-;23878:20;;;:231;:24;:231;:::i;22772:35::-;;;;:::o;21553:70::-;;;;;;:::o;24889:94::-;24924:31;24933:21;24943:10;24933:9;:21::i;:::-;24924:8;:31::i;:::-;24965:11;:9;:11::i;:::-;24889:94::o;22665:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:7:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:7;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22157:210;22223:12;;:24;;22240:6;22223:24;:16;:24;:::i;:::-;22208:12;:39;22291:10;22281:21;;;;:9;:21;;;;;;:33;;22307:6;22281:33;:25;:33;:::i;:::-;22267:10;22257:21;;;;:9;:21;;;;;:57;;;;22324:3;;:36;;22257:21;22324:3;;;;22353:6;22324:16;:36::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:7;;;;;;;;25:18:-1;;61:17;;17776:58:7;182:15:-1;17799:23:7;179:29:-1;160:49;;17750:85:7;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:7;;1848:104;-1:-1:-1;1848:104:7:o;21925:226::-;21988:12;;:24;;22005:6;21988:24;:16;:24;:::i;:::-;21973:12;:39;22056:10;22046:21;;;;:9;:21;;;;;;:33;;22072:6;22046:33;:25;:33;:::i;:::-;22032:10;22022:21;;;;:9;:21;;;;;:57;;;;22089:3;;:55;;22022:21;22089:3;;;;22130:4;22137:6;22089:20;:55::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:7;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:7;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:7:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:7;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:7;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:7;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:7;;;;;;;;25:18:-1;;61:17;;17974:68:7;182:15:-1;17997:27:7;179:29:-1;160:49;;17948:95:7;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:7:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public snx = IERC20(0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n snx.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n snx.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMSNXPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart() {\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMSNXPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMSNXPool.sol", - "exportedSymbols": { - "Address": [ - 8497 - ], - "Context": [ - 8243 - ], - "IERC20": [ - 8423 - ], - "IRewardDistributionRecipient": [ - 8748 - ], - "LPTokenWrapper": [ - 8864 - ], - "Math": [ - 8031 - ], - "Ownable": [ - 8355 - ], - "SafeERC20": [ - 8713 - ], - "SafeMath": [ - 8217 - ], - "YAM": [ - 8755 - ], - "YAMSNXPool": [ - 9283 - ] - }, - "id": 9284, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 7964, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 8031, - "linearizedBaseContracts": [ - 8031 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 7980, - "nodeType": "Block", - "src": "1739:38:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7973, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7966, - "src": "1756:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7974, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7968, - "src": "1761:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 7977, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7968, - "src": "1769:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:7", - "trueExpression": { - "argumentTypes": null, - "id": 7976, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7966, - "src": "1765:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7972, - "id": 7979, - "nodeType": "Return", - "src": "1749:21:7" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 7981, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7969, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7966, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 7981, - "src": "1685:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7965, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7968, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 7981, - "src": "1696:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7967, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:7" - }, - "returnParameters": { - "id": 7972, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7971, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7981, - "src": "1730:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7970, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:7" - }, - "scope": 8031, - "src": "1672:105:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7997, - "nodeType": "Block", - "src": "1915:37:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7990, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7983, - "src": "1932:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 7991, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7985, - "src": "1936:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 7994, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7985, - "src": "1944:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:7", - "trueExpression": { - "argumentTypes": null, - "id": 7993, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7983, - "src": "1940:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7989, - "id": 7996, - "nodeType": "Return", - "src": "1925:20:7" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 7998, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7983, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 7998, - "src": "1861:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7982, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7985, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 7998, - "src": "1872:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7984, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:7" - }, - "returnParameters": { - "id": 7989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7988, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7998, - "src": "1906:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7987, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:7" - }, - "scope": 8031, - "src": "1848:104:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8029, - "nodeType": "Block", - "src": "2136:119:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8007, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8000, - "src": "2208:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8010, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8011, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8002, - "src": "2218:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8014, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8016, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8000, - "src": "2229:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8019, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8002, - "src": "2237:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8023, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8026, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8006, - "id": 8028, - "nodeType": "Return", - "src": "2200:48:7" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 8030, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8003, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8000, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8030, - "src": "2082:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7999, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8002, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8030, - "src": "2093:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8001, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:7" - }, - "returnParameters": { - "id": 8006, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8005, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8030, - "src": "2127:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:7" - }, - "scope": 8031, - "src": "2065:190:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "1589:668:7" - }, - { - "id": 8032, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 8217, - "linearizedBaseContracts": [ - 8217 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 8056, - "nodeType": "Block", - "src": "3212:109:7", - "statements": [ - { - "assignments": [ - 8042 - ], - "declarations": [ - { - "constant": false, - "id": 8042, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8056, - "src": "3222:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8041, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8046, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8043, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8034, - "src": "3234:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 8044, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8036, - "src": "3238:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8048, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "3257:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8049, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8034, - "src": "3262:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 8051, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 8047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8053, - "nodeType": "ExpressionStatement", - "src": "3249:46:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8054, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "3313:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8040, - "id": 8055, - "nodeType": "Return", - "src": "3306:8:7" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 8057, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8037, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8034, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8057, - "src": "3158:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8033, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8036, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8057, - "src": "3169:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:7" - }, - "returnParameters": { - "id": 8040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8039, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8057, - "src": "3203:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8038, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:7" - }, - "scope": 8217, - "src": "3145:176:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8072, - "nodeType": "Block", - "src": "3652:67:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8067, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8059, - "src": "3673:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8068, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8061, - "src": "3676:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 8069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 8066, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 8073, - 8100 - ], - "referencedDeclaration": 8100, - "src": "3669:3:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8065, - "id": 8071, - "nodeType": "Return", - "src": "3662:50:7" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 8073, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8062, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8059, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8073, - "src": "3598:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8058, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8061, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8073, - "src": "3609:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8060, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:7" - }, - "returnParameters": { - "id": 8065, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8064, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8073, - "src": "3643:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8063, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:7" - }, - "scope": 8217, - "src": "3585:134:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8099, - "nodeType": "Block", - "src": "4138:92:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8085, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8077, - "src": "4156:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 8086, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8075, - "src": "4161:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 8088, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8079, - "src": "4164:12:7", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 8084, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8090, - "nodeType": "ExpressionStatement", - "src": "4148:29:7" - }, - { - "assignments": [ - 8092 - ], - "declarations": [ - { - "constant": false, - "id": 8092, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8099, - "src": "4187:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8096, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8093, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8075, - "src": "4199:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 8094, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8077, - "src": "4203:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8097, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8092, - "src": "4222:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8083, - "id": 8098, - "nodeType": "Return", - "src": "4215:8:7" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 8100, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8080, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8075, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4056:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8074, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8077, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4067:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8076, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8079, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4078:26:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8078, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:7", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:7" - }, - "returnParameters": { - "id": 8083, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8082, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4129:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8081, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:7" - }, - "scope": 8217, - "src": "4043:187:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8133, - "nodeType": "Block", - "src": "4537:392:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8109, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8102, - "src": "4769:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8115, - "nodeType": "IfStatement", - "src": "4765:45:7", - "trueBody": { - "id": 8114, - "nodeType": "Block", - "src": "4777:33:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8112, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 8108, - "id": 8113, - "nodeType": "Return", - "src": "4791:8:7" - } - ] - } - }, - { - "assignments": [ - 8117 - ], - "declarations": [ - { - "constant": false, - "id": 8117, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8133, - "src": "4820:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8116, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8121, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8118, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8102, - "src": "4832:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 8119, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8104, - "src": "4836:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8123, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8117, - "src": "4855:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8124, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8102, - "src": "4859:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8126, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8104, - "src": "4864:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 8128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 8122, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8130, - "nodeType": "ExpressionStatement", - "src": "4847:56:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8131, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8117, - "src": "4921:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8108, - "id": 8132, - "nodeType": "Return", - "src": "4914:8:7" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 8134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8102, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8134, - "src": "4483:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8104, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8134, - "src": "4494:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:7" - }, - "returnParameters": { - "id": 8108, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8107, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8134, - "src": "4528:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8106, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:7" - }, - "scope": 8217, - "src": "4470:459:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8149, - "nodeType": "Block", - "src": "5451:63:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8144, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8136, - "src": "5472:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8145, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8138, - "src": "5475:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 8146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 8143, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 8150, - 8177 - ], - "referencedDeclaration": 8177, - "src": "5468:3:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8142, - "id": 8148, - "nodeType": "Return", - "src": "5461:46:7" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 8150, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8139, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8136, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8150, - "src": "5397:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8135, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8138, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8150, - "src": "5408:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8137, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:7" - }, - "returnParameters": { - "id": 8142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8141, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8150, - "src": "5442:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:7" - }, - "scope": 8217, - "src": "5384:130:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8176, - "nodeType": "Block", - "src": "6124:243:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8162, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8154, - "src": "6208:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 8165, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8156, - "src": "6215:12:7", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 8161, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8167, - "nodeType": "ExpressionStatement", - "src": "6200:28:7" - }, - { - "assignments": [ - 8169 - ], - "declarations": [ - { - "constant": false, - "id": 8169, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8176, - "src": "6238:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8168, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8173, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8170, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8152, - "src": "6250:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8171, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8154, - "src": "6254:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8174, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8169, - "src": "6359:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8160, - "id": 8175, - "nodeType": "Return", - "src": "6352:8:7" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 8177, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8152, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6042:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8151, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8154, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6053:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8153, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8156, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6064:26:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8155, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:7", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:7" - }, - "returnParameters": { - "id": 8160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8159, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6115:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:7" - }, - "scope": 8217, - "src": "6029:338:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8192, - "nodeType": "Block", - "src": "6878:61:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8187, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8179, - "src": "6899:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8188, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8181, - "src": "6902:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 8189, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 8186, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 8193, - 8216 - ], - "referencedDeclaration": 8216, - "src": "6895:3:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8185, - "id": 8191, - "nodeType": "Return", - "src": "6888:44:7" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 8193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8182, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8179, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8193, - "src": "6824:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8178, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8181, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8193, - "src": "6835:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:7" - }, - "returnParameters": { - "id": 8185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8184, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8193, - "src": "6869:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8183, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:7" - }, - "scope": 8217, - "src": "6811:128:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8215, - "nodeType": "Block", - "src": "7538:68:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8205, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8197, - "src": "7556:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8206, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 8208, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8199, - "src": "7564:12:7", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 8204, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8210, - "nodeType": "ExpressionStatement", - "src": "7548:29:7" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8211, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8195, - "src": "7594:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 8212, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8197, - "src": "7598:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8203, - "id": 8214, - "nodeType": "Return", - "src": "7587:12:7" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 8216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8195, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7456:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8197, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7467:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8196, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8199, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7478:26:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8198, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:7", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:7" - }, - "returnParameters": { - "id": 8203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8202, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7529:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:7" - }, - "scope": 8217, - "src": "7443:163:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "2900:4708:7" - }, - { - "id": 8218, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8243, - "linearizedBaseContracts": [ - 8243 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 8221, - "nodeType": "Block", - "src": "8386:3:7", - "statements": [] - }, - "documentation": null, - "id": 8222, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8219, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:7" - }, - "returnParameters": { - "id": 8220, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:7" - }, - "scope": 8243, - "src": "8362:27:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8230, - "nodeType": "Block", - "src": "8510:34:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8227, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 8226, - "id": 8229, - "nodeType": "Return", - "src": "8520:17:7" - } - ] - }, - "documentation": null, - "id": 8231, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8223, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:7" - }, - "returnParameters": { - "id": 8226, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8225, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8231, - "src": "8493:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 8224, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:7", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:7" - }, - "scope": 8243, - "src": "8448:96:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8241, - "nodeType": "Block", - "src": "8607:165:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8236, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19395, - "src": "8617:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$8243", - "typeString": "contract Context" - } - }, - "id": 8237, - "nodeType": "ExpressionStatement", - "src": "8617:4:7" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8238, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 8235, - "id": 8240, - "nodeType": "Return", - "src": "8750:15:7" - } - ] - }, - "documentation": null, - "id": 8242, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8232, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:7" - }, - "returnParameters": { - "id": 8235, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8234, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8242, - "src": "8593:12:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8233, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:7" - }, - "scope": 8243, - "src": "8550:222:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "8185:589:7" - }, - { - "id": 8244, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:7" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8245, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8243, - "src": "9238:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$8243", - "typeString": "contract Context" - } - }, - "id": 8246, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:7" - } - ], - "contractDependencies": [ - 8243 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 8355, - "linearizedBaseContracts": [ - 8355, - 8243 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8248, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 8355, - "src": "9252:22:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 8254, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 8253, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8250, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 8254, - "src": "9308:29:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8249, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8252, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 8254, - "src": "9339:24:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:7" - }, - "src": "9281:84:7" - }, - { - "body": { - "id": 8269, - "nodeType": "Block", - "src": "9491:93:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8257, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "9501:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8258, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8231, - "src": "9510:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 8259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8261, - "nodeType": "ExpressionStatement", - "src": "9501:21:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:7", - "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": 8263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 8266, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "9570:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8262, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "9537:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8268, - "nodeType": "EmitStatement", - "src": "9532:45:7" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 8270, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8255, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:7" - }, - "returnParameters": { - "id": 8256, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:7" - }, - "scope": 8355, - "src": "9467:117:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8277, - "nodeType": "Block", - "src": "9707:30:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8275, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "9724:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 8274, - "id": 8276, - "nodeType": "Return", - "src": "9717:13:7" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 8278, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8271, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:7" - }, - "returnParameters": { - "id": 8274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8273, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8278, - "src": "9698:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:7" - }, - "scope": 8355, - "src": "9660:77:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8287, - "nodeType": "Block", - "src": "9846:82:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8281, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8299, - "src": "9864:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 8282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 8283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 8280, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8285, - "nodeType": "ExpressionStatement", - "src": "9856:54:7" - }, - { - "id": 8286, - "nodeType": "PlaceholderStatement", - "src": "9920:1:7" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 8288, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8279, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:7" - }, - "src": "9825:103:7", - "visibility": "internal" - }, - { - "body": { - "id": 8298, - "nodeType": "Block", - "src": "10057:46:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8293, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8231, - "src": "10074:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 8294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8295, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "10090:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8292, - "id": 8297, - "nodeType": "Return", - "src": "10067:29:7" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 8299, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8289, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:7" - }, - "returnParameters": { - "id": 8292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8291, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8299, - "src": "10051:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8290, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:7" - }, - "scope": 8355, - "src": "10011:92:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8317, - "nodeType": "Block", - "src": "10491:91:7", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8305, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "10527:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8307, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:7", - "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": 8306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8308, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 8304, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "10506:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8310, - "nodeType": "EmitStatement", - "src": "10501:45:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8311, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "10556:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8313, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:7", - "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": 8312, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8316, - "nodeType": "ExpressionStatement", - "src": "10556:19:7" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 8318, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8302, - "modifierName": { - "argumentTypes": null, - "id": 8301, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8288, - "src": "10481:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:7" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8300, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:7" - }, - "returnParameters": { - "id": 8303, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:7" - }, - "scope": 8355, - "src": "10445:137:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8329, - "nodeType": "Block", - "src": "10793:45:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8326, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8320, - "src": "10822:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8325, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8354, - "src": "10803:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 8327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8328, - "nodeType": "ExpressionStatement", - "src": "10803:28:7" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 8330, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8323, - "modifierName": { - "argumentTypes": null, - "id": 8322, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8288, - "src": "10783:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:7" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8321, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8320, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 8330, - "src": "10758:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8319, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:7" - }, - "returnParameters": { - "id": 8324, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:7" - }, - "scope": 8355, - "src": "10731:107:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8353, - "nodeType": "Block", - "src": "10994:170:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8336, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8332, - "src": "11012:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:7", - "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": 8337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 8341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 8335, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8343, - "nodeType": "ExpressionStatement", - "src": "11004:73:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8345, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "11113:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8346, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8332, - "src": "11121:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8344, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "11092:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8348, - "nodeType": "EmitStatement", - "src": "11087:43:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8349, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "11140:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8350, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8332, - "src": "11149:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8352, - "nodeType": "ExpressionStatement", - "src": "11140:17:7" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 8354, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8333, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8332, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 8354, - "src": "10967:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:7" - }, - "returnParameters": { - "id": 8334, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:7" - }, - "scope": 8355, - "src": "10939:225:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "9218:1948:7" - }, - { - "id": 8356, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 8423, - "linearizedBaseContracts": [ - 8423 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 8361, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8357, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:7" - }, - "returnParameters": { - "id": 8360, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8359, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8361, - "src": "11541:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8358, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:7" - }, - "scope": 8423, - "src": "11495:55:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 8368, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8363, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8368, - "src": "11652:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8362, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:7" - }, - "returnParameters": { - "id": 8367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8366, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8368, - "src": "11692:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:7" - }, - "scope": 8423, - "src": "11633:68:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 8377, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8370, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 8377, - "src": "11939:17:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8369, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8372, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8377, - "src": "11958:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:7" - }, - "returnParameters": { - "id": 8376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8377, - "src": "11992:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8374, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:7" - }, - "scope": 8423, - "src": "11921:77:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 8386, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8382, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8379, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 8386, - "src": "12292:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8381, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8386, - "src": "12307:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8380, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:7" - }, - "returnParameters": { - "id": 8385, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8384, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8386, - "src": "12347:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8383, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:7" - }, - "scope": 8423, - "src": "12273:83:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 8395, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8391, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8388, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8395, - "src": "13026:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8390, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8395, - "src": "13043:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8389, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:7" - }, - "returnParameters": { - "id": 8394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8393, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8395, - "src": "13077:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8392, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:7" - }, - "scope": 8423, - "src": "13009:74:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 8406, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8397, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13412:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8396, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8399, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13428:17:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8398, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8401, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13447:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8400, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:7" - }, - "returnParameters": { - "id": 8405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13481:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8403, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:7" - }, - "scope": 8423, - "src": "13390:97:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 8414, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 8413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8408, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 8414, - "src": "13671:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8407, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8410, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 8414, - "src": "13693:18:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8409, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8412, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8414, - "src": "13713:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:7" - }, - "src": "13656:72:7" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 8422, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 8421, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8416, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 8422, - "src": "13902:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8415, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8418, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8422, - "src": "13925:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8417, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8420, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8422, - "src": "13950:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8419, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:7" - }, - "src": "13887:78:7" - } - ], - "scope": 9284, - "src": "11401:2566:7" - }, - { - "id": 8424, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 8497, - "linearizedBaseContracts": [ - 8497 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 8448, - "nodeType": "Block", - "src": "14644:731:7", - "statements": [ - { - "assignments": [ - 8432 - ], - "declarations": [ - { - "constant": false, - "id": 8432, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 8448, - "src": "15083:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 8431, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8433, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:7" - }, - { - "assignments": [ - 8435 - ], - "declarations": [ - { - "constant": false, - "id": 8435, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 8448, - "src": "15109:19:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 8434, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8437, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 8436, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:7" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 8432, - "isOffset": false, - "isSlot": false, - "src": "15274:8:7", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 8426, - "isOffset": false, - "isSlot": false, - "src": "15298:7:7", - "valueSize": 1 - } - } - ], - "id": 8438, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:7" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 8441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8439, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8432, - "src": "15325:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 8440, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 8444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8442, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8432, - "src": "15344:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 8443, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8435, - "src": "15356:11:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8446, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8430, - "id": 8447, - "nodeType": "Return", - "src": "15317:51:7" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 8449, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8427, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8426, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8449, - "src": "14598:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8425, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:7" - }, - "returnParameters": { - "id": 8430, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8429, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8449, - "src": "14638:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8428, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:7" - }, - "scope": 8497, - "src": "14578:797:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8462, - "nodeType": "Block", - "src": "15660:49:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8458, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8451, - "src": "15693:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 8459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 8456, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 8455, - "id": 8461, - "nodeType": "Return", - "src": "15670:32:7" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 8463, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8451, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8463, - "src": "15603:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8450, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:7" - }, - "returnParameters": { - "id": 8455, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8454, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8463, - "src": "15643:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 8453, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:7", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:7" - }, - "scope": 8497, - "src": "15584:125:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8495, - "nodeType": "Block", - "src": "16737:294:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8472, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19401, - "src": "16763:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$8497", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$8497", - "typeString": "library Address" - } - ], - "id": 8471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8475, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8467, - "src": "16780:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 8477, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 8470, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8479, - "nodeType": "ExpressionStatement", - "src": "16747:73:7" - }, - { - "assignments": [ - 8481, - null - ], - "declarations": [ - { - "constant": false, - "id": 8481, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "16886:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8480, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 8489, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 8487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 8485, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8467, - "src": "16925:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8482, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8465, - "src": "16904:9:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 8483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:7", - "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": 8484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 8486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:7", - "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": 8488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8491, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8481, - "src": "16954:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 8492, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 8490, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8494, - "nodeType": "ExpressionStatement", - "src": "16946:78:7" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 8496, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8465, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 8496, - "src": "16685:25:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 8464, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:7", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8467, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8496, - "src": "16712:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8466, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:7" - }, - "returnParameters": { - "id": 8469, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:7" - }, - "scope": 8497, - "src": "16666:365:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "14114:2919:7" - }, - { - "id": 8498, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 8713, - "linearizedBaseContracts": [ - 8713 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 8501, - "libraryName": { - "contractScope": null, - "id": 8499, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8217, - "src": "17610:8:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$8217", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:7", - "typeName": { - "id": 8500, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 8504, - "libraryName": { - "contractScope": null, - "id": 8502, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8497, - "src": "17642:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$8497", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:7", - "typeName": { - "id": 8503, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 8525, - "nodeType": "Block", - "src": "17740:102:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8514, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8506, - "src": "17769:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8517, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8506, - "src": "17799:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 8377, - "src": "17799:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8520, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8508, - "src": "17824:2:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8521, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8510, - "src": "17828:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8515, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8513, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "17750:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8524, - "nodeType": "ExpressionStatement", - "src": "17750:85:7" - } - ] - }, - "documentation": null, - "id": 8526, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8506, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8526, - "src": "17690:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8505, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "17690:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8508, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 8526, - "src": "17704:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8507, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8510, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8526, - "src": "17716:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:7" - }, - "returnParameters": { - "id": 8512, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:7" - }, - "scope": 8713, - "src": "17668:174:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8550, - "nodeType": "Block", - "src": "17938:112:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8538, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8528, - "src": "17967:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8541, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8528, - "src": "17997:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 8406, - "src": "17997:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 8543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8544, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8530, - "src": "18026:4:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8545, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8532, - "src": "18032:2:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8546, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8534, - "src": "18036:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8539, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8540, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8537, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "17948:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8549, - "nodeType": "ExpressionStatement", - "src": "17948:95:7" - } - ] - }, - "documentation": null, - "id": 8551, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8535, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8528, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17874:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8527, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "17874:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8530, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17888:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8532, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17902:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8531, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8534, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17914:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8533, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:7" - }, - "returnParameters": { - "id": 8536, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:7" - }, - "scope": 8713, - "src": "17848:202:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8591, - "nodeType": "Block", - "src": "18132:536:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8561, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "18421:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8564, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8568, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19403, - "src": "18461:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - ], - "id": 8567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8570, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8555, - "src": "18468:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8565, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8553, - "src": "18437:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 8386, - "src": "18437:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 8571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8572, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8574, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 8576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 8560, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8578, - "nodeType": "ExpressionStatement", - "src": "18412:150:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8580, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8553, - "src": "18591:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8583, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8553, - "src": "18621:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 8395, - "src": "18621:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8586, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8555, - "src": "18645:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8587, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "18654:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8581, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8579, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "18572:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8590, - "nodeType": "ExpressionStatement", - "src": "18572:89:7" - } - ] - }, - "documentation": null, - "id": 8592, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8558, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8553, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8592, - "src": "18077:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8552, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "18077:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8555, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8592, - "src": "18091:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8554, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8557, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8592, - "src": "18108:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8556, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:7" - }, - "returnParameters": { - "id": 8559, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:7" - }, - "scope": 8713, - "src": "18056:612:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8626, - "nodeType": "Block", - "src": "18760:196:7", - "statements": [ - { - "assignments": [ - 8602 - ], - "declarations": [ - { - "constant": false, - "id": 8602, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 8626, - "src": "18770:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8601, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8613, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8611, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8598, - "src": "18837:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19403, - "src": "18817:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - ], - "id": 8605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8608, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8596, - "src": "18824:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8603, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8594, - "src": "18793:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 8386, - "src": "18793:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 8609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "18793:43:7", - "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": 8612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8615, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8594, - "src": "18872:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8618, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8594, - "src": "18902:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 8395, - "src": "18902:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8621, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8596, - "src": "18926:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8622, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8602, - "src": "18935:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8616, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8614, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "18853:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8625, - "nodeType": "ExpressionStatement", - "src": "18853:96:7" - } - ] - }, - "documentation": null, - "id": 8627, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8599, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8594, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8627, - "src": "18705:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8593, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "18705:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8596, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8627, - "src": "18719:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8595, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8598, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8627, - "src": "18736:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8597, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:7" - }, - "returnParameters": { - "id": 8600, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:7" - }, - "scope": 8713, - "src": "18674:282:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8662, - "nodeType": "Block", - "src": "19048:241:7", - "statements": [ - { - "assignments": [ - 8637 - ], - "declarations": [ - { - "constant": false, - "id": 8637, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 8662, - "src": "19058:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8636, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8649, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8646, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8633, - "src": "19125:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 8647, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8641, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19403, - "src": "19105:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - ], - "id": 8640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8643, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8631, - "src": "19112:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8638, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8629, - "src": "19081:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 8386, - "src": "19081:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 8644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8100, - "src": "19081:43:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8651, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8629, - "src": "19205:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8654, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8629, - "src": "19235:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 8395, - "src": "19235:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8657, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8631, - "src": "19259:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8658, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8637, - "src": "19268:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8652, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8650, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "19186:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8661, - "nodeType": "ExpressionStatement", - "src": "19186:96:7" - } - ] - }, - "documentation": null, - "id": 8663, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8629, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8663, - "src": "18993:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8628, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "18993:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8631, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8663, - "src": "19007:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8633, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8663, - "src": "19024:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:7" - }, - "returnParameters": { - "id": 8635, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:7" - }, - "scope": 8713, - "src": "18962:327:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8711, - "nodeType": "Block", - "src": "19741:1026:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8672, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8665, - "src": "20275:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - ], - "id": 8671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 8449, - "src": "20267:25:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 8675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 8676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 8670, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8678, - "nodeType": "ExpressionStatement", - "src": "20259:71:7" - }, - { - "assignments": [ - 8680, - 8682 - ], - "declarations": [ - { - "constant": false, - "id": 8680, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 8711, - "src": "20401:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8679, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8682, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 8711, - "src": "20415:23:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8681, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8689, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8687, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8667, - "src": "20462:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8684, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8665, - "src": "20450:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - ], - "id": 8683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:7", - "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": 8688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8691, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8680, - "src": "20485:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 8692, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 8690, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8694, - "nodeType": "ExpressionStatement", - "src": "20477:52:7" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8695, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8682, - "src": "20544:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 8696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8697, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8710, - "nodeType": "IfStatement", - "src": "20540:221:7", - "trueBody": { - "id": 8709, - "nodeType": "Block", - "src": "20567:194:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8702, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8682, - "src": "20684:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 8704, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 8700, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 8705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 8706, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 8699, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8708, - "nodeType": "ExpressionStatement", - "src": "20665:85:7" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 8712, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8668, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8665, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8712, - "src": "19700:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8664, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "19700:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8667, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 8712, - "src": "19714:17:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8666, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:7" - }, - "returnParameters": { - "id": 8669, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:7" - }, - "scope": 8713, - "src": "19672:1095:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 9284, - "src": "17580:3189:7" - }, - { - "id": 8714, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:7" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8715, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8355, - "src": "20892:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$8355", - "typeString": "contract Ownable" - } - }, - "id": 8716, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:7" - } - ], - "contractDependencies": [ - 8243, - 8355 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 8748, - "linearizedBaseContracts": [ - 8748, - 8355, - 8243 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8718, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 8748, - "src": "20906:33:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 8723, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8721, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8720, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 8723, - "src": "20974:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8719, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:7" - }, - "returnParameters": { - "id": 8722, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:7" - }, - "scope": 8748, - "src": "20946:53:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8734, - "nodeType": "Block", - "src": "21039:108:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8726, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8231, - "src": "21057:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 8727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8728, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8718, - "src": "21073:18:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 8730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 8725, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8732, - "nodeType": "ExpressionStatement", - "src": "21049:80:7" - }, - { - "id": 8733, - "nodeType": "PlaceholderStatement", - "src": "21139:1:7" - } - ] - }, - "documentation": null, - "id": 8735, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8724, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:7" - }, - "src": "21005:142:7", - "visibility": "internal" - }, - { - "body": { - "id": 8746, - "nodeType": "Block", - "src": "21252:57:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8742, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8718, - "src": "21262:18:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8743, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8737, - "src": "21283:19:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8745, - "nodeType": "ExpressionStatement", - "src": "21262:40:7" - } - ] - }, - "documentation": null, - "id": 8747, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8740, - "modifierName": { - "argumentTypes": null, - "id": 8739, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8288, - "src": "21238:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:7" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8738, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8737, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 8747, - "src": "21184:27:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:7" - }, - "returnParameters": { - "id": 8741, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:7" - }, - "scope": 8748, - "src": "21153:156:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 9284, - "src": "20851:460:7" - }, - { - "id": 8749, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 8755, - "linearizedBaseContracts": [ - 8755 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 8754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8750, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:7" - }, - "returnParameters": { - "id": 8753, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8752, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8754, - "src": "21443:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8751, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:7" - }, - "scope": 8755, - "src": "21396:56:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 9284, - "src": "21376:78:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8864, - "linearizedBaseContracts": [ - 8864 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 8758, - "libraryName": { - "contractScope": null, - "id": 8756, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8217, - "src": "21494:8:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$8217", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:7", - "typeName": { - "id": 8757, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 8761, - "libraryName": { - "contractScope": null, - "id": 8759, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8713, - "src": "21526:9:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:7", - "typeName": { - "contractScope": null, - "id": 8760, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "21540:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 8766, - "name": "snx", - "nodeType": "VariableDeclaration", - "scope": 8864, - "src": "21553:70:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8762, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "21553:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307843303131613733656538353736466234364635453163353735316341334239466530616632613646", - "id": 8764, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21580:42:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 8763, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8423, - "src": "21573:6:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$8423_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8765, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21573:50:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8768, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 8864, - "src": "21630:28:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8767, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21630:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 8772, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 8864, - "src": "21664:45:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 8771, - "keyType": { - "id": 8769, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21672:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21664:27:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 8770, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21683:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 8779, - "nodeType": "Block", - "src": "21769:36:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8777, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "21786:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8776, - "id": 8778, - "nodeType": "Return", - "src": "21779:19:7" - } - ] - }, - "documentation": null, - "id": 8780, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8773, - "nodeType": "ParameterList", - "parameters": [], - "src": "21736:2:7" - }, - "returnParameters": { - "id": 8776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8775, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8780, - "src": "21760:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8774, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21760:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21759:9:7" - }, - "scope": 8864, - "src": "21716:89:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8791, - "nodeType": "Block", - "src": "21877:42:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8787, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "21894:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8789, - "indexExpression": { - "argumentTypes": null, - "id": 8788, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8782, - "src": "21904:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21894:18:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8786, - "id": 8790, - "nodeType": "Return", - "src": "21887:25:7" - } - ] - }, - "documentation": null, - "id": 8792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8783, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8782, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8792, - "src": "21830:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8781, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21830:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21829:17:7" - }, - "returnParameters": { - "id": 8786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8785, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8792, - "src": "21868:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8784, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21868:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21867:9:7" - }, - "scope": 8864, - "src": "21811:108:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8828, - "nodeType": "Block", - "src": "21963:188:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8797, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "21973:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8800, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8794, - "src": "22005:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8798, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "21988:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "21988:16:7", - "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": 8801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21988:24:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21973:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8803, - "nodeType": "ExpressionStatement", - "src": "21973:39:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8804, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22022:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8807, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8805, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22032:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22032:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22022:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8813, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8794, - "src": "22072:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8808, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22046:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8811, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8809, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22056:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22056:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22046:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "22046:25:7", - "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": 8814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22046:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22022:57:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8816, - "nodeType": "ExpressionStatement", - "src": "22022:57:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8820, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22110:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22110:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8823, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19409, - "src": "22130:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$8864", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$8864", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 8822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22122:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22122:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8825, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8794, - "src": "22137:6:7", - "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, - "id": 8817, - "name": "snx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8766, - "src": "22089:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 8551, - "src": "22089:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$8423_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 8826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22089:55:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8827, - "nodeType": "ExpressionStatement", - "src": "22089:55:7" - } - ] - }, - "documentation": null, - "id": 8829, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8795, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8794, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8829, - "src": "21940:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8793, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21940:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21939:16:7" - }, - "returnParameters": { - "id": 8796, - "nodeType": "ParameterList", - "parameters": [], - "src": "21963:0:7" - }, - "scope": 8864, - "src": "21925:226:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8862, - "nodeType": "Block", - "src": "22198:169:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8834, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "22208:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8837, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8831, - "src": "22240:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8835, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "22223:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "22223:16:7", - "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": 8838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22223:24:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22208:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8840, - "nodeType": "ExpressionStatement", - "src": "22208:39:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8841, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22257:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8844, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8842, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22267:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22267:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22257:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8850, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8831, - "src": "22307:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8845, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22281:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8848, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8846, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22291:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22291:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22281:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "22281:25:7", - "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": 8851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22281:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22257:57:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8853, - "nodeType": "ExpressionStatement", - "src": "22257:57:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8857, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22341:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22341:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 8859, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8831, - "src": "22353:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8854, - "name": "snx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8766, - "src": "22324:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 8526, - "src": "22324:16:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$8423_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 8860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22324:36:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8861, - "nodeType": "ExpressionStatement", - "src": "22324:36:7" - } - ] - }, - "documentation": null, - "id": 8863, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8831, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8863, - "src": "22175:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22175:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22174:16:7" - }, - "returnParameters": { - "id": 8833, - "nodeType": "ParameterList", - "parameters": [], - "src": "22198:0:7" - }, - "scope": 8864, - "src": "22157:210:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 9284, - "src": "21458:911:7" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8865, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8864, - "src": "22394:14:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$8864", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 8866, - "nodeType": "InheritanceSpecifier", - "src": "22394:14:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8867, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8748, - "src": "22410:28:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$8748", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 8868, - "nodeType": "InheritanceSpecifier", - "src": "22410:28:7" - } - ], - "contractDependencies": [ - 8243, - 8355, - 8748, - 8864 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 9283, - "linearizedBaseContracts": [ - 9283, - 8748, - 8355, - 8243, - 8864 - ], - "name": "YAMSNXPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8873, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22445:70:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8869, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "22445:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 8871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22472:42:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 8870, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8423, - "src": "22465:6:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$8423_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22465:50:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 8876, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22521:41:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8874, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22521:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 8875, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22556:6:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8879, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22584:37:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22584:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 8878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22611:10:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8882, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22665:31:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8880, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22665:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 8881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22695:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8885, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22702:29:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8883, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22702:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 8884, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22730:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8887, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22737:29:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22737:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8889, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22772:35:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8888, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22772:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8893, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22813:57:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 8892, - "keyType": { - "id": 8890, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22821:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22813:27:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 8891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22832:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8897, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22876:42:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 8896, - "keyType": { - "id": 8894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22884:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22876:27:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 8895, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22895:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 8901, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 8900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8899, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 8901, - "src": "22943:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22943:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22942:16:7" - }, - "src": "22925:34:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 8907, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 8906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8903, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 8907, - "src": "22977:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22977:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8905, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8907, - "src": "22999:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22999:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22976:38:7" - }, - "src": "22964:51:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 8913, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 8912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8909, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 8913, - "src": "23036:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23036:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8911, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8913, - "src": "23058:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23058:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23035:38:7" - }, - "src": "23020:54:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 8919, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 8918, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8915, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 8919, - "src": "23096:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8914, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23096:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8917, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 8919, - "src": "23118:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8916, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23118:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23095:38:7" - }, - "src": "23079:55:7" - }, - { - "body": { - "id": 8930, - "nodeType": "Block", - "src": "23162:77:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8922, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23180:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 8923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23180:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8924, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "23199:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23180:28:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 8926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23209:11:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 8921, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23172:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23172:49:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8928, - "nodeType": "ExpressionStatement", - "src": "23172:49:7" - }, - { - "id": 8929, - "nodeType": "PlaceholderStatement", - "src": "23231:1:7" - } - ] - }, - "documentation": null, - "id": 8931, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8920, - "nodeType": "ParameterList", - "parameters": [], - "src": "23159:2:7" - }, - "src": "23140:99:7", - "visibility": "internal" - }, - { - "body": { - "id": 8967, - "nodeType": "Block", - "src": "23284:283:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8935, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23294:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8936, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9014, - "src": "23317:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23317:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23294:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8939, - "nodeType": "ExpressionStatement", - "src": "23294:39:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8940, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "23343:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8941, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8981, - "src": "23360:24:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23360:26:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23343:43:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8944, - "nodeType": "ExpressionStatement", - "src": "23343:43:7" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8945, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23400:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8947, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23419:1:7", - "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": 8946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23411:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23411:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23400:21:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8965, - "nodeType": "IfStatement", - "src": "23396:154:7", - "trueBody": { - "id": 8964, - "nodeType": "Block", - "src": "23423:127:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8950, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8897, - "src": "23437:7:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8952, - "indexExpression": { - "argumentTypes": null, - "id": 8951, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23445:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23437:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8954, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23463:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8953, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9043, - "src": "23456:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 8955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23456:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23437:34:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8957, - "nodeType": "ExpressionStatement", - "src": "23437:34:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8958, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8893, - "src": "23485:22:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8960, - "indexExpression": { - "argumentTypes": null, - "id": 8959, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23508:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23485:31:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8961, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23519:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23485:54:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8963, - "nodeType": "ExpressionStatement", - "src": "23485:54:7" - } - ] - } - }, - { - "id": 8966, - "nodeType": "PlaceholderStatement", - "src": "23559:1:7" - } - ] - }, - "documentation": null, - "id": 8968, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8934, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8933, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8968, - "src": "23267:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8932, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23267:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23266:17:7" - }, - "src": "23245:322:7", - "visibility": "internal" - }, - { - "body": { - "id": 8980, - "nodeType": "Block", - "src": "23639:63:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8975, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23665:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 8976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23665:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8977, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "23682:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8973, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8031, - "src": "23656:4:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$8031_$", - "typeString": "type(library Math)" - } - }, - "id": 8974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 7998, - "src": "23656:8:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 8978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23656:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8972, - "id": 8979, - "nodeType": "Return", - "src": "23649:46:7" - } - ] - }, - "documentation": null, - "id": 8981, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8969, - "nodeType": "ParameterList", - "parameters": [], - "src": "23606:2:7" - }, - "returnParameters": { - "id": 8972, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8971, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8981, - "src": "23630:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8970, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23630:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23629:9:7" - }, - "scope": 9283, - "src": "23573:129:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9013, - "nodeType": "Block", - "src": "23764:352:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8986, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8780, - "src": "23778:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23778:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23795:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23778:18:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8993, - "nodeType": "IfStatement", - "src": "23774:76:7", - "trueBody": { - "id": 8992, - "nodeType": "Block", - "src": "23798:52:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8990, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23819:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8985, - "id": 8991, - "nodeType": "Return", - "src": "23812:27:7" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9008, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8780, - "src": "24081:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 9009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24081:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 9005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24050:4:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9002, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "24013:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8999, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "23972:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8996, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8981, - "src": "23920:24:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:26:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "23920:51:7", - "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": 9000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:67:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "23920:92:7", - "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": 9003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:104:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "23920:129:7", - "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": 9006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:135:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "23920:160:7", - "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": 9010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:175:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8994, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23878:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "23878:24:7", - "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": 9011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23878:231:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8985, - "id": 9012, - "nodeType": "Return", - "src": "23859:250:7" - } - ] - }, - "documentation": null, - "id": 9014, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8982, - "nodeType": "ParameterList", - "parameters": [], - "src": "23731:2:7" - }, - "returnParameters": { - "id": 8985, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8984, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9014, - "src": "23755:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8983, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23755:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23754:9:7" - }, - "scope": 9283, - "src": "23708:408:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9042, - "nodeType": "Block", - "src": "24185:196:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 9037, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8897, - "src": "24357:7:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 9039, - "indexExpression": { - "argumentTypes": null, - "id": 9038, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9016, - "src": "24365:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24357:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 9034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24330:4:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 9028, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8893, - "src": "24275:22:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 9030, - "indexExpression": { - "argumentTypes": null, - "id": 9029, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9016, - "src": "24298:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24275:31:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9025, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9014, - "src": "24254:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 9026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "24254:20:7", - "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": 9031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:53:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9022, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9016, - "src": "24224:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9021, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8792, - "src": "24214:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 9023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:18:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "24214:39:7", - "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": 9032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:94:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "24214:115:7", - "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": 9035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:121:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "24214:142:7", - "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": 9040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:160:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9020, - "id": 9041, - "nodeType": "Return", - "src": "24195:179:7" - } - ] - }, - "documentation": null, - "id": 9043, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9017, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9016, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9043, - "src": "24138:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9015, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24138:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24137:17:7" - }, - "returnParameters": { - "id": 9020, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9019, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9043, - "src": "24176:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9018, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24176:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24175:9:7" - }, - "scope": 9283, - "src": "24122:259:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9073, - "nodeType": "Block", - "src": "24543:124:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9055, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9045, - "src": "24561:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24570:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24561:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 9058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24573:16:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 9054, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24553:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24553:37:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9060, - "nodeType": "ExpressionStatement", - "src": "24553:37:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9064, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9045, - "src": "24612:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9061, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19412, - "src": "24600:5:7", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMSNXPool_$9283", - "typeString": "contract super YAMSNXPool" - } - }, - "id": 9063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 8829, - "src": "24600:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24600:19:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9066, - "nodeType": "ExpressionStatement", - "src": "24600:19:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9068, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24641:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24641:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9070, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9045, - "src": "24653:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9067, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8907, - "src": "24634:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 9071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24634:26:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9072, - "nodeType": "EmitStatement", - "src": "24629:31:7" - } - ] - }, - "documentation": null, - "id": 9074, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9048, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24520:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24520:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9050, - "modifierName": { - "argumentTypes": null, - "id": 9047, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "24507:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24507:24:7" - }, - { - "arguments": null, - "id": 9052, - "modifierName": { - "argumentTypes": null, - "id": 9051, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8931, - "src": "24532:10:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24532:10:7" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9045, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9074, - "src": "24484:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24484:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24483:16:7" - }, - "returnParameters": { - "id": 9053, - "nodeType": "ParameterList", - "parameters": [], - "src": "24543:0:7" - }, - "scope": 9283, - "src": "24469:198:7", - "stateMutability": "nonpayable", - "superFunction": 8829, - "visibility": "public" - }, - { - "body": { - "id": 9104, - "nodeType": "Block", - "src": "24750:133:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9086, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9076, - "src": "24768:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9087, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24777:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24768:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 9089, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24780:19:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 9085, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24760:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24760:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9091, - "nodeType": "ExpressionStatement", - "src": "24760:40:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9095, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9076, - "src": "24825:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9092, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19412, - "src": "24810:5:7", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMSNXPool_$9283", - "typeString": "contract super YAMSNXPool" - } - }, - "id": 9094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 8863, - "src": "24810:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24810:22:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9097, - "nodeType": "ExpressionStatement", - "src": "24810:22:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9099, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24857:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24857:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9101, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9076, - "src": "24869:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9098, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8913, - "src": "24847:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 9102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24847:29:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9103, - "nodeType": "EmitStatement", - "src": "24842:34:7" - } - ] - }, - "documentation": null, - "id": 9105, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9079, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24727:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24727:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9081, - "modifierName": { - "argumentTypes": null, - "id": 9078, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "24714:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24714:24:7" - }, - { - "arguments": null, - "id": 9083, - "modifierName": { - "argumentTypes": null, - "id": 9082, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8931, - "src": "24739:10:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24739:10:7" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9076, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9105, - "src": "24691:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9075, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24691:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24690:16:7" - }, - "returnParameters": { - "id": 9084, - "nodeType": "ParameterList", - "parameters": [], - "src": "24750:0:7" - }, - "scope": 9283, - "src": "24673:210:7", - "stateMutability": "nonpayable", - "superFunction": 8863, - "visibility": "public" - }, - { - "body": { - "id": 9118, - "nodeType": "Block", - "src": "24914:69:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9110, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24943:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24943:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 9109, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8792, - "src": "24933:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 9112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24933:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9108, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9105 - ], - "referencedDeclaration": 9105, - "src": "24924:8:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24924:31:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9114, - "nodeType": "ExpressionStatement", - "src": "24924:31:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9115, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9184, - "src": "24965:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 9116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24965:11:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9117, - "nodeType": "ExpressionStatement", - "src": "24965:11:7" - } - ] - }, - "documentation": null, - "id": 9119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9106, - "nodeType": "ParameterList", - "parameters": [], - "src": "24902:2:7" - }, - "returnParameters": { - "id": 9107, - "nodeType": "ParameterList", - "parameters": [], - "src": "24914:0:7" - }, - "scope": 9283, - "src": "24889:94:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 9183, - "nodeType": "Block", - "src": "25053:379:7", - "statements": [ - { - "assignments": [ - 9129 - ], - "declarations": [ - { - "constant": false, - "id": 9129, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 9183, - "src": "25063:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25063:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9134, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9131, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25087:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25087:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 9130, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9043, - "src": "25080:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 9133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25080:18:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25063:35:7" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9135, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9129, - "src": "25112:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25121:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25112:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 9182, - "nodeType": "IfStatement", - "src": "25108:318:7", - "trueBody": { - "id": 9181, - "nodeType": "Block", - "src": "25124:302:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 9138, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8897, - "src": "25138:7:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 9141, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9139, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25146:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25146:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25138:19:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 9142, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25160:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25138:23:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9144, - "nodeType": "ExpressionStatement", - "src": "25138:23:7" - }, - { - "assignments": [ - 9146 - ], - "declarations": [ - { - "constant": false, - "id": 9146, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 9181, - "src": "25175:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25175:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9154, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9149, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8873, - "src": "25211:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - ], - "id": 9148, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25203:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9147, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8755, - "src": "25199:3:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$8755_$", - "typeString": "type(contract YAM)" - } - }, - "id": 9151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:17:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$8755", - "typeString": "contract YAM" - } - }, - "id": 9152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 8754, - "src": "25199:35:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 9153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:37:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25175:61:7" - }, - { - "assignments": [ - 9156 - ], - "declarations": [ - { - "constant": false, - "id": 9156, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 9181, - "src": "25250:18:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25250:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9166, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 9164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 9162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25301:2:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 9163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25301:6:7", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9159, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9146, - "src": "25282:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9157, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9129, - "src": "25271:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "25271:10:7", - "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": 9160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:25:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "25271:29:7", - "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": 9165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:37:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25250:58:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9170, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25339:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25339:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9172, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9156, - "src": "25351:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9167, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8873, - "src": "25322:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 9169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 8526, - "src": "25322:16:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$8423_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 9173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25322:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9174, - "nodeType": "ExpressionStatement", - "src": "25322:40:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25392:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25392:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9178, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9156, - "src": "25404:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9175, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8919, - "src": "25381:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 9179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25381:34:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9180, - "nodeType": "EmitStatement", - "src": "25376:39:7" - } - ] - } - } - ] - }, - "documentation": null, - "id": 9184, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9122, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25030:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25030:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9124, - "modifierName": { - "argumentTypes": null, - "id": 9121, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "25017:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25017:24:7" - }, - { - "arguments": null, - "id": 9126, - "modifierName": { - "argumentTypes": null, - "id": 9125, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8931, - "src": "25042:10:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25042:10:7" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9120, - "nodeType": "ParameterList", - "parameters": [], - "src": "25007:2:7" - }, - "returnParameters": { - "id": 9127, - "nodeType": "ParameterList", - "parameters": [], - "src": "25053:0:7" - }, - "scope": 9283, - "src": "24989:443:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9281, - "nodeType": "Block", - "src": "25567:703:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9196, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25581:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25581:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 9198, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "25599:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25581:27:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 9279, - "nodeType": "Block", - "src": "26084:180:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9257, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "26096:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9260, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "26120:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9258, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "26109:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "26109:10:7", - "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": 9261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26109:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26096:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9263, - "nodeType": "ExpressionStatement", - "src": "26096:33:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9264, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "26141:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 9265, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "26158:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26141:26:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9267, - "nodeType": "ExpressionStatement", - "src": "26141:26:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9268, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "26179:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9271, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "26208:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9269, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "26194:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "26194:13:7", - "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": 9272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26194:23:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26179:38:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9274, - "nodeType": "ExpressionStatement", - "src": "26179:38:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9276, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "26246:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9275, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8901, - "src": "26234:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26234:19:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9278, - "nodeType": "EmitStatement", - "src": "26229:24:7" - } - ] - }, - "id": 9280, - "nodeType": "IfStatement", - "src": "25577:687:7", - "trueBody": { - "id": 9256, - "nodeType": "Block", - "src": "25610:468:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9200, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25626:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25626:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9202, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "25645:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25626:31:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 9237, - "nodeType": "Block", - "src": "25727:205:7", - "statements": [ - { - "assignments": [ - 9213 - ], - "declarations": [ - { - "constant": false, - "id": 9213, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 9237, - "src": "25743:17:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9212, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25743:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9219, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9216, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25780:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25780:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9214, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "25763:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "25763:16:7", - "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": 9218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25763:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25743:53:7" - }, - { - "assignments": [ - 9221 - ], - "declarations": [ - { - "constant": false, - "id": 9221, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 9237, - "src": "25812:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25812:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9226, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9224, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "25845:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9222, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9213, - "src": "25831:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "25831:13:7", - "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": 9225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25831:25:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25812:44:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9227, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "25872:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9233, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "25910:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9230, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9221, - "src": "25896:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9228, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "25885:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "25885:10:7", - "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": 9231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "25885:24:7", - "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": 9234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:34:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25872:47:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9236, - "nodeType": "ExpressionStatement", - "src": "25872:47:7" - } - ] - }, - "id": 9238, - "nodeType": "IfStatement", - "src": "25622:310:7", - "trueBody": { - "id": 9211, - "nodeType": "Block", - "src": "25659:62:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9204, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "25675:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9207, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "25699:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9205, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "25688:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "25688:10:7", - "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": 9208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25688:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25675:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9210, - "nodeType": "ExpressionStatement", - "src": "25675:33:7" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 9242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9239, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "25943:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9240, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25960:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25960:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25943:32:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9243, - "nodeType": "ExpressionStatement", - "src": "25943:32:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9244, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "25987:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9248, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "26022:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9245, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26002:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26002:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "26002:19:7", - "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": 9249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26002:29:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25987:44:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9251, - "nodeType": "ExpressionStatement", - "src": "25987:44:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9253, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "26060:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9252, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8901, - "src": "26048:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26048:19:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9255, - "nodeType": "EmitStatement", - "src": "26043:24:7" - } - ] - } - } - ] - }, - "documentation": null, - "id": 9282, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 9189, - "modifierName": { - "argumentTypes": null, - "id": 9188, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8735, - "src": "25507:22:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25507:22:7" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9192, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25559:1:7", - "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": 9191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25551:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25551:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9194, - "modifierName": { - "argumentTypes": null, - "id": 9190, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "25538:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25538:24:7" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9187, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9186, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 9282, - "src": "25466:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9185, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25466:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25465:16:7" - }, - "returnParameters": { - "id": 9195, - "nodeType": "ParameterList", - "parameters": [], - "src": "25567:0:7" - }, - "scope": 9283, - "src": "25438:832:7", - "stateMutability": "nonpayable", - "superFunction": 8723, - "visibility": "external" - } - ], - "scope": 9284, - "src": "22371:3901:7" - } - ], - "src": "1490:24783:7" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMSNXPool.sol", - "exportedSymbols": { - "Address": [ - 8497 - ], - "Context": [ - 8243 - ], - "IERC20": [ - 8423 - ], - "IRewardDistributionRecipient": [ - 8748 - ], - "LPTokenWrapper": [ - 8864 - ], - "Math": [ - 8031 - ], - "Ownable": [ - 8355 - ], - "SafeERC20": [ - 8713 - ], - "SafeMath": [ - 8217 - ], - "YAM": [ - 8755 - ], - "YAMSNXPool": [ - 9283 - ] - }, - "id": 9284, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 7964, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 8031, - "linearizedBaseContracts": [ - 8031 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 7980, - "nodeType": "Block", - "src": "1739:38:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7973, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7966, - "src": "1756:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 7974, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7968, - "src": "1761:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 7977, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7968, - "src": "1769:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:7", - "trueExpression": { - "argumentTypes": null, - "id": 7976, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7966, - "src": "1765:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7972, - "id": 7979, - "nodeType": "Return", - "src": "1749:21:7" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 7981, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7969, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7966, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 7981, - "src": "1685:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7965, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7968, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 7981, - "src": "1696:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7967, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:7" - }, - "returnParameters": { - "id": 7972, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7971, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7981, - "src": "1730:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7970, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:7" - }, - "scope": 8031, - "src": "1672:105:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 7997, - "nodeType": "Block", - "src": "1915:37:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 7992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 7990, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7983, - "src": "1932:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 7991, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7985, - "src": "1936:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 7994, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7985, - "src": "1944:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 7995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:7", - "trueExpression": { - "argumentTypes": null, - "id": 7993, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7983, - "src": "1940:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 7989, - "id": 7996, - "nodeType": "Return", - "src": "1925:20:7" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 7998, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 7986, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7983, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 7998, - "src": "1861:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7982, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7985, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 7998, - "src": "1872:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7984, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:7" - }, - "returnParameters": { - "id": 7989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7988, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 7998, - "src": "1906:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7987, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:7" - }, - "scope": 8031, - "src": "1848:104:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8029, - "nodeType": "Block", - "src": "2136:119:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8007, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8000, - "src": "2208:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8010, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8011, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8002, - "src": "2218:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8014, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8016, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8000, - "src": "2229:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8017, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8019, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8002, - "src": "2237:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8023, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 8024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 8026, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8006, - "id": 8028, - "nodeType": "Return", - "src": "2200:48:7" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 8030, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8003, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8000, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8030, - "src": "2082:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7999, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8002, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8030, - "src": "2093:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8001, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:7" - }, - "returnParameters": { - "id": 8006, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8005, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8030, - "src": "2127:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:7" - }, - "scope": 8031, - "src": "2065:190:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "1589:668:7" - }, - { - "id": 8032, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 8217, - "linearizedBaseContracts": [ - 8217 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 8056, - "nodeType": "Block", - "src": "3212:109:7", - "statements": [ - { - "assignments": [ - 8042 - ], - "declarations": [ - { - "constant": false, - "id": 8042, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8056, - "src": "3222:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8041, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8046, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8043, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8034, - "src": "3234:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 8044, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8036, - "src": "3238:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8048, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "3257:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8049, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8034, - "src": "3262:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 8051, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 8047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8053, - "nodeType": "ExpressionStatement", - "src": "3249:46:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8054, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8042, - "src": "3313:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8040, - "id": 8055, - "nodeType": "Return", - "src": "3306:8:7" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 8057, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8037, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8034, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8057, - "src": "3158:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8033, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8036, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8057, - "src": "3169:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8035, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:7" - }, - "returnParameters": { - "id": 8040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8039, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8057, - "src": "3203:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8038, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:7" - }, - "scope": 8217, - "src": "3145:176:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8072, - "nodeType": "Block", - "src": "3652:67:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8067, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8059, - "src": "3673:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8068, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8061, - "src": "3676:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 8069, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 8066, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 8073, - 8100 - ], - "referencedDeclaration": 8100, - "src": "3669:3:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8065, - "id": 8071, - "nodeType": "Return", - "src": "3662:50:7" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 8073, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8062, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8059, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8073, - "src": "3598:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8058, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8061, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8073, - "src": "3609:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8060, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:7" - }, - "returnParameters": { - "id": 8065, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8064, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8073, - "src": "3643:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8063, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:7" - }, - "scope": 8217, - "src": "3585:134:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8099, - "nodeType": "Block", - "src": "4138:92:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8085, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8077, - "src": "4156:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 8086, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8075, - "src": "4161:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 8088, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8079, - "src": "4164:12:7", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 8084, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8090, - "nodeType": "ExpressionStatement", - "src": "4148:29:7" - }, - { - "assignments": [ - 8092 - ], - "declarations": [ - { - "constant": false, - "id": 8092, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8099, - "src": "4187:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8096, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8093, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8075, - "src": "4199:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 8094, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8077, - "src": "4203:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8097, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8092, - "src": "4222:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8083, - "id": 8098, - "nodeType": "Return", - "src": "4215:8:7" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 8100, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8080, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8075, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4056:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8074, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8077, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4067:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8076, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8079, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4078:26:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8078, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:7", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:7" - }, - "returnParameters": { - "id": 8083, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8082, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8100, - "src": "4129:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8081, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:7" - }, - "scope": 8217, - "src": "4043:187:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8133, - "nodeType": "Block", - "src": "4537:392:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8109, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8102, - "src": "4769:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8115, - "nodeType": "IfStatement", - "src": "4765:45:7", - "trueBody": { - "id": 8114, - "nodeType": "Block", - "src": "4777:33:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8112, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 8108, - "id": 8113, - "nodeType": "Return", - "src": "4791:8:7" - } - ] - } - }, - { - "assignments": [ - 8117 - ], - "declarations": [ - { - "constant": false, - "id": 8117, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8133, - "src": "4820:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8116, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8121, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8118, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8102, - "src": "4832:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 8119, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8104, - "src": "4836:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8123, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8117, - "src": "4855:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8124, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8102, - "src": "4859:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8126, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8104, - "src": "4864:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 8128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 8122, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8130, - "nodeType": "ExpressionStatement", - "src": "4847:56:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8131, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8117, - "src": "4921:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8108, - "id": 8132, - "nodeType": "Return", - "src": "4914:8:7" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 8134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8102, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8134, - "src": "4483:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8104, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8134, - "src": "4494:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:7" - }, - "returnParameters": { - "id": 8108, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8107, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8134, - "src": "4528:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8106, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:7" - }, - "scope": 8217, - "src": "4470:459:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8149, - "nodeType": "Block", - "src": "5451:63:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8144, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8136, - "src": "5472:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8145, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8138, - "src": "5475:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 8146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 8143, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 8150, - 8177 - ], - "referencedDeclaration": 8177, - "src": "5468:3:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8142, - "id": 8148, - "nodeType": "Return", - "src": "5461:46:7" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 8150, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8139, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8136, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8150, - "src": "5397:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8135, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8138, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8150, - "src": "5408:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8137, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:7" - }, - "returnParameters": { - "id": 8142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8141, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8150, - "src": "5442:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8140, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:7" - }, - "scope": 8217, - "src": "5384:130:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8176, - "nodeType": "Block", - "src": "6124:243:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8162, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8154, - "src": "6208:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 8165, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8156, - "src": "6215:12:7", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 8161, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8167, - "nodeType": "ExpressionStatement", - "src": "6200:28:7" - }, - { - "assignments": [ - 8169 - ], - "declarations": [ - { - "constant": false, - "id": 8169, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 8176, - "src": "6238:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8168, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8173, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8170, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8152, - "src": "6250:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 8171, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8154, - "src": "6254:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8174, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8169, - "src": "6359:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8160, - "id": 8175, - "nodeType": "Return", - "src": "6352:8:7" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 8177, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8152, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6042:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8151, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8154, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6053:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8153, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8156, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6064:26:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8155, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:7", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:7" - }, - "returnParameters": { - "id": 8160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8159, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8177, - "src": "6115:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:7" - }, - "scope": 8217, - "src": "6029:338:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8192, - "nodeType": "Block", - "src": "6878:61:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8187, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8179, - "src": "6899:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8188, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8181, - "src": "6902:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 8189, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 8186, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 8193, - 8216 - ], - "referencedDeclaration": 8216, - "src": "6895:3:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8185, - "id": 8191, - "nodeType": "Return", - "src": "6888:44:7" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 8193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8182, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8179, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8193, - "src": "6824:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8178, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8181, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8193, - "src": "6835:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:7" - }, - "returnParameters": { - "id": 8185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8184, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8193, - "src": "6869:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8183, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:7" - }, - "scope": 8217, - "src": "6811:128:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8215, - "nodeType": "Block", - "src": "7538:68:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8205, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8197, - "src": "7556:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8206, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 8208, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8199, - "src": "7564:12:7", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 8204, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8210, - "nodeType": "ExpressionStatement", - "src": "7548:29:7" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8211, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8195, - "src": "7594:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 8212, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8197, - "src": "7598:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8203, - "id": 8214, - "nodeType": "Return", - "src": "7587:12:7" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 8216, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8195, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7456:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8197, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7467:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8196, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8199, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7478:26:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8198, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:7", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:7" - }, - "returnParameters": { - "id": 8203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8202, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8216, - "src": "7529:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:7" - }, - "scope": 8217, - "src": "7443:163:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "2900:4708:7" - }, - { - "id": 8218, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8243, - "linearizedBaseContracts": [ - 8243 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 8221, - "nodeType": "Block", - "src": "8386:3:7", - "statements": [] - }, - "documentation": null, - "id": 8222, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8219, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:7" - }, - "returnParameters": { - "id": 8220, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:7" - }, - "scope": 8243, - "src": "8362:27:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8230, - "nodeType": "Block", - "src": "8510:34:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8227, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 8226, - "id": 8229, - "nodeType": "Return", - "src": "8520:17:7" - } - ] - }, - "documentation": null, - "id": 8231, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8223, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:7" - }, - "returnParameters": { - "id": 8226, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8225, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8231, - "src": "8493:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 8224, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:7", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:7" - }, - "scope": 8243, - "src": "8448:96:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8241, - "nodeType": "Block", - "src": "8607:165:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8236, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19395, - "src": "8617:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$8243", - "typeString": "contract Context" - } - }, - "id": 8237, - "nodeType": "ExpressionStatement", - "src": "8617:4:7" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8238, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 8235, - "id": 8240, - "nodeType": "Return", - "src": "8750:15:7" - } - ] - }, - "documentation": null, - "id": 8242, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8232, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:7" - }, - "returnParameters": { - "id": 8235, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8234, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8242, - "src": "8593:12:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8233, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:7" - }, - "scope": 8243, - "src": "8550:222:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "8185:589:7" - }, - { - "id": 8244, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:7" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8245, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8243, - "src": "9238:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$8243", - "typeString": "contract Context" - } - }, - "id": 8246, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:7" - } - ], - "contractDependencies": [ - 8243 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 8355, - "linearizedBaseContracts": [ - 8355, - 8243 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8248, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 8355, - "src": "9252:22:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 8254, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 8253, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8250, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 8254, - "src": "9308:29:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8249, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8252, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 8254, - "src": "9339:24:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:7" - }, - "src": "9281:84:7" - }, - { - "body": { - "id": 8269, - "nodeType": "Block", - "src": "9491:93:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8257, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "9501:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8258, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8231, - "src": "9510:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 8259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8261, - "nodeType": "ExpressionStatement", - "src": "9501:21:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:7", - "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": 8263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 8266, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "9570:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8262, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "9537:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8268, - "nodeType": "EmitStatement", - "src": "9532:45:7" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 8270, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8255, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:7" - }, - "returnParameters": { - "id": 8256, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:7" - }, - "scope": 8355, - "src": "9467:117:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8277, - "nodeType": "Block", - "src": "9707:30:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8275, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "9724:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 8274, - "id": 8276, - "nodeType": "Return", - "src": "9717:13:7" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 8278, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8271, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:7" - }, - "returnParameters": { - "id": 8274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8273, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8278, - "src": "9698:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:7" - }, - "scope": 8355, - "src": "9660:77:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8287, - "nodeType": "Block", - "src": "9846:82:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8281, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8299, - "src": "9864:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 8282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 8283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 8280, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8285, - "nodeType": "ExpressionStatement", - "src": "9856:54:7" - }, - { - "id": 8286, - "nodeType": "PlaceholderStatement", - "src": "9920:1:7" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 8288, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8279, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:7" - }, - "src": "9825:103:7", - "visibility": "internal" - }, - { - "body": { - "id": 8298, - "nodeType": "Block", - "src": "10057:46:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8293, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8231, - "src": "10074:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 8294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8295, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "10090:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8292, - "id": 8297, - "nodeType": "Return", - "src": "10067:29:7" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 8299, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8289, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:7" - }, - "returnParameters": { - "id": 8292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8291, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8299, - "src": "10051:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8290, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:7" - }, - "scope": 8355, - "src": "10011:92:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8317, - "nodeType": "Block", - "src": "10491:91:7", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8305, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "10527:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8307, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:7", - "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": 8306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8308, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 8304, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "10506:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8310, - "nodeType": "EmitStatement", - "src": "10501:45:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8311, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "10556:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8313, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:7", - "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": 8312, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8316, - "nodeType": "ExpressionStatement", - "src": "10556:19:7" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 8318, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8302, - "modifierName": { - "argumentTypes": null, - "id": 8301, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8288, - "src": "10481:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:7" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8300, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:7" - }, - "returnParameters": { - "id": 8303, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:7" - }, - "scope": 8355, - "src": "10445:137:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8329, - "nodeType": "Block", - "src": "10793:45:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8326, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8320, - "src": "10822:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8325, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8354, - "src": "10803:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 8327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8328, - "nodeType": "ExpressionStatement", - "src": "10803:28:7" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 8330, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8323, - "modifierName": { - "argumentTypes": null, - "id": 8322, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8288, - "src": "10783:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:7" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8321, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8320, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 8330, - "src": "10758:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8319, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:7" - }, - "returnParameters": { - "id": 8324, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:7" - }, - "scope": 8355, - "src": "10731:107:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8353, - "nodeType": "Block", - "src": "10994:170:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8336, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8332, - "src": "11012:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:7", - "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": 8337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 8341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 8335, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8343, - "nodeType": "ExpressionStatement", - "src": "11004:73:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8345, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "11113:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8346, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8332, - "src": "11121:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8344, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8254, - "src": "11092:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 8347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8348, - "nodeType": "EmitStatement", - "src": "11087:43:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8349, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8248, - "src": "11140:6:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8350, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8332, - "src": "11149:8:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8352, - "nodeType": "ExpressionStatement", - "src": "11140:17:7" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 8354, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8333, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8332, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 8354, - "src": "10967:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:7" - }, - "returnParameters": { - "id": 8334, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:7" - }, - "scope": 8355, - "src": "10939:225:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "9218:1948:7" - }, - { - "id": 8356, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 8423, - "linearizedBaseContracts": [ - 8423 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 8361, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8357, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:7" - }, - "returnParameters": { - "id": 8360, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8359, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8361, - "src": "11541:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8358, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:7" - }, - "scope": 8423, - "src": "11495:55:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 8368, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8364, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8363, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8368, - "src": "11652:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8362, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:7" - }, - "returnParameters": { - "id": 8367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8366, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8368, - "src": "11692:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:7" - }, - "scope": 8423, - "src": "11633:68:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 8377, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8370, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 8377, - "src": "11939:17:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8369, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8372, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8377, - "src": "11958:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8371, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:7" - }, - "returnParameters": { - "id": 8376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8377, - "src": "11992:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8374, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:7" - }, - "scope": 8423, - "src": "11921:77:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 8386, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8382, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8379, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 8386, - "src": "12292:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8381, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8386, - "src": "12307:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8380, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:7" - }, - "returnParameters": { - "id": 8385, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8384, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8386, - "src": "12347:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8383, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:7" - }, - "scope": 8423, - "src": "12273:83:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 8395, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8391, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8388, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8395, - "src": "13026:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8390, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8395, - "src": "13043:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8389, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:7" - }, - "returnParameters": { - "id": 8394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8393, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8395, - "src": "13077:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8392, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:7" - }, - "scope": 8423, - "src": "13009:74:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 8406, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8397, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13412:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8396, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8399, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13428:17:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8398, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8401, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13447:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8400, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:7" - }, - "returnParameters": { - "id": 8405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8406, - "src": "13481:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8403, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:7" - }, - "scope": 8423, - "src": "13390:97:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 8414, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 8413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8408, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 8414, - "src": "13671:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8407, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8410, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 8414, - "src": "13693:18:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8409, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8412, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8414, - "src": "13713:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8411, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:7" - }, - "src": "13656:72:7" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 8422, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 8421, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8416, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 8422, - "src": "13902:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8415, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8418, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8422, - "src": "13925:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8417, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8420, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8422, - "src": "13950:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8419, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:7" - }, - "src": "13887:78:7" - } - ], - "scope": 9284, - "src": "11401:2566:7" - }, - { - "id": 8424, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 8497, - "linearizedBaseContracts": [ - 8497 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 8448, - "nodeType": "Block", - "src": "14644:731:7", - "statements": [ - { - "assignments": [ - 8432 - ], - "declarations": [ - { - "constant": false, - "id": 8432, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 8448, - "src": "15083:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 8431, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8433, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:7" - }, - { - "assignments": [ - 8435 - ], - "declarations": [ - { - "constant": false, - "id": 8435, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 8448, - "src": "15109:19:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 8434, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8437, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 8436, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:7" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 8432, - "isOffset": false, - "isSlot": false, - "src": "15274:8:7", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 8426, - "isOffset": false, - "isSlot": false, - "src": "15298:7:7", - "valueSize": 1 - } - } - ], - "id": 8438, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:7" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 8441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8439, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8432, - "src": "15325:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 8440, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 8444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8442, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8432, - "src": "15344:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 8443, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8435, - "src": "15356:11:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8446, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8430, - "id": 8447, - "nodeType": "Return", - "src": "15317:51:7" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 8449, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8427, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8426, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8449, - "src": "14598:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8425, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:7" - }, - "returnParameters": { - "id": 8430, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8429, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8449, - "src": "14638:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8428, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:7" - }, - "scope": 8497, - "src": "14578:797:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8462, - "nodeType": "Block", - "src": "15660:49:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8458, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8451, - "src": "15693:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 8459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 8456, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 8455, - "id": 8461, - "nodeType": "Return", - "src": "15670:32:7" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 8463, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8451, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8463, - "src": "15603:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8450, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:7" - }, - "returnParameters": { - "id": 8455, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8454, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8463, - "src": "15643:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 8453, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:7", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:7" - }, - "scope": 8497, - "src": "15584:125:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8495, - "nodeType": "Block", - "src": "16737:294:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8472, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19401, - "src": "16763:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$8497", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$8497", - "typeString": "library Address" - } - ], - "id": 8471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8475, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8467, - "src": "16780:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 8477, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 8470, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8479, - "nodeType": "ExpressionStatement", - "src": "16747:73:7" - }, - { - "assignments": [ - 8481, - null - ], - "declarations": [ - { - "constant": false, - "id": 8481, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 8495, - "src": "16886:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8480, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 8489, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 8487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 8485, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8467, - "src": "16925:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8482, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8465, - "src": "16904:9:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 8483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:7", - "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": 8484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 8486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:7", - "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": 8488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8491, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8481, - "src": "16954:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 8492, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 8490, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8494, - "nodeType": "ExpressionStatement", - "src": "16946:78:7" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 8496, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8465, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 8496, - "src": "16685:25:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 8464, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:7", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8467, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8496, - "src": "16712:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8466, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:7" - }, - "returnParameters": { - "id": 8469, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:7" - }, - "scope": 8497, - "src": "16666:365:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 9284, - "src": "14114:2919:7" - }, - { - "id": 8498, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 8713, - "linearizedBaseContracts": [ - 8713 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 8501, - "libraryName": { - "contractScope": null, - "id": 8499, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8217, - "src": "17610:8:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$8217", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:7", - "typeName": { - "id": 8500, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 8504, - "libraryName": { - "contractScope": null, - "id": 8502, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8497, - "src": "17642:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$8497", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:7", - "typeName": { - "id": 8503, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 8525, - "nodeType": "Block", - "src": "17740:102:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8514, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8506, - "src": "17769:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8517, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8506, - "src": "17799:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 8377, - "src": "17799:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8520, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8508, - "src": "17824:2:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8521, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8510, - "src": "17828:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8515, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8513, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "17750:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8524, - "nodeType": "ExpressionStatement", - "src": "17750:85:7" - } - ] - }, - "documentation": null, - "id": 8526, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8506, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8526, - "src": "17690:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8505, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "17690:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8508, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 8526, - "src": "17704:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8507, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8510, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8526, - "src": "17716:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:7" - }, - "returnParameters": { - "id": 8512, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:7" - }, - "scope": 8713, - "src": "17668:174:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8550, - "nodeType": "Block", - "src": "17938:112:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8538, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8528, - "src": "17967:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8541, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8528, - "src": "17997:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 8406, - "src": "17997:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 8543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8544, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8530, - "src": "18026:4:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8545, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8532, - "src": "18032:2:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8546, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8534, - "src": "18036:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8539, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8540, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8537, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "17948:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8549, - "nodeType": "ExpressionStatement", - "src": "17948:95:7" - } - ] - }, - "documentation": null, - "id": 8551, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8535, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8528, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17874:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8527, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "17874:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8530, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17888:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8532, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17902:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8531, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8534, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8551, - "src": "17914:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8533, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:7" - }, - "returnParameters": { - "id": 8536, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:7" - }, - "scope": 8713, - "src": "17848:202:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8591, - "nodeType": "Block", - "src": "18132:536:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 8575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8561, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "18421:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8564, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8568, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19403, - "src": "18461:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - ], - "id": 8567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8570, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8555, - "src": "18468:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8565, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8553, - "src": "18437:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 8386, - "src": "18437:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 8571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8572, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 8574, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 8576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 8560, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8578, - "nodeType": "ExpressionStatement", - "src": "18412:150:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8580, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8553, - "src": "18591:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8583, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8553, - "src": "18621:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 8395, - "src": "18621:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8586, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8555, - "src": "18645:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8587, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8557, - "src": "18654:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8581, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8579, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "18572:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8590, - "nodeType": "ExpressionStatement", - "src": "18572:89:7" - } - ] - }, - "documentation": null, - "id": 8592, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8558, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8553, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8592, - "src": "18077:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8552, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "18077:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8555, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8592, - "src": "18091:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8554, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8557, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8592, - "src": "18108:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8556, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:7" - }, - "returnParameters": { - "id": 8559, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:7" - }, - "scope": 8713, - "src": "18056:612:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8626, - "nodeType": "Block", - "src": "18760:196:7", - "statements": [ - { - "assignments": [ - 8602 - ], - "declarations": [ - { - "constant": false, - "id": 8602, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 8626, - "src": "18770:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8601, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8613, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8611, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8598, - "src": "18837:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8606, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19403, - "src": "18817:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - ], - "id": 8605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8608, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8596, - "src": "18824:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8603, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8594, - "src": "18793:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 8386, - "src": "18793:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 8609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "18793:43:7", - "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": 8612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8615, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8594, - "src": "18872:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8618, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8594, - "src": "18902:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 8395, - "src": "18902:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8621, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8596, - "src": "18926:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8622, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8602, - "src": "18935:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8616, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8614, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "18853:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8625, - "nodeType": "ExpressionStatement", - "src": "18853:96:7" - } - ] - }, - "documentation": null, - "id": 8627, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8599, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8594, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8627, - "src": "18705:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8593, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "18705:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8596, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8627, - "src": "18719:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8595, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8598, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8627, - "src": "18736:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8597, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:7" - }, - "returnParameters": { - "id": 8600, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:7" - }, - "scope": 8713, - "src": "18674:282:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8662, - "nodeType": "Block", - "src": "19048:241:7", - "statements": [ - { - "assignments": [ - 8637 - ], - "declarations": [ - { - "constant": false, - "id": 8637, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 8662, - "src": "19058:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8636, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8649, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8646, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8633, - "src": "19125:5:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 8647, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8641, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19403, - "src": "19105:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - ], - "id": 8640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8643, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8631, - "src": "19112:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8638, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8629, - "src": "19081:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 8386, - "src": "19081:15:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 8644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8100, - "src": "19081:43:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 8648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8651, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8629, - "src": "19205:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8654, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8629, - "src": "19235:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 8395, - "src": "19235:13:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 8656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 8657, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8631, - "src": "19259:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8658, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8637, - "src": "19268:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8652, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 8659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 8650, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8712, - "src": "19186:18:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 8660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8661, - "nodeType": "ExpressionStatement", - "src": "19186:96:7" - } - ] - }, - "documentation": null, - "id": 8663, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8629, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8663, - "src": "18993:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8628, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "18993:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8631, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 8663, - "src": "19007:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8633, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8663, - "src": "19024:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:7" - }, - "returnParameters": { - "id": 8635, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:7" - }, - "scope": 8713, - "src": "18962:327:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 8711, - "nodeType": "Block", - "src": "19741:1026:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8672, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8665, - "src": "20275:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - ], - "id": 8671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 8449, - "src": "20267:25:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 8675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 8676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 8670, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8678, - "nodeType": "ExpressionStatement", - "src": "20259:71:7" - }, - { - "assignments": [ - 8680, - 8682 - ], - "declarations": [ - { - "constant": false, - "id": 8680, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 8711, - "src": "20401:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8679, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8682, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 8711, - "src": "20415:23:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8681, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 8689, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8687, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8667, - "src": "20462:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8684, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8665, - "src": "20450:5:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - ], - "id": 8683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:7", - "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": 8688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8691, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8680, - "src": "20485:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 8692, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 8690, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8694, - "nodeType": "ExpressionStatement", - "src": "20477:52:7" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8698, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8695, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8682, - "src": "20544:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 8696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8697, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8710, - "nodeType": "IfStatement", - "src": "20540:221:7", - "trueBody": { - "id": 8709, - "nodeType": "Block", - "src": "20567:194:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8702, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8682, - "src": "20684:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 8703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 8704, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 8700, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 8701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 8705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 8706, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 8699, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8708, - "nodeType": "ExpressionStatement", - "src": "20665:85:7" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 8712, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8668, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8665, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 8712, - "src": "19700:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8664, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "19700:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8667, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 8712, - "src": "19714:17:7", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 8666, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:7" - }, - "returnParameters": { - "id": 8669, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:7" - }, - "scope": 8713, - "src": "19672:1095:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 9284, - "src": "17580:3189:7" - }, - { - "id": 8714, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:7" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8715, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8355, - "src": "20892:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$8355", - "typeString": "contract Ownable" - } - }, - "id": 8716, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:7" - } - ], - "contractDependencies": [ - 8243, - 8355 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 8748, - "linearizedBaseContracts": [ - 8748, - 8355, - 8243 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8718, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 8748, - "src": "20906:33:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 8723, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8721, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8720, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 8723, - "src": "20974:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8719, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:7" - }, - "returnParameters": { - "id": 8722, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:7" - }, - "scope": 8748, - "src": "20946:53:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 8734, - "nodeType": "Block", - "src": "21039:108:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8726, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8231, - "src": "21057:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 8727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 8728, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8718, - "src": "21073:18:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 8730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 8725, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8732, - "nodeType": "ExpressionStatement", - "src": "21049:80:7" - }, - { - "id": 8733, - "nodeType": "PlaceholderStatement", - "src": "21139:1:7" - } - ] - }, - "documentation": null, - "id": 8735, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8724, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:7" - }, - "src": "21005:142:7", - "visibility": "internal" - }, - { - "body": { - "id": 8746, - "nodeType": "Block", - "src": "21252:57:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8742, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8718, - "src": "21262:18:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8743, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8737, - "src": "21283:19:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 8745, - "nodeType": "ExpressionStatement", - "src": "21262:40:7" - } - ] - }, - "documentation": null, - "id": 8747, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 8740, - "modifierName": { - "argumentTypes": null, - "id": 8739, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8288, - "src": "21238:9:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:7" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8738, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8737, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 8747, - "src": "21184:27:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:7" - }, - "returnParameters": { - "id": 8741, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:7" - }, - "scope": 8748, - "src": "21153:156:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 9284, - "src": "20851:460:7" - }, - { - "id": 8749, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 8755, - "linearizedBaseContracts": [ - 8755 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 8754, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8750, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:7" - }, - "returnParameters": { - "id": 8753, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8752, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8754, - "src": "21443:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8751, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:7" - }, - "scope": 8755, - "src": "21396:56:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 9284, - "src": "21376:78:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8864, - "linearizedBaseContracts": [ - 8864 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 8758, - "libraryName": { - "contractScope": null, - "id": 8756, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8217, - "src": "21494:8:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$8217", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21488:27:7", - "typeName": { - "id": 8757, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21507:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 8761, - "libraryName": { - "contractScope": null, - "id": 8759, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8713, - "src": "21526:9:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$8713", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21520:27:7", - "typeName": { - "contractScope": null, - "id": 8760, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "21540:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 8766, - "name": "snx", - "nodeType": "VariableDeclaration", - "scope": 8864, - "src": "21553:70:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8762, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "21553:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307843303131613733656538353736466234364635453163353735316341334239466530616632613646", - "id": 8764, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21580:42:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 8763, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8423, - "src": "21573:6:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$8423_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8765, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21573:50:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8768, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 8864, - "src": "21630:28:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8767, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21630:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 8772, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 8864, - "src": "21664:45:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 8771, - "keyType": { - "id": 8769, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21672:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21664:27:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 8770, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21683:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 8779, - "nodeType": "Block", - "src": "21769:36:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8777, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "21786:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8776, - "id": 8778, - "nodeType": "Return", - "src": "21779:19:7" - } - ] - }, - "documentation": null, - "id": 8780, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8773, - "nodeType": "ParameterList", - "parameters": [], - "src": "21736:2:7" - }, - "returnParameters": { - "id": 8776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8775, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8780, - "src": "21760:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8774, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21760:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21759:9:7" - }, - "scope": 8864, - "src": "21716:89:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8791, - "nodeType": "Block", - "src": "21877:42:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8787, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "21894:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8789, - "indexExpression": { - "argumentTypes": null, - "id": 8788, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8782, - "src": "21904:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21894:18:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8786, - "id": 8790, - "nodeType": "Return", - "src": "21887:25:7" - } - ] - }, - "documentation": null, - "id": 8792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8783, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8782, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8792, - "src": "21830:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8781, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21830:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21829:17:7" - }, - "returnParameters": { - "id": 8786, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8785, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8792, - "src": "21868:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8784, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21868:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21867:9:7" - }, - "scope": 8864, - "src": "21811:108:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8828, - "nodeType": "Block", - "src": "21963:188:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8797, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "21973:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8800, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8794, - "src": "22005:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8798, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "21988:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "21988:16:7", - "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": 8801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21988:24:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21973:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8803, - "nodeType": "ExpressionStatement", - "src": "21973:39:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8804, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22022:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8807, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8805, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22032:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22032:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22022:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8813, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8794, - "src": "22072:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8808, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22046:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8811, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8809, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22056:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22056:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22046:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "22046:25:7", - "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": 8814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22046:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22022:57:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8816, - "nodeType": "ExpressionStatement", - "src": "22022:57:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8820, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22110:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22110:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8823, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19409, - "src": "22130:4:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$8864", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$8864", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 8822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22122:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22122:13:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8825, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8794, - "src": "22137:6:7", - "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, - "id": 8817, - "name": "snx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8766, - "src": "22089:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 8551, - "src": "22089:20:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$8423_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 8826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22089:55:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8827, - "nodeType": "ExpressionStatement", - "src": "22089:55:7" - } - ] - }, - "documentation": null, - "id": 8829, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8795, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8794, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8829, - "src": "21940:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8793, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21940:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21939:16:7" - }, - "returnParameters": { - "id": 8796, - "nodeType": "ParameterList", - "parameters": [], - "src": "21963:0:7" - }, - "scope": 8864, - "src": "21925:226:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 8862, - "nodeType": "Block", - "src": "22198:169:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8834, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "22208:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8837, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8831, - "src": "22240:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8835, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8768, - "src": "22223:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "22223:16:7", - "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": 8838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22223:24:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22208:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8840, - "nodeType": "ExpressionStatement", - "src": "22208:39:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8841, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22257:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8844, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8842, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22267:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22267:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22257:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8850, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8831, - "src": "22307:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8845, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8772, - "src": "22281:9:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8848, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8846, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22291:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22291:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22281:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "22281:25:7", - "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": 8851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22281:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22257:57:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8853, - "nodeType": "ExpressionStatement", - "src": "22257:57:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8857, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22341:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 8858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22341:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 8859, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8831, - "src": "22353:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8854, - "name": "snx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8766, - "src": "22324:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 8856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 8526, - "src": "22324:16:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$8423_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 8860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22324:36:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8861, - "nodeType": "ExpressionStatement", - "src": "22324:36:7" - } - ] - }, - "documentation": null, - "id": 8863, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8831, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8863, - "src": "22175:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22175:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22174:16:7" - }, - "returnParameters": { - "id": 8833, - "nodeType": "ParameterList", - "parameters": [], - "src": "22198:0:7" - }, - "scope": 8864, - "src": "22157:210:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 9284, - "src": "21458:911:7" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8865, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8864, - "src": "22394:14:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$8864", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 8866, - "nodeType": "InheritanceSpecifier", - "src": "22394:14:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8867, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8748, - "src": "22410:28:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$8748", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 8868, - "nodeType": "InheritanceSpecifier", - "src": "22410:28:7" - } - ], - "contractDependencies": [ - 8243, - 8355, - 8748, - 8864 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 9283, - "linearizedBaseContracts": [ - 9283, - 8748, - 8355, - 8243, - 8864 - ], - "name": "YAMSNXPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8873, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22445:70:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 8869, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8423, - "src": "22445:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 8871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22472:42:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 8870, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8423, - "src": "22465:6:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$8423_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 8872, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22465:50:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 8876, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22521:41:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8874, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22521:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 8875, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22556:6:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8879, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22584:37:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22584:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 8878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22611:10:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8882, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22665:31:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8880, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22665:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 8881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22695:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8885, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22702:29:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8883, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22702:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 8884, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22730:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 8887, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22737:29:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8886, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22737:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8889, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22772:35:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8888, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22772:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8893, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22813:57:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 8892, - "keyType": { - "id": 8890, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22821:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22813:27:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 8891, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22832:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 8897, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 9283, - "src": "22876:42:7", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 8896, - "keyType": { - "id": 8894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22884:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22876:27:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 8895, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22895:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 8901, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 8900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8899, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 8901, - "src": "22943:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22943:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22942:16:7" - }, - "src": "22925:34:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 8907, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 8906, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8903, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 8907, - "src": "22977:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22977:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8905, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8907, - "src": "22999:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22999:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22976:38:7" - }, - "src": "22964:51:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 8913, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 8912, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8909, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 8913, - "src": "23036:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23036:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8911, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 8913, - "src": "23058:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8910, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23058:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23035:38:7" - }, - "src": "23020:54:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 8919, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 8918, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8915, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 8919, - "src": "23096:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8914, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23096:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8917, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 8919, - "src": "23118:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8916, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23118:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23095:38:7" - }, - "src": "23079:55:7" - }, - { - "body": { - "id": 8930, - "nodeType": "Block", - "src": "23162:77:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8922, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23180:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 8923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23180:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 8924, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "23199:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23180:28:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 8926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23209:11:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 8921, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23172:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 8927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23172:49:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8928, - "nodeType": "ExpressionStatement", - "src": "23172:49:7" - }, - { - "id": 8929, - "nodeType": "PlaceholderStatement", - "src": "23231:1:7" - } - ] - }, - "documentation": null, - "id": 8931, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8920, - "nodeType": "ParameterList", - "parameters": [], - "src": "23159:2:7" - }, - "src": "23140:99:7", - "visibility": "internal" - }, - { - "body": { - "id": 8967, - "nodeType": "Block", - "src": "23284:283:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8935, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23294:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8936, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9014, - "src": "23317:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23317:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23294:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8939, - "nodeType": "ExpressionStatement", - "src": "23294:39:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 8940, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "23343:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8941, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8981, - "src": "23360:24:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23360:26:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23343:43:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8944, - "nodeType": "ExpressionStatement", - "src": "23343:43:7" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 8949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 8945, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23400:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 8947, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23419:1:7", - "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": 8946, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23411:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 8948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23411:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23400:21:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8965, - "nodeType": "IfStatement", - "src": "23396:154:7", - "trueBody": { - "id": 8964, - "nodeType": "Block", - "src": "23423:127:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8950, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8897, - "src": "23437:7:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8952, - "indexExpression": { - "argumentTypes": null, - "id": 8951, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23445:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23437:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8954, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23463:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 8953, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9043, - "src": "23456:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 8955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23456:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23437:34:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8957, - "nodeType": "ExpressionStatement", - "src": "23437:34:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 8962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 8958, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8893, - "src": "23485:22:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 8960, - "indexExpression": { - "argumentTypes": null, - "id": 8959, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8933, - "src": "23508:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23485:31:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 8961, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23519:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23485:54:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8963, - "nodeType": "ExpressionStatement", - "src": "23485:54:7" - } - ] - } - }, - { - "id": 8966, - "nodeType": "PlaceholderStatement", - "src": "23559:1:7" - } - ] - }, - "documentation": null, - "id": 8968, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 8934, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8933, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 8968, - "src": "23267:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8932, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23267:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23266:17:7" - }, - "src": "23245:322:7", - "visibility": "internal" - }, - { - "body": { - "id": 8980, - "nodeType": "Block", - "src": "23639:63:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 8975, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23665:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 8976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23665:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 8977, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "23682:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8973, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8031, - "src": "23656:4:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$8031_$", - "typeString": "type(library Math)" - } - }, - "id": 8974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 7998, - "src": "23656:8:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 8978, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23656:39:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8972, - "id": 8979, - "nodeType": "Return", - "src": "23649:46:7" - } - ] - }, - "documentation": null, - "id": 8981, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8969, - "nodeType": "ParameterList", - "parameters": [], - "src": "23606:2:7" - }, - "returnParameters": { - "id": 8972, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8971, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 8981, - "src": "23630:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8970, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23630:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23629:9:7" - }, - "scope": 9283, - "src": "23573:129:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9013, - "nodeType": "Block", - "src": "23764:352:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 8989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8986, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8780, - "src": "23778:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23778:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 8988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23795:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23778:18:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 8993, - "nodeType": "IfStatement", - "src": "23774:76:7", - "trueBody": { - "id": 8992, - "nodeType": "Block", - "src": "23798:52:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 8990, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23819:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8985, - "id": 8991, - "nodeType": "Return", - "src": "23812:27:7" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9008, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8780, - "src": "24081:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 9009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24081:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 9005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24050:4:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9002, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "24013:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8999, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "23972:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 8996, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8981, - "src": "23920:24:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 8997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:26:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "23920:51:7", - "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": 9000, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:67:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "23920:92:7", - "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": 9003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:104:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "23920:129:7", - "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": 9006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:135:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "23920:160:7", - "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": 9010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23920:175:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8994, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8889, - "src": "23878:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 8995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "23878:24:7", - "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": 9011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23878:231:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8985, - "id": 9012, - "nodeType": "Return", - "src": "23859:250:7" - } - ] - }, - "documentation": null, - "id": 9014, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8982, - "nodeType": "ParameterList", - "parameters": [], - "src": "23731:2:7" - }, - "returnParameters": { - "id": 8985, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8984, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9014, - "src": "23755:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8983, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23755:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23754:9:7" - }, - "scope": 9283, - "src": "23708:408:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9042, - "nodeType": "Block", - "src": "24185:196:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 9037, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8897, - "src": "24357:7:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 9039, - "indexExpression": { - "argumentTypes": null, - "id": 9038, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9016, - "src": "24365:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24357:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 9034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24330:4:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 9028, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8893, - "src": "24275:22:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 9030, - "indexExpression": { - "argumentTypes": null, - "id": 9029, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9016, - "src": "24298:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24275:31:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9025, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9014, - "src": "24254:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 9026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:16:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9027, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "24254:20:7", - "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": 9031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24254:53:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9022, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9016, - "src": "24224:7:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9021, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8792, - "src": "24214:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 9023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:18:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "24214:39:7", - "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": 9032, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:94:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "24214:115:7", - "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": 9035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:121:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "24214:142:7", - "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": 9040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24214:160:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9020, - "id": 9041, - "nodeType": "Return", - "src": "24195:179:7" - } - ] - }, - "documentation": null, - "id": 9043, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9017, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9016, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9043, - "src": "24138:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9015, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24138:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24137:17:7" - }, - "returnParameters": { - "id": 9020, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9019, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9043, - "src": "24176:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9018, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24176:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24175:9:7" - }, - "scope": 9283, - "src": "24122:259:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9073, - "nodeType": "Block", - "src": "24543:124:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9055, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9045, - "src": "24561:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24570:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24561:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 9058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24573:16:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 9054, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24553:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24553:37:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9060, - "nodeType": "ExpressionStatement", - "src": "24553:37:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9064, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9045, - "src": "24612:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9061, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19412, - "src": "24600:5:7", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMSNXPool_$9283", - "typeString": "contract super YAMSNXPool" - } - }, - "id": 9063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 8829, - "src": "24600:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24600:19:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9066, - "nodeType": "ExpressionStatement", - "src": "24600:19:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9068, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24641:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24641:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9070, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9045, - "src": "24653:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9067, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8907, - "src": "24634:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 9071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24634:26:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9072, - "nodeType": "EmitStatement", - "src": "24629:31:7" - } - ] - }, - "documentation": null, - "id": 9074, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9048, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24520:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24520:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9050, - "modifierName": { - "argumentTypes": null, - "id": 9047, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "24507:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24507:24:7" - }, - { - "arguments": null, - "id": 9052, - "modifierName": { - "argumentTypes": null, - "id": 9051, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8931, - "src": "24532:10:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24532:10:7" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9045, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9074, - "src": "24484:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9044, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24484:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24483:16:7" - }, - "returnParameters": { - "id": 9053, - "nodeType": "ParameterList", - "parameters": [], - "src": "24543:0:7" - }, - "scope": 9283, - "src": "24469:198:7", - "stateMutability": "nonpayable", - "superFunction": 8829, - "visibility": "public" - }, - { - "body": { - "id": 9104, - "nodeType": "Block", - "src": "24750:133:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9086, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9076, - "src": "24768:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9087, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24777:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24768:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 9089, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24780:19:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 9085, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24760:7:7", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24760:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9091, - "nodeType": "ExpressionStatement", - "src": "24760:40:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9095, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9076, - "src": "24825:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9092, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19412, - "src": "24810:5:7", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMSNXPool_$9283", - "typeString": "contract super YAMSNXPool" - } - }, - "id": 9094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 8863, - "src": "24810:14:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24810:22:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9097, - "nodeType": "ExpressionStatement", - "src": "24810:22:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9099, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24857:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24857:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9101, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9076, - "src": "24869:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9098, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8913, - "src": "24847:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 9102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24847:29:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9103, - "nodeType": "EmitStatement", - "src": "24842:34:7" - } - ] - }, - "documentation": null, - "id": 9105, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9079, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24727:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24727:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9081, - "modifierName": { - "argumentTypes": null, - "id": 9078, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "24714:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24714:24:7" - }, - { - "arguments": null, - "id": 9083, - "modifierName": { - "argumentTypes": null, - "id": 9082, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8931, - "src": "24739:10:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24739:10:7" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9076, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9105, - "src": "24691:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9075, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24691:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24690:16:7" - }, - "returnParameters": { - "id": 9084, - "nodeType": "ParameterList", - "parameters": [], - "src": "24750:0:7" - }, - "scope": 9283, - "src": "24673:210:7", - "stateMutability": "nonpayable", - "superFunction": 8863, - "visibility": "public" - }, - { - "body": { - "id": 9118, - "nodeType": "Block", - "src": "24914:69:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9110, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24943:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24943:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 9109, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8792, - "src": "24933:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 9112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24933:21:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9108, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9105 - ], - "referencedDeclaration": 9105, - "src": "24924:8:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24924:31:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9114, - "nodeType": "ExpressionStatement", - "src": "24924:31:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9115, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9184, - "src": "24965:9:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 9116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24965:11:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9117, - "nodeType": "ExpressionStatement", - "src": "24965:11:7" - } - ] - }, - "documentation": null, - "id": 9119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9106, - "nodeType": "ParameterList", - "parameters": [], - "src": "24902:2:7" - }, - "returnParameters": { - "id": 9107, - "nodeType": "ParameterList", - "parameters": [], - "src": "24914:0:7" - }, - "scope": 9283, - "src": "24889:94:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 9183, - "nodeType": "Block", - "src": "25053:379:7", - "statements": [ - { - "assignments": [ - 9129 - ], - "declarations": [ - { - "constant": false, - "id": 9129, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 9183, - "src": "25063:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9128, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25063:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9134, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9131, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25087:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25087:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 9130, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9043, - "src": "25080:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 9133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25080:18:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25063:35:7" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9135, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9129, - "src": "25112:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25121:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25112:10:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 9182, - "nodeType": "IfStatement", - "src": "25108:318:7", - "trueBody": { - "id": 9181, - "nodeType": "Block", - "src": "25124:302:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 9138, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8897, - "src": "25138:7:7", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 9141, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9139, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25146:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25146:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25138:19:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 9142, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25160:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25138:23:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9144, - "nodeType": "ExpressionStatement", - "src": "25138:23:7" - }, - { - "assignments": [ - 9146 - ], - "declarations": [ - { - "constant": false, - "id": 9146, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 9181, - "src": "25175:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25175:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9154, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9149, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8873, - "src": "25211:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - ], - "id": 9148, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25203:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25203:12:7", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9147, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8755, - "src": "25199:3:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$8755_$", - "typeString": "type(contract YAM)" - } - }, - "id": 9151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:17:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$8755", - "typeString": "contract YAM" - } - }, - "id": 9152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 8754, - "src": "25199:35:7", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 9153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25199:37:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25175:61:7" - }, - { - "assignments": [ - 9156 - ], - "declarations": [ - { - "constant": false, - "id": 9156, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 9181, - "src": "25250:18:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25250:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9166, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 9164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 9162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25301:2:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 9163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25305:2:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25301:6:7", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9159, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9146, - "src": "25282:13:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9157, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9129, - "src": "25271:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "25271:10:7", - "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": 9160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:25:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "25271:29:7", - "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": 9165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25271:37:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25250:58:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9170, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25339:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25339:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9172, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9156, - "src": "25351:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9167, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8873, - "src": "25322:3:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$8423", - "typeString": "contract IERC20" - } - }, - "id": 9169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 8526, - "src": "25322:16:7", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$8423_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$8423_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 9173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25322:40:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9174, - "nodeType": "ExpressionStatement", - "src": "25322:40:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9176, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25392:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25392:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9178, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9156, - "src": "25404:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9175, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8919, - "src": "25381:10:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 9179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25381:34:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9180, - "nodeType": "EmitStatement", - "src": "25376:39:7" - } - ] - } - } - ] - }, - "documentation": null, - "id": 9184, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9122, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25030:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25030:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9124, - "modifierName": { - "argumentTypes": null, - "id": 9121, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "25017:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25017:24:7" - }, - { - "arguments": null, - "id": 9126, - "modifierName": { - "argumentTypes": null, - "id": 9125, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8931, - "src": "25042:10:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25042:10:7" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9120, - "nodeType": "ParameterList", - "parameters": [], - "src": "25007:2:7" - }, - "returnParameters": { - "id": 9127, - "nodeType": "ParameterList", - "parameters": [], - "src": "25053:0:7" - }, - "scope": 9283, - "src": "24989:443:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9281, - "nodeType": "Block", - "src": "25567:703:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9196, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25581:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25581:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 9198, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "25599:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25581:27:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 9279, - "nodeType": "Block", - "src": "26084:180:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9257, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "26096:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9260, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "26120:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9258, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "26109:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "26109:10:7", - "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": 9261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26109:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26096:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9263, - "nodeType": "ExpressionStatement", - "src": "26096:33:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9264, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "26141:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 9265, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "26158:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26141:26:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9267, - "nodeType": "ExpressionStatement", - "src": "26141:26:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9268, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "26179:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9271, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "26208:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9269, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8879, - "src": "26194:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "26194:13:7", - "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": 9272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26194:23:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26179:38:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9274, - "nodeType": "ExpressionStatement", - "src": "26179:38:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9276, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "26246:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9275, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8901, - "src": "26234:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26234:19:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9278, - "nodeType": "EmitStatement", - "src": "26229:24:7" - } - ] - }, - "id": 9280, - "nodeType": "IfStatement", - "src": "25577:687:7", - "trueBody": { - "id": 9256, - "nodeType": "Block", - "src": "25610:468:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9200, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25626:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25626:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9202, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "25645:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25626:31:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 9237, - "nodeType": "Block", - "src": "25727:205:7", - "statements": [ - { - "assignments": [ - 9213 - ], - "declarations": [ - { - "constant": false, - "id": 9213, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 9237, - "src": "25743:17:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9212, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25743:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9219, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9216, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25780:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25780:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9214, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "25763:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 8073, - "src": "25763:16:7", - "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": 9218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25763:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25743:53:7" - }, - { - "assignments": [ - 9221 - ], - "declarations": [ - { - "constant": false, - "id": 9221, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 9237, - "src": "25812:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25812:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9226, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9224, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "25845:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9222, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9213, - "src": "25831:9:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 8134, - "src": "25831:13:7", - "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": 9225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25831:25:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25812:44:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9227, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "25872:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9233, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "25910:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9230, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9221, - "src": "25896:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9228, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "25885:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "25885:10:7", - "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": 9231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "25885:24:7", - "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": 9234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25885:34:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25872:47:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9236, - "nodeType": "ExpressionStatement", - "src": "25872:47:7" - } - ] - }, - "id": 9238, - "nodeType": "IfStatement", - "src": "25622:310:7", - "trueBody": { - "id": 9211, - "nodeType": "Block", - "src": "25659:62:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9204, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8885, - "src": "25675:10:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9207, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "25699:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9205, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "25688:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 8150, - "src": "25688:10:7", - "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": 9208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25688:20:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25675:33:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9210, - "nodeType": "ExpressionStatement", - "src": "25675:33:7" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 9242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9239, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8887, - "src": "25943:14:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9240, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25960:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25960:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25943:32:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9243, - "nodeType": "ExpressionStatement", - "src": "25943:32:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 9250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9244, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8882, - "src": "25987:12:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9248, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8876, - "src": "26022:8:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9245, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26002:5:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 9246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26002:15:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 8057, - "src": "26002:19:7", - "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": 9249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26002:29:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25987:44:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9251, - "nodeType": "ExpressionStatement", - "src": "25987:44:7" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9253, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9186, - "src": "26060:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 9252, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8901, - "src": "26048:11:7", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 9254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26048:19:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9255, - "nodeType": "EmitStatement", - "src": "26043:24:7" - } - ] - } - } - ] - }, - "documentation": null, - "id": 9282, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 9189, - "modifierName": { - "argumentTypes": null, - "id": 9188, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8735, - "src": "25507:22:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25507:22:7" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9192, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25559:1:7", - "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": 9191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25551:7:7", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25551:10:7", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 9194, - "modifierName": { - "argumentTypes": null, - "id": 9190, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8968, - "src": "25538:12:7", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25538:24:7" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9187, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9186, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 9282, - "src": "25466:14:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9185, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25466:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25465:16:7" - }, - "returnParameters": { - "id": 9195, - "nodeType": "ParameterList", - "parameters": [], - "src": "25567:0:7" - }, - "scope": 9283, - "src": "25438:832:7", - "stateMutability": "nonpayable", - "superFunction": 8723, - "visibility": "external" - } - ], - "scope": 9284, - "src": "22371:3901:7" - } - ], - "src": "1490:24783:7" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0x8E9550F541Ab6a9ebdE3b4be01395D93a96379BA", - "transactionHash": "0xf4969a9471e296f58a97eede80cd33a07c5e600b65452033fd7b2e645c5330cf" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.712Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMToken.json b/build/contracts/YAMToken.json deleted file mode 100644 index 86da298..0000000 --- a/build/contracts/YAMToken.json +++ /dev/null @@ -1,21626 +0,0 @@ -{ - "contractName": "YAMToken", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "BASE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "incentivizer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "internalDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamsScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "incentivizer_", - "type": "address" - } - ], - "name": "_setIncentivizer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "indexDelta", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "positive", - "type": "bool" - } - ], - "name": "rebase", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldIncentivizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newIncentivizer\",\"type\":\"address\"}],\"name\":\"NewIncentivizer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevYamsScalingFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newYamsScalingFactor\",\"type\":\"uint256\"}],\"name\":\"Rebase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"incentivizer_\",\"type\":\"address\"}],\"name\":\"_setIncentivizer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"incentivizer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"internalDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexDelta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"positive\",\"type\":\"bool\"}],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamsScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"_setIncentivizer(address)\":{\"params\":{\"incentivizer_\":\"The address of the rebaser contract to use for authentication.\"}},\"_setPendingGov(address)\":{\"params\":{\"pendingGov_\":\"The address of the rebaser contract to use for authentication.\"}},\"_setRebaser(address)\":{\"params\":{\"rebaser_\":\"The address of the rebaser contract to use for authentication.\"}},\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner has allowed to a spender.\",\"params\":{\"owner_\":\"The address which owns the funds.\",\"spender\":\"The address which will spend the funds.\"},\"return\":\"The number of tokens still available for the spender.\"},\"approve(address,uint256)\":{\"details\":\"Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. This method is included for ERC20 compatibility. increaseAllowance and decreaseAllowance should be used instead. Changing an allowance with this method brings the risk that someone may transfer both the old and the new allowance - if they are both greater than zero - if a transfer transaction is mined before the later approve() call is mined.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"}},\"balanceOf(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"The balance of the specified address.\"},\"balanceOfUnderlying(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"The underlying balance of the specified address.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Decrease the amount of tokens that an owner has allowed to a spender.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"subtractedValue\":\"The amount of tokens to decrease the allowance by.\"}},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\",\"expiry\":\"The time at which to expire the signature\",\"nonce\":\"The contract state required to match the signature\",\"r\":\"Half of the ECDSA signature pair\",\"s\":\"Half of the ECDSA signature pair\",\"v\":\"The recovery byte of the signature\"}},\"delegates(address)\":{\"params\":{\"delegator\":\"The address to get delegatee for\"}},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"The address to get votes balance\"},\"return\":\"The number of current votes for `account`\"},\"getPriorVotes(address,uint256)\":{\"details\":\"Block number must be a finalized block or else this function will revert to prevent misinformation.\",\"params\":{\"account\":\"The address of the account to check\",\"blockNumber\":\"The block number to get the vote balance at\"},\"return\":\"The number of votes the account had as of the given block\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.\",\"params\":{\"addedValue\":\"The amount of tokens to increase the allowance by.\",\"spender\":\"The address which will spend the funds.\"}},\"mint(address,uint256)\":{\"details\":\"Limited to onlyMinter modifier\"},\"rebase(uint256,uint256,bool)\":{\"details\":\"The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi\"},\"transfer(address,uint256)\":{\"details\":\"Transfer tokens to a specified address.\",\"params\":{\"to\":\"The address to transfer to.\",\"value\":\"The amount to be transferred.\"},\"return\":\"True on success, false otherwise.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfer tokens from one address to another.\",\"params\":{\"from\":\"The address you want to send tokens from.\",\"to\":\"The address you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"}}}},\"userdoc\":{\"methods\":{\"_acceptGov()\":{\"notice\":\"lets msg.sender accept governance \"},\"_setIncentivizer(address)\":{\"notice\":\"sets the incentivizer\"},\"_setPendingGov(address)\":{\"notice\":\"sets the pendingGov\"},\"_setRebaser(address)\":{\"notice\":\"sets the rebaser\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Currently returns the internal storage amount\"},\"delegate(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Delegates votes from signatory to `delegatee`\"},\"delegates(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"getCurrentVotes(address)\":{\"notice\":\"Gets the current votes balance for `account`\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"Determine the prior number of votes for an account as of a block number\"},\"maxScalingFactor()\":{\"notice\":\"Computes the current max scaling factor\"},\"mint(address,uint256)\":{\"notice\":\"Mints new tokens, increasing totalSupply, initSupply, and a users balance.\"},\"rebase(uint256,uint256,bool)\":{\"notice\":\"Initiates a new rebase operation, provided the minimum time period has elapsed.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":\"YAMToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAM.sol\":{\"keccak256\":\"0x37805294539ffc72da1145dce61bffee4437b329f5aee47e4ff3c24b805fb734\",\"urls\":[\"bzz-raw://13ffb729ad13edf89c0c21f4e01d66a58de29fc0741ac1a98b5f24be66f31fbd\",\"dweb:/ipfs/QmUvabJwLsrEYstkwbCB5gF1MPH2HuJvYrf2TDDb44MazA\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol\":{\"keccak256\":\"0x67e9ae862e4290b82391bf8cb8c6aa259a05a3fce1b1f8ac09b061bda8ae03c3\",\"urls\":[\"bzz-raw://25b1389c5d07dd27a5641449298ac770a0e922f4c307d252c52e4cecaba6db33\",\"dweb:/ipfs/QmexXYaUfbEbH8RTNDEozwdX7g3TTdg4STHR8dd6M5nnAy\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612c1a806100206000396000f3fe608060405234801561001057600080fd5b50600436106102925760003560e01c80636fcfff4511610160578063a457c2d7116100d8578063dd62ed3e1161008c578063ec342ad011610071578063ec342ad014610954578063f1127ed81461095c578063fa8f3455146109bb57610292565b8063dd62ed3e14610911578063e7a324dc1461094c57610292565b8063b4b5ea57116100bd578063b4b5ea5714610882578063b6fa8576146108b5578063c3cda520146108bd57610292565b8063a457c2d714610810578063a9059cbb1461084957610292565b80637af548c11161012f57806395d89b411161011457806395d89b41146107cd57806397d63f93146107d557806398dca210146107dd57610292565b80637af548c11461076f5780637ecebe001461079a57610292565b80636fcfff451461068457806370a08231146106d057806373f03dff14610703578063782d6fe11461073657610292565b8063252408101161020e5780634bda2e20116101c25780635c19a95c116101a75780635c19a95c1461064157806364dd48f5146106745780636fc6407c1461067c57610292565b80634bda2e2014610606578063587cde1e1461060e57610292565b806339509351116101f357806339509351146105615780633af9e6691461059a57806340c10f19146105cd57610292565b8063252408101461053b578063313ce5671461054357610292565b806312d43a511161026557806318160ddd1161024a57806318160ddd146104e857806320606b70146104f057806323b872dd146104f857610292565b806312d43a51146103ac5780631624f6c6146103b457610292565b806306fdde0314610297578063095ea7b31461031457806311d3e6c41461036157806311fd8a831461037b575b600080fd5b61029f6109ee565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102d95781810151838201526020016102c1565b50505050905090810190601f1680156103065780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61034d6004803603604081101561032a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a99565b604080519115158252519081900360200190f35b610369610b0d565b60408051918252519081900360200190f35b610383610b1d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610383610b39565b6104e6600480360360608110156103ca57600080fd5b8101906020810181356401000000008111156103e557600080fd5b8201836020820111156103f757600080fd5b8035906020019184600183028401116401000000008311171561041957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561046c57600080fd5b82018360208201111561047e57600080fd5b803590602001918460018302840111640100000000831117156104a057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610b5a9050565b005b610369610c27565b610369610c2d565b61034d6004803603606081101561050e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610c48565b610383610e5a565b61054b610e76565b6040805160ff9092168252519081900360200190f35b61034d6004803603604081101561057757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610e7f565b610369600480360360208110156105b057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f32565b61034d600480360360408110156105e357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f5a565b6104e661103f565b6103836004803603602081101561062457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611182565b6104e66004803603602081101561065757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111ad565b6103696111ba565b6103836111c8565b6106b76004803603602081101561069a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111e4565b6040805163ffffffff9092168252519081900360200190f35b610369600480360360208110156106e657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111fc565b6104e66004803603602081101561071957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611247565b6103696004803603604081101561074c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356112f8565b6103696004803603606081101561078557600080fd5b508035906020810135906040013515156115c2565b610369600480360360208110156107b057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661172a565b61029f61173c565b6103696117b2565b6104e6600480360360208110156107f357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166117b8565b61034d6004803603604081101561082657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611869565b61034d6004803603604081101561085f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561198c565b6103696004803603602081101561089857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611b03565b610369611b9e565b6104e6600480360360c08110156108d357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611ba4565b6103696004803603604081101561092757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611f5b565b610369611f93565b610369611fae565b61099b6004803603604081101561097257600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611fba565b6040805163ffffffff909316835260208301919091528051918290030190f35b6104e6600480360360208110156109d157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611fe7565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b820191906000526020600020905b815481529060010190602001808311610a7457829003601f168201915b505050505081565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000610b17612098565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60085415610bc957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251610bdc9060019060208601906129d4565b508151610bf09060029060208501906129d4565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b604051806043612af082396043019050604051809103902081565b60008273ffffffffffffffffffffffffffffffffffffffff8116610c6b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415610c8e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a60209081526040808320338452909152902054610ccf908463ffffffff6120cb16565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60209081526040808320338452909152812091909155600854610d3090610d248669d3c21bcecceda100000063ffffffff61210d16565b9063ffffffff61218016565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260096020526040902054909150610d69908263ffffffff6120cb16565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600960205260408082209390935590871681522054610dab908263ffffffff6121c216565b73ffffffffffffffffffffffffffffffffffffffff80871660008181526009602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a373ffffffffffffffffffffffffffffffffffffffff8087166000908152600c6020526040808220548884168352912054610e4e92918216911683612236565b50600195945050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054610ec0908363ffffffff6121c216565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331480610f9a575060065473ffffffffffffffffffffffffffffffffffffffff1633145b80610fc15750600354610100900473ffffffffffffffffffffffffffffffffffffffff1633145b61102c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74206d696e74657200000000000000000000000000000000000000000000604482015290519081900360640190fd5b6110368383612428565b50600192915050565b60045473ffffffffffffffffffffffffffffffffffffffff1633146110c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380546004805473ffffffffffffffffffffffffffffffffffffffff8181166101009081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff861617958690557fffffffffffffffffffffffff000000000000000000000000000000000000000090921690925560408051938290048316808552919094049091166020830152825190927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523928290030190a150565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600c60205260409020541690565b6111b73382612593565b50565b69d3c21bcecceda100000081565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b60085473ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408120549091610b079169d3c21bcecceda100000091610d24919063ffffffff61210d16565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461127057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b6000438210611352576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612aca6026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205463ffffffff168061138d576000915050610b07565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601811685529252909120541683106114525773ffffffffffffffffffffffffffffffffffffffff84166000908152600d602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff16835292905220600101549050610b07565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832083805290915290205463ffffffff1683101561149a576000915050610b07565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff16111561157e57600282820363ffffffff160481036114ea612a52565b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600d6020908152604080832063ffffffff80861685529083529281902081518083019092528054909316808252600190930154918101919091529087141561155957602001519450610b079350505050565b805163ffffffff1687111561157057819350611577565b6001820392505b50506114c0565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff9094168352929052206001015491505092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff1633146115e957600080fd5b8261163a57600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150600754611723565b6008548261167857611670670de0b6b3a7640000610d24611661828863ffffffff6120cb16565b6008549063ffffffff61210d16565b6008556116c2565b6000611699670de0b6b3a7640000610d24611661828963ffffffff6121c216565b90506116a3612098565b8110156116b45760088190556116c0565b6116bc612098565b6008555b505b600854600b546116d79163ffffffff61210d16565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b600b5481565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146117e157600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896929181900390910190a15050565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091528120548083106118d757336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611919565b6118e7818463ffffffff6120cb16565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008273ffffffffffffffffffffffffffffffffffffffff81166119af57600080fd5b73ffffffffffffffffffffffffffffffffffffffff81163014156119d257600080fd5b6008546000906119f690610d248669d3c21bcecceda100000063ffffffff61210d16565b33600090815260096020526040902054909150611a19908263ffffffff6120cb16565b336000908152600960205260408082209290925573ffffffffffffffffffffffffffffffffffffffff871681522054611a58908263ffffffff6121c216565b73ffffffffffffffffffffffffffffffffffffffff86166000818152600960209081526040918290209390935580518781529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3336000908152600c60205260408082205473ffffffffffffffffffffffffffffffffffffffff88811684529190922054611af8928216911683612236565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e602052604081205463ffffffff1680611b3b576000611723565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101549392505050565b60085481565b60006040518080612af0604391396043019050604051809103902060016040518082805460018160011615610100020316600290048015611c1c5780601f10611bfa576101008083540402835291820191611c1c565b820191906000526020600020905b815481529060010190602001808311611c08575b50509150506040518091039020611c31612638565b30604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405160208183030381529060405280519060200120905060006040518080612bac603a91396040805191829003603a01822060208084019190915273ffffffffffffffffffffffffffffffffffffffff8c1683830152606083018b905260808084018b90528251808503909101815260a0840183528051908201207f190100000000000000000000000000000000000000000000000000000000000060c085015260c2840187905260e2808501829052835180860390910181526101028501808552815191840191909120600091829052610122860180865281905260ff8c1661014287015261016286018b905261018286018a9052935191965092945091926001926101a280830193927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa158015611dcf573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612aa56025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600f602052604090208054600181019091558914611eeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a846021913960400191505060405180910390fd5b87421115611f44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b546025913960400191505060405180910390fd5b611f4e818b612593565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60405180603a612bac8239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461201057600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816120c557fe5b04905090565b600061172383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061263c565b60008261211c57506000610b07565b8282028284828161212957fe5b0414611723576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b336021913960400191505060405180910390fd5b600061172383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126ed565b60008282018381101561172357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156122725750600081115b156124235773ffffffffffffffffffffffffffffffffffffffff83161561234f5773ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081205463ffffffff1690816122cc576000612329565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b9050600061233d828563ffffffff6120cb16565b905061234b8684848461276c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156124235773ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604081205463ffffffff1690816123a4576000612401565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000612415828563ffffffff6121c216565b9050611f538584848461276c565b505050565b60075461243b908263ffffffff6121c216565b60075560085460009061246290610d248469d3c21bcecceda100000063ffffffff61210d16565b600b54909150612478908263ffffffff6121c216565b600b55612483612098565b60085411156124f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178207363616c696e6720666163746f7220746f6f206c6f77000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054612529908263ffffffff6121c216565b73ffffffffffffffffffffffffffffffffffffffff841660008181526009602090815260409182902093909355805191825291810184905281517f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885929181900390910190a1505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600c6020818152604080842080546009845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4612632828483612236565b50505050565b4690565b600081848411156126e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156126aa578181015183820152602001612692565b50505050905090810190601f1680156126d75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183612756576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156126aa578181015183820152602001612692565b50600083858161276257fe5b0495945050505050565b600061279043604051806060016040528060338152602001612b796033913961295c565b905060008463ffffffff16118015612804575073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561286c5773ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612905565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600d84528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009182161787559251600196870155908152600e9092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b60008164010000000084106129cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156126aa578181015183820152602001612692565b509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a1557805160ff1916838001178555612a42565b82800160010185558215612a42579182015b82811115612a42578251825591602001919060010190612a27565b50612a4e929150612a69565b5090565b604080518082019091526000808252602082015290565b610b1a91905b80821115612a4e5760008155600101612a6f56fe59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e636559414d3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726559414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e6564454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7759414d3a3a64656c656761746542795369673a207369676e6174757265206578706972656459414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747344656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a723158204e8c25af4c63a105ba0d5d39be620d29b85923099b4fd510afa27187f12c1eb564736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102925760003560e01c80636fcfff4511610160578063a457c2d7116100d8578063dd62ed3e1161008c578063ec342ad011610071578063ec342ad014610954578063f1127ed81461095c578063fa8f3455146109bb57610292565b8063dd62ed3e14610911578063e7a324dc1461094c57610292565b8063b4b5ea57116100bd578063b4b5ea5714610882578063b6fa8576146108b5578063c3cda520146108bd57610292565b8063a457c2d714610810578063a9059cbb1461084957610292565b80637af548c11161012f57806395d89b411161011457806395d89b41146107cd57806397d63f93146107d557806398dca210146107dd57610292565b80637af548c11461076f5780637ecebe001461079a57610292565b80636fcfff451461068457806370a08231146106d057806373f03dff14610703578063782d6fe11461073657610292565b8063252408101161020e5780634bda2e20116101c25780635c19a95c116101a75780635c19a95c1461064157806364dd48f5146106745780636fc6407c1461067c57610292565b80634bda2e2014610606578063587cde1e1461060e57610292565b806339509351116101f357806339509351146105615780633af9e6691461059a57806340c10f19146105cd57610292565b8063252408101461053b578063313ce5671461054357610292565b806312d43a511161026557806318160ddd1161024a57806318160ddd146104e857806320606b70146104f057806323b872dd146104f857610292565b806312d43a51146103ac5780631624f6c6146103b457610292565b806306fdde0314610297578063095ea7b31461031457806311d3e6c41461036157806311fd8a831461037b575b600080fd5b61029f6109ee565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102d95781810151838201526020016102c1565b50505050905090810190601f1680156103065780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61034d6004803603604081101561032a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a99565b604080519115158252519081900360200190f35b610369610b0d565b60408051918252519081900360200190f35b610383610b1d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610383610b39565b6104e6600480360360608110156103ca57600080fd5b8101906020810181356401000000008111156103e557600080fd5b8201836020820111156103f757600080fd5b8035906020019184600183028401116401000000008311171561041957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561046c57600080fd5b82018360208201111561047e57600080fd5b803590602001918460018302840111640100000000831117156104a057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610b5a9050565b005b610369610c27565b610369610c2d565b61034d6004803603606081101561050e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610c48565b610383610e5a565b61054b610e76565b6040805160ff9092168252519081900360200190f35b61034d6004803603604081101561057757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610e7f565b610369600480360360208110156105b057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f32565b61034d600480360360408110156105e357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f5a565b6104e661103f565b6103836004803603602081101561062457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611182565b6104e66004803603602081101561065757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111ad565b6103696111ba565b6103836111c8565b6106b76004803603602081101561069a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111e4565b6040805163ffffffff9092168252519081900360200190f35b610369600480360360208110156106e657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111fc565b6104e66004803603602081101561071957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611247565b6103696004803603604081101561074c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356112f8565b6103696004803603606081101561078557600080fd5b508035906020810135906040013515156115c2565b610369600480360360208110156107b057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661172a565b61029f61173c565b6103696117b2565b6104e6600480360360208110156107f357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166117b8565b61034d6004803603604081101561082657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611869565b61034d6004803603604081101561085f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561198c565b6103696004803603602081101561089857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611b03565b610369611b9e565b6104e6600480360360c08110156108d357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a00135611ba4565b6103696004803603604081101561092757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611f5b565b610369611f93565b610369611fae565b61099b6004803603604081101561097257600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611fba565b6040805163ffffffff909316835260208301919091528051918290030190f35b6104e6600480360360208110156109d157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611fe7565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b820191906000526020600020905b815481529060010190602001808311610a7457829003601f168201915b505050505081565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6000610b17612098565b90505b90565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60085415610bc957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b8251610bdc9060019060208601906129d4565b508151610bf09060029060208501906129d4565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff929092169190911790555050565b60075481565b604051806043612af082396043019050604051809103902081565b60008273ffffffffffffffffffffffffffffffffffffffff8116610c6b57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116301415610c8e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600a60209081526040808320338452909152902054610ccf908463ffffffff6120cb16565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60209081526040808320338452909152812091909155600854610d3090610d248669d3c21bcecceda100000063ffffffff61210d16565b9063ffffffff61218016565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260096020526040902054909150610d69908263ffffffff6120cb16565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600960205260408082209390935590871681522054610dab908263ffffffff6121c216565b73ffffffffffffffffffffffffffffffffffffffff80871660008181526009602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a373ffffffffffffffffffffffffffffffffffffffff8087166000908152600c6020526040808220548884168352912054610e4e92918216911683612236565b50600195945050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152812054610ec0908363ffffffff6121c216565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331480610f9a575060065473ffffffffffffffffffffffffffffffffffffffff1633145b80610fc15750600354610100900473ffffffffffffffffffffffffffffffffffffffff1633145b61102c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74206d696e74657200000000000000000000000000000000000000000000604482015290519081900360640190fd5b6110368383612428565b50600192915050565b60045473ffffffffffffffffffffffffffffffffffffffff1633146110c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2170656e64696e67000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380546004805473ffffffffffffffffffffffffffffffffffffffff8181166101009081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff861617958690557fffffffffffffffffffffffff000000000000000000000000000000000000000090921690925560408051938290048316808552919094049091166020830152825190927f1f14cfc03e486d23acee577b07bc0b3b23f4888c91fcdba5e0fef5a2549d5523928290030190a150565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600c60205260409020541690565b6111b73382612593565b50565b69d3c21bcecceda100000081565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020526000908152604090205463ffffffff1681565b60085473ffffffffffffffffffffffffffffffffffffffff82166000908152600960205260408120549091610b079169d3c21bcecceda100000091610d24919063ffffffff61210d16565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461127057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f6163d5b9efd962645dd649e6e48a61bcb0f9df00997a2398b80d135a9ab0c61e929181900390910190a15050565b6000438210611352576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612aca6026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205463ffffffff168061138d576000915050610b07565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601811685529252909120541683106114525773ffffffffffffffffffffffffffffffffffffffff84166000908152600d602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff16835292905220600101549050610b07565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832083805290915290205463ffffffff1683101561149a576000915050610b07565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff16111561157e57600282820363ffffffff160481036114ea612a52565b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600d6020908152604080832063ffffffff80861685529083529281902081518083019092528054909316808252600190930154918101919091529087141561155957602001519450610b079350505050565b805163ffffffff1687111561157057819350611577565b6001820392505b50506114c0565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff9094168352929052206001015491505092915050565b60055460009073ffffffffffffffffffffffffffffffffffffffff1633146115e957600080fd5b8261163a57600854604080518681526020810183905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150600754611723565b6008548261167857611670670de0b6b3a7640000610d24611661828863ffffffff6120cb16565b6008549063ffffffff61210d16565b6008556116c2565b6000611699670de0b6b3a7640000610d24611661828963ffffffff6121c216565b90506116a3612098565b8110156116b45760088190556116c0565b6116bc612098565b6008555b505b600854600b546116d79163ffffffff61210d16565b600755600854604080518781526020810184905280820192909252517fc6642d24d84e7f3d36ca39f5cce10e75639d9b158d5193aa350e2f900653e4c09181900360600190a150506007545b9392505050565b600f6020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b600b5481565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146117e157600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f2ee668ca7d17a9122dc00c0bfd73b684f2f7d681f17733cc02b294f69f1b3896929181900390910190a15050565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091528120548083106118d757336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff88168452909152812055611919565b6118e7818463ffffffff6120cb16565b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff891684529091529020555b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60008273ffffffffffffffffffffffffffffffffffffffff81166119af57600080fd5b73ffffffffffffffffffffffffffffffffffffffff81163014156119d257600080fd5b6008546000906119f690610d248669d3c21bcecceda100000063ffffffff61210d16565b33600090815260096020526040902054909150611a19908263ffffffff6120cb16565b336000908152600960205260408082209290925573ffffffffffffffffffffffffffffffffffffffff871681522054611a58908263ffffffff6121c216565b73ffffffffffffffffffffffffffffffffffffffff86166000818152600960209081526040918290209390935580518781529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3336000908152600c60205260408082205473ffffffffffffffffffffffffffffffffffffffff88811684529190922054611af8928216911683612236565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600e602052604081205463ffffffff1680611b3b576000611723565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101549392505050565b60085481565b60006040518080612af0604391396043019050604051809103902060016040518082805460018160011615610100020316600290048015611c1c5780601f10611bfa576101008083540402835291820191611c1c565b820191906000526020600020905b815481529060010190602001808311611c08575b50509150506040518091039020611c31612638565b30604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405160208183030381529060405280519060200120905060006040518080612bac603a91396040805191829003603a01822060208084019190915273ffffffffffffffffffffffffffffffffffffffff8c1683830152606083018b905260808084018b90528251808503909101815260a0840183528051908201207f190100000000000000000000000000000000000000000000000000000000000060c085015260c2840187905260e2808501829052835180860390910181526101028501808552815191840191909120600091829052610122860180865281905260ff8c1661014287015261016286018b905261018286018a9052935191965092945091926001926101a280830193927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa158015611dcf573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612aa56025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600f602052604090208054600181019091558914611eeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a846021913960400191505060405180910390fd5b87421115611f44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b546025913960400191505060405180910390fd5b611f4e818b612593565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60405180603a612bac8239603a019050604051809103902081565b670de0b6b3a764000081565b600d6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461201057600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040805191909216808252602082019390935281517f51f448520e2183de499e224808a409ee01a1f380edb2e8497572320c15030545929181900390910190a15050565b6000600b547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff816120c557fe5b04905090565b600061172383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061263c565b60008261211c57506000610b07565b8282028284828161212957fe5b0414611723576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b336021913960400191505060405180910390fd5b600061172383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126ed565b60008282018381101561172357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156122725750600081115b156124235773ffffffffffffffffffffffffffffffffffffffff83161561234f5773ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081205463ffffffff1690816122cc576000612329565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b9050600061233d828563ffffffff6120cb16565b905061234b8684848461276c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156124235773ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604081205463ffffffff1690816123a4576000612401565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000612415828563ffffffff6121c216565b9050611f538584848461276c565b505050565b60075461243b908263ffffffff6121c216565b60075560085460009061246290610d248469d3c21bcecceda100000063ffffffff61210d16565b600b54909150612478908263ffffffff6121c216565b600b55612483612098565b60085411156124f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d6178207363616c696e6720666163746f7220746f6f206c6f77000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054612529908263ffffffff6121c216565b73ffffffffffffffffffffffffffffffffffffffff841660008181526009602090815260409182902093909355805191825291810184905281517f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885929181900390910190a1505050565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600c6020818152604080842080546009845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4612632828483612236565b50505050565b4690565b600081848411156126e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156126aa578181015183820152602001612692565b50505050905090810190601f1680156126d75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183612756576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156126aa578181015183820152602001612692565b50600083858161276257fe5b0495945050505050565b600061279043604051806060016040528060338152602001612b796033913961295c565b905060008463ffffffff16118015612804575073ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561286c5773ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612905565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600d84528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009182161787559251600196870155908152600e9092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b60008164010000000084106129cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156126aa578181015183820152602001612692565b509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a1557805160ff1916838001178555612a42565b82800160010185558215612a42579182015b82811115612a42578251825591602001919060010190612a27565b50612a4e929150612a69565b5090565b604080518082019091526000808252602082015290565b610b1a91905b80821115612a4e5760008155600101612a6f56fe59414d3a3a64656c656761746542795369673a20696e76616c6964206e6f6e636559414d3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726559414d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e6564454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7759414d3a3a64656c656761746542795369673a207369676e6174757265206578706972656459414d3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747344656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929a265627a7a723158204e8c25af4c63a105ba0d5d39be620d29b85923099b4fd510afa27187f12c1eb564736f6c63430005110032", - "sourceMap": "96:10344:22:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;96:10344:22;;;;;;;", - "deployedSourceMap": "96:10344:22:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;96:10344:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;330:18:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;330:18:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6006:228:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6006:228:22;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;966:131;;;:::i;:::-;;;;;;;;;;;;;;;;793:22:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;602:18;;;:::i;611:279:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;611:279:22;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;;;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;611:279:22;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;611:279:22;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;611:279:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;611:279:22;;-1:-1:-1;;;611:279:22;;;;;-1:-1:-1;611:279:22;;-1:-1:-1;611:279:22:i;:::-;;971:26:28;;;:::i;685:122:26:-;;;:::i;3662:652:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3662:652:22;;;;;;;;;;;;;;;;;;:::i;695:25:28:-;;;:::i;516:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6598:337:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6598:337:22;;;;;;;;;:::i;4773:135::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4773:135:22;;;;:::i;1584:160::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1584:160:22;;;;;;;;;:::i;8873:228::-;;;:::i;698:143:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;698:143:25;;;;:::i;979:102::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;979:102:25;;;;:::i;1083:49:28:-;;;:::i;885:27::-;;;:::i;566:49:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;566:49:26;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4426:170:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4426:170:22;;;;:::i;8579:223::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8579:223:22;;;;:::i;3500:1216:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3500:1216:25;;;;;;;;;:::i;9478:960:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9478:960:22;;;;;;;;;;;;;;:::i;1093:39:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1093:39:26;;;;:::i;421:20:28:-;;;:::i;1498:25::-;;;:::i;8199:241:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8199:241:22;;;;:::i;7189:502::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7189:502:22;;;;;;;;;:::i;2588:825::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2588:825:22;;;;;;;;;:::i;2830:248:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2830:248:25;;;;:::i;1319:32:28:-;;;:::i;1504:1132:25:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1504:1132:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5207:170:22:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5207:170:22;;;;;;;;;;;:::i;898:117:26:-;;;:::i;1196:37:28:-;;;:::i;430:70:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;430:70:26;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;7860:196:22;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7860:196:22;;;;:::i;330:18:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6006:228:22:-;6127:10;6089:4;6109:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;;:46;;;6170:36;;;;;;;6089:4;;6109:38;;6127:10;;6170:36;;;;;;;;-1:-1:-1;6223:4:22;6006:228;;;;;:::o;966:131::-;1041:7;1071:19;:17;:19::i;:::-;1064:26;;966:131;;:::o;793:22:28:-;;;;;;:::o;602:18::-;;;;;;;;;:::o;611:279:22:-;759:17;;:22;751:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;815:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;837:16:22;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;863:8:22;:20;;;;;;;;;;;;;;;-1:-1:-1;;611:279:22:o;971:26:28:-;;;;:::o;685:122:26:-;727:80;;;;;;;;;;;;;;;;;;685:122;:::o;3662:652:22:-;3786:4;3765:2;530:18;;;522:27;;;;;;567:19;;;581:4;567:19;;559:28;;;;;;3874:23;;;;;;;:17;:23;;;;;;;;3898:10;3874:35;;;;;;;;:46;;3914:5;3874:46;:39;:46;:::i;:::-;3836:23;;;;;;;:17;:23;;;;;;;;3860:10;3836:35;;;;;;;:84;;;;4011:17;;3979:50;;:27;:5;1126:6:28;3979:27:22;:9;:27;:::i;:::-;:31;:50;:31;:50;:::i;:::-;4086:18;;;;;;;:12;:18;;;;;;3960:69;;-1:-1:-1;4086:32:22;;3960:69;4086:32;:22;:32;:::i;:::-;4065:18;;;;;;;;:12;:18;;;;;;:53;;;;4147:16;;;;;;;:30;;4168:8;4147:30;:20;:30;:::i;:::-;4128:16;;;;;;;;:12;:16;;;;;;;;;:49;;;;4192:25;;;;;;;4128:16;;4192:25;;;;;;;;;;;;;4243:16;;;;;;;;:10;:16;;;;;;;4261:14;;;;;;;;4228:58;;4243:16;;;;4261:14;4277:8;4228:14;:58::i;:::-;-1:-1:-1;4303:4:22;;3662:652;-1:-1:-1;;;;;3662:652:22:o;695:25:28:-;;;;;;:::o;516:21::-;;;;;;:::o;6598:337:22:-;6787:10;6696:4;6769:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;:54;;6812:10;6769:54;:42;:54;:::i;:::-;6734:10;6716:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;;;;:107;;;6838:69;;;;;;6716:38;;6838:69;;;;;;;;;;;-1:-1:-1;6924:4:22;6598:337;;;;:::o;4773:135::-;4884:17;;4856:7;4884:17;;;:12;:17;;;;;;;4773:135::o;1584:160::-;379:7;;1679:4;;379:7;;365:10;:21;;:51;;-1:-1:-1;404:12:22;;;;390:10;:26;365:51;:72;;;-1:-1:-1;434:3:22;;;;;;;420:10;:17;365:72;357:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1699:17;1705:2;1709:6;1699:5;:17::i;:::-;-1:-1:-1;1733:4:22;1584:160;;;;:::o;8873:228::-;8948:10;;;;8934;:24;8926:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8998:3;;;9017:10;;;8998:3;9017:10;;;8998:3;9011:16;;;;;;;;;;;9037:23;;;;;;;9075:19;;;8998:3;;;;;;9075:19;;;9090:3;;;;;;;9075:19;;;;;;8998:3;;9075:19;;;;;;;;8873:228;:::o;698:143:25:-;813:21;;;;783:7;813:21;;;:10;:21;;;;;;;;698:143::o;979:102::-;1042:32;1052:10;1064:9;1042;:32::i;:::-;979:102;:::o;1083:49:28:-;1126:6;1083:49;:::o;885:27::-;;;;;;:::o;566:49:26:-;;;;;;;;;;;;;;;:::o;4426:170:22:-;4549:17;;4527;;;4499:7;4527:17;;;:12;:17;;;;;;4499:7;;4527:62;;1126:6:28;;4527:40:22;;:17;:40;:21;:40;:::i;8579:223::-;210:3;;;;;;;196:10;:17;188:26;;;;;;8695:10;;;;8715:24;;;;;;;;;;;8754:41;;;8695:10;;;;8754:41;;;;;;;;;;;;;;;;;;;;;;;224:1;8579:223;:::o;3500:1216:25:-;3605:7;3650:12;3636:11;:26;3628:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3738:23;;;3716:19;3738:23;;;:14;:23;;;;;;;;3775:17;3771:56;;3815:1;3808:8;;;;;3771:56;3884:20;;;;;;;:11;:20;;;;;;;;:38;3905:16;;;3884:38;;;;;;;;;:48;;:63;-1:-1:-1;3880:145:25;;3970:20;;;;;;;:11;:20;;;;;;;;3991:16;;;;;3970:38;;;;;;;;4006:1;3970:44;;;-1:-1:-1;3963:51:25;;3880:145;4083:20;;;;;;;:11;:20;;;;;;;;:23;;;;;;;;:33;:23;:33;:47;-1:-1:-1;4079:86:25;;;4153:1;4146:8;;;;;4079:86;4175:12;4216:16;;;4242:418;4257:5;4249:13;;:5;:13;;;4242:418;;;4320:1;4303:13;;;4302:19;;;4294:27;;4362:20;;:::i;:::-;-1:-1:-1;4385:20:25;;;;;;;:11;:20;;;;;;;;:28;;;;;;;;;;;;;4362:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4431:27;;4427:223;;;4485:8;;;;-1:-1:-1;4478:15:25;;-1:-1:-1;;;;4478:15:25;4427:223;4518:12;;:26;;;-1:-1:-1;4514:136:25;;;4572:6;4564:14;;4514:136;;;4634:1;4625:6;:10;4617:18;;4514:136;4242:418;;;;;-1:-1:-1;4676:20:25;;;;;;;:11;:20;;;;;;;;:27;;;;;;;;;;:33;;;;-1:-1:-1;;3500:1216:25;;;;:::o;9478:960:22:-;293:7;;9628;;293;;279:10;:21;271:30;;;;;;9655:15;9651:130;;9703:17;;9689:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9759:11:22;;9752:18;;9651:130;9823:17;;9856:8;9851:425;;9899:53;1227:6:28;9899:43:22;9921:20;1227:6:28;9930:10:22;9921:20;:8;:20;:::i;:::-;9899:17;;;:43;:21;:43;:::i;:53::-;9879:17;:73;9851:425;;;9983:24;10010:53;1227:6:28;10010:43:22;10032:20;1227:6:28;10041:10:22;10032:20;:8;:20;:::i;10010:53::-;9983:80;;10100:19;:17;:19::i;:::-;10081:16;:38;10077:189;;;10139:17;:36;;;10077:189;;;10232:19;:17;:19::i;:::-;10212:17;:39;10077:189;9851:425;;10315:17;;10300:10;;:33;;;:14;:33;:::i;:::-;10286:11;:47;10385:17;;10348:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;10420:11:22;;311:1;9478:960;;;;;:::o;1093:39:26:-;;;;;;;;;;;;;:::o;421:20:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1498:25;;;;:::o;8199:241:22:-;210:3;;;;;;;196:10;:17;188:26;;;;;;8321:12;;;;8343:28;;;;;;;;;;;8386:47;;;8321:12;;;;8386:47;;;;;;;;;;;;;;;;;;;;;;;224:1;8199:241;:::o;7189:502::-;7349:10;7292:4;7331:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;;7383:27;;;7379:201;;7444:10;7467:1;7426:29;;;:17;:29;;;;;;;;;:38;;;;;;;;;:42;7379:201;;;7540:29;:8;7553:15;7540:29;:12;:29;:::i;:::-;7517:10;7499:29;;;;:17;:29;;;;;;;;;:38;;;;;;;;;:70;7379:201;7603:10;7624:29;;;;:17;:29;;;;;;;;7594:69;;;7624:38;;;;;;;;;;;7594:69;;;;;;;;;7603:10;7594:69;;;;;;;;;;;-1:-1:-1;7680:4:22;;7189:502;-1:-1:-1;;;7189:502:22:o;2588:825::-;2694:4;2673:2;530:18;;;522:27;;;;;;567:19;;;581:4;567:19;;559:28;;;;;;3034:17;;2983:16;;3002:50;;:27;:5;1126:6:28;3002:27:22;:9;:27;:::i;:50::-;3141:10;3128:24;;;;:12;:24;;;;;;2983:69;;-1:-1:-1;3128:38:22;;2983:69;3128:38;:28;:38;:::i;:::-;3114:10;3101:24;;;;:12;:24;;;;;;:65;;;;:24;3234:16;;;;;;:30;;3255:8;3234:30;:20;:30;:::i;:::-;3215:16;;;;;;;:12;:16;;;;;;;;;:49;;;;3279:31;;;;;;;3215:16;;3288:10;;3279:31;;;;;;;;;;3347:10;3336:22;;;;:10;:22;;;;;;;;3360:14;;;;;;;;;;3321:64;;3336:22;;;3360:14;3376:8;3321:14;:64::i;:::-;-1:-1:-1;3402:4:22;;2588:825;-1:-1:-1;;;;2588:825:22:o;2830:248:25:-;2964:23;;;2919:7;2964:23;;;:14;:23;;;;;;;;3004:16;:67;;3070:1;3004:67;;;3023:20;;;;;;;:11;:20;;;;;;;;:38;3044:16;;;3023:38;;;;;;;;3059:1;3023:44;;2997:74;2830:248;-1:-1:-1;;;2830:248:25:o;1319:32:28:-;;;;:::o;1504:1132:25:-;1687:23;727:80:26;;;;;;;;;;;;;;;;;;;1813:4:25;1797:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1837:12;:10;:12::i;:::-;1875:4;1736:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;1736:158:25;;;1713:191;;;;;;1687:217;;1915:18;944:71:26;;;;;;;;;;;;;;;;;;;1959:135:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;1959:135:25;;;;;1936:168;;;;;;2155:119;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2155:119:25;;;;;;2132:152;;;;;;;;;-1:-1:-1;2315:26:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1936:168;;-1:-1:-1;2132:152:25;;-1:-1:-1;;;2315:26:25;;;;;;;1959:135;-1:-1:-1;2315:26:25;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2315:26:25;;;;;;-1:-1:-1;;2359:23:25;;;2351:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2451:17;;;;;;;:6;:17;;;;;:19;;;;;;;;2442:28;;2434:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2533:6;2526:3;:13;;2518:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2598:31;2608:9;2619;2598;:31::i;:::-;2591:38;;;;1504:1132;;;;;;;:::o;5207:170:22:-;5336:25;;;;5306:7;5336:25;;;:17;:25;;;;;;;;:34;;;;;;;;;;;;;5207:170::o;898:117:26:-;944:71;;;;;;;;;;;;;;;;;;898:117;:::o;1196:37:28:-;1227:6;1196:37;:::o;430:70:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7860:196:22:-;210:3;;;;;;;196:10;:17;188:26;;;;;;7967:7;;;;7984:18;;;;;;;;;;;8017:32;;;7967:7;;;;8017:32;;;;;;;;;;;;;;;;;;;;;;;224:1;7860:196;:::o;1103:329::-;1179:7;1415:10;;1409:2;1401:24;;;;;;1394:31;;1103:329;:::o;1322:134:18:-;1380:7;1406:43;1410:1;1413;1406:43;;;;;;;;;;;;;;;;;:3;:43::i;2181:459::-;2239:7;2480:6;2476:45;;-1:-1:-1;2509:1:18;2502:8;;2476:45;2543:5;;;2547:1;2543;:5;:1;2566:5;;;;;:10;2558:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3102:130;3160:7;3186:39;3190:1;3193;3186:39;;;;;;;;;;;;;;;;;:3;:39::i;875:176::-;933:7;964:5;;;987:6;;;;979:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5158:929:25;5263:6;5253:16;;:6;:16;;;;:30;;;;;5282:1;5273:6;:10;5253:30;5249:832;;;5303:20;;;;5299:379;;5409:22;;;5390:16;5409:22;;;:14;:22;;;;;;;;;5469:13;:60;;5528:1;5469:60;;;5485:19;;;;;;;:11;:19;;;;;;;;:34;5505:13;;;5485:34;;;;;;;;5517:1;5485:40;;5469:60;5449:80;-1:-1:-1;5547:17:25;5567:21;5449:80;5581:6;5567:21;:13;:21;:::i;:::-;5547:41;;5606:57;5623:6;5631:9;5642;5653;5606:16;:57::i;:::-;5299:379;;;;5696:20;;;;5692:379;;5802:22;;;5783:16;5802:22;;;:14;:22;;;;;;;;;5862:13;:60;;5921:1;5862:60;;;5878:19;;;;;;;:11;:19;;;;;;;;:34;5898:13;;;5878:34;;;;;;;;5910:1;5878:40;;5862:60;5842:80;-1:-1:-1;5940:17:25;5960:21;5842:80;5974:6;5960:21;:13;:21;:::i;:::-;5940:41;;5999:57;6016:6;6024:9;6035;6046;5999:16;:57::i;5692:379::-;5158:929;;;:::o;1750:590:22:-;1866:11;;:23;;1882:6;1866:23;:15;:23;:::i;:::-;1852:11;:37;1980:17;;1928:16;;1947:51;;:28;:6;1126::28;1947:28:22;:10;:28;:::i;:51::-;2049:10;;1928:70;;-1:-1:-1;2049:24:22;;1928:70;2049:24;:14;:24;:::i;:::-;2036:10;:37;2175:19;:17;:19::i;:::-;2154:17;;:40;;2146:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2274:16;;;;;;;:12;:16;;;;;;:30;;2295:8;2274:30;:20;:30;:::i;:::-;2255:16;;;;;;;:12;:16;;;;;;;;;:49;;;;2317:16;;;;;;;;;;;;;;;;;;;;;;;;1750:590;;;:::o;4722:430:25:-;4836:21;;;;4810:23;4836:21;;;:10;:21;;;;;;;;;;4894:12;:23;;;;;;4971:21;;;;:33;;;;;;;;;;;5020:54;;4836:21;;;;;4894:23;;4971:33;;4836:21;;;5020:54;;4810:23;5020:54;5085:60;5100:15;5117:9;5128:16;5085:14;:60::i;:::-;4722:430;;;;:::o;6948:149::-;7056:9;6948:149;:::o;1747:187:18:-;1833:7;1868:12;1860:6;;;;1852:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1852:29:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1903:5:18;;;1747:187::o;3714:272::-;3800:7;3834:12;3827:5;3819:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3819:28:18;;3857:9;3873:1;3869;:5;;;;;;;3714:272;-1:-1:-1;;;;;3714:272:18:o;6093:685:25:-;6264:18;6285:75;6292:12;6285:75;;;;;;;;;;;;;;;;;:6;:75::i;:::-;6264:96;;6390:1;6375:12;:16;;;:85;;;;-1:-1:-1;6395:22:25;;;;;;;:11;:22;;;;;;;;:65;6418:16;;;6395:40;;;;;;;;;:50;:65;;;:50;;:65;6375:85;6371:334;;;6476:22;;;;;;;:11;:22;;;;;;;;:40;6499:16;;;6476:40;;;;;;;;6514:1;6476:46;:57;;;6371:334;;;6603:33;;;;;;;;;;;;;;;;;;;;;6564:22;;;-1:-1:-1;6564:22:25;;;:11;:22;;;;;:36;;;;;;;;;;:72;;;;;;;;;;;;;;;;;;;;;6650:25;;;:14;:25;;;;;;:44;;6678:16;;;6650:44;;;;;;;;;;6371:334;6720:51;;;;;;;;;;;;;;;;;;;;;;;;;;6093:685;;;;;:::o;6784:158::-;6859:6;6896:12;6889:5;6885:9;;6877:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6877:32:25;-1:-1:-1;6933:1:25;;6784:158;-1:-1:-1;;6784:158:25:o;96:10344:22:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;96:10344:22;;;-1:-1:-1;96:10344:22;:::i;:::-;;;:::o;:::-;;;;;;;;;;-1:-1:-1;96:10344:22;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;", - "source": "pragma solidity 0.5.17;\n\n/* import \"./YAMTokenInterface.sol\"; */\nimport \"./YAMGovernance.sol\";\n\ncontract YAMToken is YAMGovernanceToken {\n // Modifiers\n modifier onlyGov() {\n require(msg.sender == gov);\n _;\n }\n\n modifier onlyRebaser() {\n require(msg.sender == rebaser);\n _;\n }\n\n modifier onlyMinter() {\n require(msg.sender == rebaser || msg.sender == incentivizer || msg.sender == gov, \"not minter\");\n _;\n }\n\n modifier validRecipient(address to) {\n require(to != address(0x0));\n require(to != address(this));\n _;\n }\n\n function initialize(\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n )\n public\n {\n require(yamsScalingFactor == 0, \"already initialized\");\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n }\n\n\n /**\n * @notice Computes the current max scaling factor\n */\n function maxScalingFactor()\n external\n view\n returns (uint256)\n {\n return _maxScalingFactor();\n }\n\n function _maxScalingFactor()\n internal\n view\n returns (uint256)\n {\n // scaling factor can only go up to 2**256-1 = initSupply * yamsScalingFactor\n // this is used to check if yamsScalingFactor will be too high to compute balances when rebasing.\n return uint256(-1) / initSupply;\n }\n\n /**\n * @notice Mints new tokens, increasing totalSupply, initSupply, and a users balance.\n * @dev Limited to onlyMinter modifier\n */\n function mint(address to, uint256 amount)\n external\n onlyMinter\n returns (bool)\n {\n _mint(to, amount);\n return true;\n }\n\n function _mint(address to, uint256 amount)\n internal\n {\n // increase totalSupply\n totalSupply = totalSupply.add(amount);\n\n // get underlying value\n uint256 yamValue = amount.mul(internalDecimals).div(yamsScalingFactor);\n\n // increase initSupply\n initSupply = initSupply.add(yamValue);\n\n // make sure the mint didnt push maxScalingFactor too low\n require(yamsScalingFactor <= _maxScalingFactor(), \"max scaling factor too low\");\n\n // add balance\n _yamBalances[to] = _yamBalances[to].add(yamValue);\n emit Mint(to, amount);\n }\n\n /* - ERC20 functionality - */\n\n /**\n * @dev Transfer tokens to a specified address.\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n * @return True on success, false otherwise.\n */\n function transfer(address to, uint256 value)\n external\n validRecipient(to)\n returns (bool)\n {\n // underlying balance is stored in yams, so divide by current scaling factor\n\n // note, this means as scaling factor grows, dust will be untransferrable.\n // minimum transfer value == yamsScalingFactor / 1e24;\n\n // get amount in underlying\n uint256 yamValue = value.mul(internalDecimals).div(yamsScalingFactor);\n\n // sub from balance of sender\n _yamBalances[msg.sender] = _yamBalances[msg.sender].sub(yamValue);\n\n // add to balance of receiver\n _yamBalances[to] = _yamBalances[to].add(yamValue);\n emit Transfer(msg.sender, to, value);\n\n _moveDelegates(_delegates[msg.sender], _delegates[to], yamValue);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another.\n * @param from The address you want to send tokens from.\n * @param to The address you want to transfer to.\n * @param value The amount of tokens to be transferred.\n */\n function transferFrom(address from, address to, uint256 value)\n external\n validRecipient(to)\n returns (bool)\n {\n // decrease allowance\n _allowedFragments[from][msg.sender] = _allowedFragments[from][msg.sender].sub(value);\n\n // get value in yams\n uint256 yamValue = value.mul(internalDecimals).div(yamsScalingFactor);\n\n // sub from from\n _yamBalances[from] = _yamBalances[from].sub(yamValue);\n _yamBalances[to] = _yamBalances[to].add(yamValue);\n emit Transfer(from, to, value);\n\n _moveDelegates(_delegates[from], _delegates[to], yamValue);\n return true;\n }\n\n /**\n * @param who The address to query.\n * @return The balance of the specified address.\n */\n function balanceOf(address who)\n external\n view\n returns (uint256)\n {\n return _yamBalances[who].mul(yamsScalingFactor).div(internalDecimals);\n }\n\n /** @notice Currently returns the internal storage amount\n * @param who The address to query.\n * @return The underlying balance of the specified address.\n */\n function balanceOfUnderlying(address who)\n external\n view\n returns (uint256)\n {\n return _yamBalances[who];\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner has allowed to a spender.\n * @param owner_ The address which owns the funds.\n * @param spender The address which will spend the funds.\n * @return The number of tokens still available for the spender.\n */\n function allowance(address owner_, address spender)\n external\n view\n returns (uint256)\n {\n return _allowedFragments[owner_][spender];\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of\n * msg.sender. This method is included for ERC20 compatibility.\n * increaseAllowance and decreaseAllowance should be used instead.\n * Changing an allowance with this method brings the risk that someone may transfer both\n * the old and the new allowance - if they are both greater than zero - if a transfer\n * transaction is mined before the later approve() call is mined.\n *\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n */\n function approve(address spender, uint256 value)\n external\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Increase the amount of tokens that an owner has allowed to a spender.\n * This method should be used instead of approve() to avoid the double approval vulnerability\n * described above.\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseAllowance(address spender, uint256 addedValue)\n external\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] =\n _allowedFragments[msg.sender][spender].add(addedValue);\n emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner has allowed to a spender.\n *\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue)\n external\n returns (bool)\n {\n uint256 oldValue = _allowedFragments[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _allowedFragments[msg.sender][spender] = 0;\n } else {\n _allowedFragments[msg.sender][spender] = oldValue.sub(subtractedValue);\n }\n emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]);\n return true;\n }\n\n /* - Governance Functions - */\n\n /** @notice sets the rebaser\n * @param rebaser_ The address of the rebaser contract to use for authentication.\n */\n function _setRebaser(address rebaser_)\n external\n onlyGov\n {\n address oldRebaser = rebaser;\n rebaser = rebaser_;\n emit NewRebaser(oldRebaser, rebaser_);\n }\n\n /** @notice sets the incentivizer\n * @param incentivizer_ The address of the rebaser contract to use for authentication.\n */\n function _setIncentivizer(address incentivizer_)\n external\n onlyGov\n {\n address oldIncentivizer = incentivizer;\n incentivizer = incentivizer_;\n emit NewIncentivizer(oldIncentivizer, incentivizer_);\n }\n\n /** @notice sets the pendingGov\n * @param pendingGov_ The address of the rebaser contract to use for authentication.\n */\n function _setPendingGov(address pendingGov_)\n external\n onlyGov\n {\n address oldPendingGov = pendingGov;\n pendingGov = pendingGov_;\n emit NewPendingGov(oldPendingGov, pendingGov_);\n }\n\n /** @notice lets msg.sender accept governance\n *\n */\n function _acceptGov()\n external\n {\n require(msg.sender == pendingGov, \"!pending\");\n address oldGov = gov;\n gov = pendingGov;\n pendingGov = address(0);\n emit NewGov(oldGov, gov);\n }\n\n /* - Extras - */\n\n /**\n * @notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n *\n * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag\n * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n * and targetRate is CpiOracleRate / baseCpi\n */\n function rebase(\n uint256 epoch,\n uint256 indexDelta,\n bool positive\n )\n external\n onlyRebaser\n returns (uint256)\n {\n if (indexDelta == 0) {\n emit Rebase(epoch, yamsScalingFactor, yamsScalingFactor);\n return totalSupply;\n }\n\n uint256 prevYamsScalingFactor = yamsScalingFactor;\n\n if (!positive) {\n yamsScalingFactor = yamsScalingFactor.mul(BASE.sub(indexDelta)).div(BASE);\n } else {\n uint256 newScalingFactor = yamsScalingFactor.mul(BASE.add(indexDelta)).div(BASE);\n if (newScalingFactor < _maxScalingFactor()) {\n yamsScalingFactor = newScalingFactor;\n } else {\n yamsScalingFactor = _maxScalingFactor();\n }\n }\n\n totalSupply = initSupply.mul(yamsScalingFactor);\n emit Rebase(epoch, prevYamsScalingFactor, yamsScalingFactor);\n return totalSupply;\n }\n}\n\ncontract YAM is YAMToken {\n /**\n * @notice Initialize the new money market\n * @param name_ ERC-20 name of this token\n * @param symbol_ ERC-20 symbol of this token\n * @param decimals_ ERC-20 decimal precision of this token\n */\n function initialize(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address initial_owner,\n uint256 initSupply_\n )\n public\n {\n require(initSupply_ > 0, \"0 init supply\");\n\n super.initialize(name_, symbol_, decimals_);\n\n initSupply = initSupply_.mul(10**24/ (BASE));\n totalSupply = initSupply_;\n yamsScalingFactor = BASE;\n _yamBalances[initial_owner] = initSupply_.mul(10**24 / (BASE));\n\n // owner renounces ownership after deployment as they need to set\n // rebaser and incentivizer\n // gov = gov_;\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "exportedSymbols": { - "YAM": [ - 17828 - ], - "YAMToken": [ - 17762 - ] - }, - "id": 17829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17055, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:22" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol", - "file": "./YAMGovernance.sol", - "id": 17056, - "nodeType": "ImportDirective", - "scope": 17829, - "sourceUnit": 18931, - "src": "65:29:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17057, - "name": "YAMGovernanceToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18930, - "src": "117:18:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - }, - "id": 17058, - "nodeType": "InheritanceSpecifier", - "src": "117:18:22" - } - ], - "contractDependencies": [ - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17762, - "linearizedBaseContracts": [ - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17068, - "nodeType": "Block", - "src": "178:54:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17061, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "196:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "196:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17063, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "210:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "196:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "188:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "188:26:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17066, - "nodeType": "ExpressionStatement", - "src": "188:26:22" - }, - { - "id": 17067, - "nodeType": "PlaceholderStatement", - "src": "224:1:22" - } - ] - }, - "documentation": null, - "id": 17069, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17059, - "nodeType": "ParameterList", - "parameters": [], - "src": "175:2:22" - }, - "src": "159:73:22", - "visibility": "internal" - }, - { - "body": { - "id": 17079, - "nodeType": "Block", - "src": "261:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17072, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "279:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "279:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17074, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "293:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "279:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17071, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "271:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "271:30:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17077, - "nodeType": "ExpressionStatement", - "src": "271:30:22" - }, - { - "id": 17078, - "nodeType": "PlaceholderStatement", - "src": "311:1:22" - } - ] - }, - "documentation": null, - "id": 17080, - "name": "onlyRebaser", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17070, - "nodeType": "ParameterList", - "parameters": [], - "src": "258:2:22" - }, - "src": "238:81:22", - "visibility": "internal" - }, - { - "body": { - "id": 17101, - "nodeType": "Block", - "src": "347:123:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17083, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "365:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "365:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17085, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "379:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "365:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17087, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "390:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "390:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17089, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "404:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "390:26:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:51:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17092, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "420:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "420:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17094, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "434:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "420:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:72:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74206d696e746572", - "id": 17097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "439:12:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - }, - "value": "not minter" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - } - ], - "id": 17082, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "357:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "357:95:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17099, - "nodeType": "ExpressionStatement", - "src": "357:95:22" - }, - { - "id": 17100, - "nodeType": "PlaceholderStatement", - "src": "462:1:22" - } - ] - }, - "documentation": null, - "id": 17102, - "name": "onlyMinter", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17081, - "nodeType": "ParameterList", - "parameters": [], - "src": "344:2:22" - }, - "src": "325:145:22", - "visibility": "internal" - }, - { - "body": { - "id": 17123, - "nodeType": "Block", - "src": "512:93:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17107, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "530:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 17109, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "544:3:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 17108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "536:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "536:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "530:18:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "522:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "522:27:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17113, - "nodeType": "ExpressionStatement", - "src": "522:27:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17115, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "567:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17117, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19338, - "src": "581:4:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - ], - "id": 17116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "573:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "573:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "567:19:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "559:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "559:28:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17121, - "nodeType": "ExpressionStatement", - "src": "559:28:22" - }, - { - "id": 17122, - "nodeType": "PlaceholderStatement", - "src": "597:1:22" - } - ] - }, - "documentation": null, - "id": 17124, - "name": "validRecipient", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17104, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17124, - "src": "500:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17103, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "500:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "499:12:22" - }, - "src": "476:129:22", - "visibility": "internal" - }, - { - "body": { - "id": 17152, - "nodeType": "Block", - "src": "741:149:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17134, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "759:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "780:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "759:22:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 17137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "783:21:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 17133, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "751:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "751:54:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17139, - "nodeType": "ExpressionStatement", - "src": "751:54:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17140, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19212, - "src": "815:4:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17141, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17126, - "src": "822:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "815:12:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17143, - "nodeType": "ExpressionStatement", - "src": "815:12:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17144, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19214, - "src": "837:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17145, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17128, - "src": "846:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "837:16:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17147, - "nodeType": "ExpressionStatement", - "src": "837:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17148, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19216, - "src": "863:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17149, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17130, - "src": "874:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "863:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 17151, - "nodeType": "ExpressionStatement", - "src": "863:20:22" - } - ] - }, - "documentation": null, - "id": 17153, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17126, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "640:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17125, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "640:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17128, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "669:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17127, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "669:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17130, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "700:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17129, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "700:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "630:91:22" - }, - "returnParameters": { - "id": 17132, - "nodeType": "ParameterList", - "parameters": [], - "src": "741:0:22" - }, - "scope": 17762, - "src": "611:279:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17161, - "nodeType": "Block", - "src": "1054:43:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17158, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "1071:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1071:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17157, - "id": 17160, - "nodeType": "Return", - "src": "1064:26:22" - } - ] - }, - "documentation": "@notice Computes the current max scaling factor", - "id": 17162, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17154, - "nodeType": "ParameterList", - "parameters": [], - "src": "991:2:22" - }, - "returnParameters": { - "id": 17157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17162, - "src": "1041:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1041:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1040:9:22" - }, - "scope": 17762, - "src": "966:131:22", - "stateMutability": "view", - "superFunction": 19120, - "visibility": "external" - }, - { - "body": { - "id": 17174, - "nodeType": "Block", - "src": "1192:240:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1409:2:22", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 17168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1410:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 17167, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1401:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 17170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1401:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 17171, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "1415:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1401:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17166, - "id": 17173, - "nodeType": "Return", - "src": "1394:31:22" - } - ] - }, - "documentation": null, - "id": 17175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17163, - "nodeType": "ParameterList", - "parameters": [], - "src": "1129:2:22" - }, - "returnParameters": { - "id": 17166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17165, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17175, - "src": "1179:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1179:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1178:9:22" - }, - "scope": 17762, - "src": "1103:329:22", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17193, - "nodeType": "Block", - "src": "1689:55:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17187, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17177, - "src": "1705:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17188, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17179, - "src": "1709:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17186, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17250, - "src": "1699:5:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1699:17:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17190, - "nodeType": "ExpressionStatement", - "src": "1699:17:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1733:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17185, - "id": 17192, - "nodeType": "Return", - "src": "1726:11:22" - } - ] - }, - "documentation": "@notice Mints new tokens, increasing totalSupply, initSupply, and a users balance.\n@dev Limited to onlyMinter modifier", - "id": 17194, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17182, - "modifierName": { - "argumentTypes": null, - "id": 17181, - "name": "onlyMinter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17102, - "src": "1651:10:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1651:10:22" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17177, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1598:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1598:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17179, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1610:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17178, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1610:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1597:28:22" - }, - "returnParameters": { - "id": 17185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17184, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1679:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17183, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1679:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1678:6:22" - }, - "scope": 17762, - "src": "1584:160:22", - "stateMutability": "nonpayable", - "superFunction": 19172, - "visibility": "external" - }, - { - "body": { - "id": 17249, - "nodeType": "Block", - "src": "1814:526:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17201, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1852:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17204, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1882:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17202, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1866:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "1866:15:22", - "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": 17205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1866:23:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1852:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17207, - "nodeType": "ExpressionStatement", - "src": "1852:37:22" - }, - { - "assignments": [ - 17209 - ], - "declarations": [ - { - "constant": false, - "id": 17209, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17249, - "src": "1928:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17208, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1928:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17217, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17215, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "1980:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17212, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "1958:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17210, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1947:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1947:10:22", - "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": 17213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:28:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1947:32:22", - "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": 17216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:51:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1928:70:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17218, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2036:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17221, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2064:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17219, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2049:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2049:14:22", - "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": 17222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2049:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2036:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17224, - "nodeType": "ExpressionStatement", - "src": "2036:37:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17226, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "2154:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17227, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "2175:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2175:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2154:40:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d6178207363616c696e6720666163746f7220746f6f206c6f77", - "id": 17230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2196:28:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - }, - "value": "max scaling factor too low" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - } - ], - "id": 17225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2146:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2146:79:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17232, - "nodeType": "ExpressionStatement", - "src": "2146:79:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17233, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2255:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17235, - "indexExpression": { - "argumentTypes": null, - "id": 17234, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2268:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2255:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17240, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2295:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17236, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2274:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17238, - "indexExpression": { - "argumentTypes": null, - "id": 17237, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2287:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2274:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2274:20:22", - "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": 17241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2274:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2255:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17243, - "nodeType": "ExpressionStatement", - "src": "2255:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17245, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2322:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17246, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "2326:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17244, - "name": "Mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19045, - "src": "2317:4:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2317:16:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17248, - "nodeType": "EmitStatement", - "src": "2312:21:22" - } - ] - }, - "documentation": null, - "id": 17250, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17196, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1765:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1765:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17198, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1777:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1777:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1764:28:22" - }, - "returnParameters": { - "id": 17200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1814:0:22" - }, - "scope": 17762, - "src": "1750:590:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17316, - "nodeType": "Block", - "src": "2704:709:22", - "statements": [ - { - "assignments": [ - 17263 - ], - "declarations": [ - { - "constant": false, - "id": 17263, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17316, - "src": "2983:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17271, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17269, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "3034:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17266, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3012:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17264, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3002:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3002:9:22", - "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": 17267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3002:31:22", - "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": 17270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2983:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17272, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3101:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17275, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17273, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3114:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3114:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3101:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17281, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3157:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17276, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17279, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17277, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3141:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3141:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3128:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3128:28:22", - "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": 17282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3128:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3101:65:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17284, - "nodeType": "ExpressionStatement", - "src": "3101:65:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17285, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3215:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17287, - "indexExpression": { - "argumentTypes": null, - "id": 17286, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3228:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3215:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17292, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3255:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17288, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3234:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17290, - "indexExpression": { - "argumentTypes": null, - "id": 17289, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3247:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3234:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "3234:20:22", - "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": 17293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3234:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3215:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17295, - "nodeType": "ExpressionStatement", - "src": "3215:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17297, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3288:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3288:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17299, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3300:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17300, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3304:5:22", - "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" - } - ], - "id": 17296, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "3279:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3279:31:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17302, - "nodeType": "EmitStatement", - "src": "3274:36:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17304, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3336:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17307, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17305, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3347:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3347:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3336:22:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17308, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3360:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17310, - "indexExpression": { - "argumentTypes": null, - "id": 17309, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3371:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3360:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17311, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3376:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17303, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "3321:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3321:64:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17313, - "nodeType": "ExpressionStatement", - "src": "3321:64:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17261, - "id": 17315, - "nodeType": "Return", - "src": "3395:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens to a specified address.\n@param to The address to transfer to.\n@param value The amount to be transferred.\n@return True on success, false otherwise.", - "id": 17317, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "2673:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17258, - "modifierName": { - "argumentTypes": null, - "id": 17256, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "2658:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2658:18:22" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17252, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2606:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2606:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17254, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2618:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2618:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2605:27:22" - }, - "returnParameters": { - "id": 17261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17260, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2694:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17259, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2694:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2693:6:22" - }, - "scope": 17762, - "src": "2588:825:22", - "stateMutability": "nonpayable", - "superFunction": 19054, - "visibility": "external" - }, - { - "body": { - "id": 17398, - "nodeType": "Block", - "src": "3796:518:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17331, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3836:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17335, - "indexExpression": { - "argumentTypes": null, - "id": 17332, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3854:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3836:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17336, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17333, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3860:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3860:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3836:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17344, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3914:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17337, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3874:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17339, - "indexExpression": { - "argumentTypes": null, - "id": 17338, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3892:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17342, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17340, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3898:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3898:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3874:39:22", - "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": 17345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3874:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3836:84:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17347, - "nodeType": "ExpressionStatement", - "src": "3836:84:22" - }, - { - "assignments": [ - 17349 - ], - "declarations": [ - { - "constant": false, - "id": 17349, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17398, - "src": "3960:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17348, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3960:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17357, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17355, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4011:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17352, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3989:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17350, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3979:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3979:9:22", - "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": 17353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3979:31:22", - "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": 17356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3960:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17358, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4065:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17360, - "indexExpression": { - "argumentTypes": null, - "id": 17359, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4078:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4065:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17365, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4109:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17361, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4086:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17363, - "indexExpression": { - "argumentTypes": null, - "id": 17362, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4099:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4086:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "4086:22:22", - "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": 17366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4086:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4065:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17368, - "nodeType": "ExpressionStatement", - "src": "4065:53:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17369, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17371, - "indexExpression": { - "argumentTypes": null, - "id": 17370, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4141:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4128:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17376, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4168:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17372, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4147:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17374, - "indexExpression": { - "argumentTypes": null, - "id": 17373, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4160:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4147:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "4147:20:22", - "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": 17377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4147:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4128:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17379, - "nodeType": "ExpressionStatement", - "src": "4128:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17381, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4201:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17382, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4207:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17383, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "4211:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17380, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "4192:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4192:25:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17385, - "nodeType": "EmitStatement", - "src": "4187:30:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17387, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4243:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17389, - "indexExpression": { - "argumentTypes": null, - "id": 17388, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4254:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4243:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17390, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4261:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17392, - "indexExpression": { - "argumentTypes": null, - "id": 17391, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4272:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4261:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17393, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4277:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17386, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "4228:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4228:58:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17395, - "nodeType": "ExpressionStatement", - "src": "4228:58:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17396, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4303:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17330, - "id": 17397, - "nodeType": "Return", - "src": "4296:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another.\n@param from The address you want to send tokens from.\n@param to The address you want to transfer to.\n@param value The amount of tokens to be transferred.", - "id": 17399, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17326, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "3765:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17327, - "modifierName": { - "argumentTypes": null, - "id": 17325, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "3750:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "3750:18:22" - } - ], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17319, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3684:12:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17318, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3684:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17321, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3698:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17320, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3698:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17323, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3710:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17322, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3710:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3683:41:22" - }, - "returnParameters": { - "id": 17330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3786:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17328, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3786:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3785:6:22" - }, - "scope": 17762, - "src": "3662:652:22", - "stateMutability": "nonpayable", - "superFunction": 19065, - "visibility": "external" - }, - { - "body": { - "id": 17416, - "nodeType": "Block", - "src": "4512:84:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17413, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "4572:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17410, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4549:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17406, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4527:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17408, - "indexExpression": { - "argumentTypes": null, - "id": 17407, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17401, - "src": "4540:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4527:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "4527:21:22", - "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": 17411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:40:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "4527:44:22", - "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": 17414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17405, - "id": 17415, - "nodeType": "Return", - "src": "4520:69:22" - } - ] - }, - "documentation": "@param who The address to query.\n@return The balance of the specified address.", - "id": 17417, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17401, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4445:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4445:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4444:13:22" - }, - "returnParameters": { - "id": 17405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4499:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4499:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4498:9:22" - }, - "scope": 17762, - "src": "4426:170:22", - "stateMutability": "view", - "superFunction": 19072, - "visibility": "external" - }, - { - "body": { - "id": 17428, - "nodeType": "Block", - "src": "4869:39:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17424, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4884:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17426, - "indexExpression": { - "argumentTypes": null, - "id": 17425, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17419, - "src": "4897:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4884:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17423, - "id": 17427, - "nodeType": "Return", - "src": "4877:24:22" - } - ] - }, - "documentation": "@notice Currently returns the internal storage amount\n@param who The address to query.\n@return The underlying balance of the specified address.", - "id": 17429, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17419, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4802:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17418, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4802:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4801:13:22" - }, - "returnParameters": { - "id": 17423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4856:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17421, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4856:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4855:9:22" - }, - "scope": 17762, - "src": "4773:135:22", - "stateMutability": "view", - "superFunction": 19079, - "visibility": "external" - }, - { - "body": { - "id": 17444, - "nodeType": "Block", - "src": "5319:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17438, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "5336:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17440, - "indexExpression": { - "argumentTypes": null, - "id": 17439, - "name": "owner_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17431, - "src": "5354:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:25:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17442, - "indexExpression": { - "argumentTypes": null, - "id": 17441, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17433, - "src": "5362:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:34:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17437, - "id": 17443, - "nodeType": "Return", - "src": "5329:41:22" - } - ] - }, - "documentation": "@dev Function to check the amount of tokens that an owner has allowed to a spender.\n@param owner_ The address which owns the funds.\n@param spender The address which will spend the funds.\n@return The number of tokens still available for the spender.", - "id": 17445, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17431, - "name": "owner_", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5226:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17430, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5226:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17433, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5242:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17432, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5242:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5225:33:22" - }, - "returnParameters": { - "id": 17437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17436, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5306:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5306:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5305:9:22" - }, - "scope": 17762, - "src": "5207:170:22", - "stateMutability": "view", - "superFunction": 19088, - "visibility": "external" - }, - { - "body": { - "id": 17472, - "nodeType": "Block", - "src": "6099:135:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17454, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6109:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17458, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6127:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6127:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6109:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17459, - "indexExpression": { - "argumentTypes": null, - "id": 17457, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6139:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6109:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17460, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6150:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6109:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17462, - "nodeType": "ExpressionStatement", - "src": "6109:46:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17464, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6179:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6179:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17466, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6191:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17467, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6200:5:22", - "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" - } - ], - "id": 17463, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6170:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6170:36:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17469, - "nodeType": "EmitStatement", - "src": "6165:41:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17453, - "id": 17471, - "nodeType": "Return", - "src": "6216:11:22" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of\nmsg.sender. This method is included for ERC20 compatibility.\nincreaseAllowance and decreaseAllowance should be used instead.\nChanging an allowance with this method brings the risk that someone may transfer both\nthe old and the new allowance - if they are both greater than zero - if a transfer\ntransaction is mined before the later approve() call is mined.\n * @param spender The address which will spend the funds.\n@param value The amount of tokens to be spent.", - "id": 17473, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17447, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6023:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17446, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6023:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17449, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6040:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17448, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6040:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6022:32:22" - }, - "returnParameters": { - "id": 17453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6089:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17451, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6089:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6088:6:22" - }, - "scope": 17762, - "src": "6006:228:22", - "stateMutability": "nonpayable", - "superFunction": 19097, - "visibility": "external" - }, - { - "body": { - "id": 17513, - "nodeType": "Block", - "src": "6706:229:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17482, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6716:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17486, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17483, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6734:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6734:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6716:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17487, - "indexExpression": { - "argumentTypes": null, - "id": 17485, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6746:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6716:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17495, - "name": "addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17477, - "src": "6812:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17488, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6769:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17491, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17489, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6787:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6787:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17493, - "indexExpression": { - "argumentTypes": null, - "id": 17492, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6799:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "6769:42:22", - "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": 17496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6769:54:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6716:107:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17498, - "nodeType": "ExpressionStatement", - "src": "6716:107:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17500, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6847:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6847:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17502, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6859:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17503, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6868:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17506, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17504, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6886:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6886:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17508, - "indexExpression": { - "argumentTypes": null, - "id": 17507, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6898:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:38:22", - "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" - } - ], - "id": 17499, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6838:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6838:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17510, - "nodeType": "EmitStatement", - "src": "6833:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17481, - "id": 17512, - "nodeType": "Return", - "src": "6917:11:22" - } - ] - }, - "documentation": "@dev Increase the amount of tokens that an owner has allowed to a spender.\nThis method should be used instead of approve() to avoid the double approval vulnerability\ndescribed above.\n@param spender The address which will spend the funds.\n@param addedValue The amount of tokens to increase the allowance by.", - "id": 17514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17475, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6625:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17474, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6625:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17477, - "name": "addedValue", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6642:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6642:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6624:37:22" - }, - "returnParameters": { - "id": 17481, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17480, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6696:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17479, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6696:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6695:6:22" - }, - "scope": 17762, - "src": "6598:337:22", - "stateMutability": "nonpayable", - "superFunction": 19106, - "visibility": "external" - }, - { - "body": { - "id": 17573, - "nodeType": "Block", - "src": "7302:389:22", - "statements": [ - { - "assignments": [ - 17524 - ], - "declarations": [ - { - "constant": false, - "id": 17524, - "name": "oldValue", - "nodeType": "VariableDeclaration", - "scope": 17573, - "src": "7312:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7312:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17531, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17525, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7331:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17528, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17526, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7349:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7349:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17530, - "indexExpression": { - "argumentTypes": null, - "id": 17529, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7361:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7312:57:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17532, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7383:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 17533, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7402:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7383:27:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17557, - "nodeType": "Block", - "src": "7485:95:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17545, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7499:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17549, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17546, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7517:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7517:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7499:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17550, - "indexExpression": { - "argumentTypes": null, - "id": 17548, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7529:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7499:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17553, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7553:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17551, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7540:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "7540:12:22", - "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": 17554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7540:29:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7499:70:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17556, - "nodeType": "ExpressionStatement", - "src": "7499:70:22" - } - ] - }, - "id": 17558, - "nodeType": "IfStatement", - "src": "7379:201:22", - "trueBody": { - "id": 17544, - "nodeType": "Block", - "src": "7412:67:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17535, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7426:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17539, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7444:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7444:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7426:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17540, - "indexExpression": { - "argumentTypes": null, - "id": 17538, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7456:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7426:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 17541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7467:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7426:42:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17543, - "nodeType": "ExpressionStatement", - "src": "7426:42:22" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17560, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7603:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7603:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17562, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7615:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17563, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7624:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17566, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17564, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7642:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7642:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17568, - "indexExpression": { - "argumentTypes": null, - "id": 17567, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7654:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:38:22", - "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" - } - ], - "id": 17559, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "7594:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7594:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17570, - "nodeType": "EmitStatement", - "src": "7589:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17571, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7680:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17522, - "id": 17572, - "nodeType": "Return", - "src": "7673:11:22" - } - ] - }, - "documentation": "@dev Decrease the amount of tokens that an owner has allowed to a spender.\n * @param spender The address which will spend the funds.\n@param subtractedValue The amount of tokens to decrease the allowance by.", - "id": 17574, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17519, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17516, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7216:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7216:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17518, - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7233:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7233:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7215:42:22" - }, - "returnParameters": { - "id": 17522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17521, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7292:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17520, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7292:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7291:6:22" - }, - "scope": 17762, - "src": "7189:502:22", - "stateMutability": "nonpayable", - "superFunction": 19115, - "visibility": "external" - }, - { - "body": { - "id": 17594, - "nodeType": "Block", - "src": "7936:120:22", - "statements": [ - { - "assignments": [ - 17582 - ], - "declarations": [ - { - "constant": false, - "id": 17582, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 17594, - "src": "7946:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7946:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17584, - "initialValue": { - "argumentTypes": null, - "id": 17583, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7967:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7946:28:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17585, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7984:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17586, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "7994:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7984:18:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17588, - "nodeType": "ExpressionStatement", - "src": "7984:18:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17590, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17582, - "src": "8028:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17591, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "8040:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17589, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19017, - "src": "8017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8017:32:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17593, - "nodeType": "EmitStatement", - "src": "8012:37:22" - } - ] - }, - "documentation": "@notice sets the rebaser\n@param rebaser_ The address of the rebaser contract to use for authentication.", - "id": 17595, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17579, - "modifierName": { - "argumentTypes": null, - "id": 17578, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "7924:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7924:7:22" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17577, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17576, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 17595, - "src": "7881:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17575, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7881:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7880:18:22" - }, - "returnParameters": { - "id": 17580, - "nodeType": "ParameterList", - "parameters": [], - "src": "7936:0:22" - }, - "scope": 17762, - "src": "7860:196:22", - "stateMutability": "nonpayable", - "superFunction": 19188, - "visibility": "external" - }, - { - "body": { - "id": 17615, - "nodeType": "Block", - "src": "8285:155:22", - "statements": [ - { - "assignments": [ - 17603 - ], - "declarations": [ - { - "constant": false, - "id": 17603, - "name": "oldIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 17615, - "src": "8295:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17602, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8295:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17605, - "initialValue": { - "argumentTypes": null, - "id": 17604, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8321:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8295:38:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17606, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8343:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17607, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8358:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8343:28:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17609, - "nodeType": "ExpressionStatement", - "src": "8343:28:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17611, - "name": "oldIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17603, - "src": "8402:15:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17612, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8419:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17610, - "name": "NewIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19023, - "src": "8386:15:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8386:47:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17614, - "nodeType": "EmitStatement", - "src": "8381:52:22" - } - ] - }, - "documentation": "@notice sets the incentivizer\n@param incentivizer_ The address of the rebaser contract to use for authentication.", - "id": 17616, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17600, - "modifierName": { - "argumentTypes": null, - "id": 17599, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8273:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8273:7:22" - } - ], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17597, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 17616, - "src": "8225:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17596, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8225:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8224:23:22" - }, - "returnParameters": { - "id": 17601, - "nodeType": "ParameterList", - "parameters": [], - "src": "8285:0:22" - }, - "scope": 17762, - "src": "8199:241:22", - "stateMutability": "nonpayable", - "superFunction": 19193, - "visibility": "external" - }, - { - "body": { - "id": 17636, - "nodeType": "Block", - "src": "8661:141:22", - "statements": [ - { - "assignments": [ - 17624 - ], - "declarations": [ - { - "constant": false, - "id": 17624, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 17636, - "src": "8671:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17623, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8671:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17626, - "initialValue": { - "argumentTypes": null, - "id": 17625, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8695:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8671:34:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17627, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8715:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17628, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8728:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8715:24:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17630, - "nodeType": "ExpressionStatement", - "src": "8715:24:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17632, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17624, - "src": "8768:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17633, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8783:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17631, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19005, - "src": "8754:13:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8754:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17635, - "nodeType": "EmitStatement", - "src": "8749:46:22" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 17637, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17621, - "modifierName": { - "argumentTypes": null, - "id": 17620, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8649:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8649:7:22" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17619, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17618, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 17637, - "src": "8603:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8603:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8602:21:22" - }, - "returnParameters": { - "id": 17622, - "nodeType": "ParameterList", - "parameters": [], - "src": "8661:0:22" - }, - "scope": 17762, - "src": "8579:223:22", - "stateMutability": "nonpayable", - "superFunction": 19198, - "visibility": "external" - }, - { - "body": { - "id": 17667, - "nodeType": "Block", - "src": "8916:185:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17641, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8934:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8934:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17643, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8948:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8934:24:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 17645, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8960:10:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 17640, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8926:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8926:45:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17647, - "nodeType": "ExpressionStatement", - "src": "8926:45:22" - }, - { - "assignments": [ - 17649 - ], - "declarations": [ - { - "constant": false, - "id": 17649, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 17667, - "src": "8981:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17648, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8981:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17651, - "initialValue": { - "argumentTypes": null, - "id": 17650, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "8998:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8981:20:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17652, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9011:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17653, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "9011:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17655, - "nodeType": "ExpressionStatement", - "src": "9011:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17656, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9037:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9058:1:22", - "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": 17657, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9050:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9050:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9037:23:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17661, - "nodeType": "ExpressionStatement", - "src": "9037:23:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17663, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17649, - "src": "9082:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17664, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9090:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17662, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19011, - "src": "9075:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9075:19:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17666, - "nodeType": "EmitStatement", - "src": "9070:24:22" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 17668, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17638, - "nodeType": "ParameterList", - "parameters": [], - "src": "8892:2:22" - }, - "returnParameters": { - "id": 17639, - "nodeType": "ParameterList", - "parameters": [], - "src": "8916:0:22" - }, - "scope": 17762, - "src": "8873:228:22", - "stateMutability": "nonpayable", - "superFunction": 19201, - "visibility": "external" - }, - { - "body": { - "id": 17760, - "nodeType": "Block", - "src": "9641:797:22", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17681, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9655:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9669:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9655:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17693, - "nodeType": "IfStatement", - "src": "9651:130:22", - "trueBody": { - "id": 17692, - "nodeType": "Block", - "src": "9672:109:22", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17685, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "9696:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17686, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9703:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17687, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9722:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17684, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "9689:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9689:51:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17689, - "nodeType": "EmitStatement", - "src": "9684:56:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17690, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "9759:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17691, - "nodeType": "Return", - "src": "9752:18:22" - } - ] - } - }, - { - "assignments": [ - 17695 - ], - "declarations": [ - { - "constant": false, - "id": 17695, - "name": "prevYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17760, - "src": "9791:29:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17694, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9791:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17697, - "initialValue": { - "argumentTypes": null, - "id": 17696, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9823:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9791:49:22" - }, - { - "condition": { - "argumentTypes": null, - "id": 17699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9855:9:22", - "subExpression": { - "argumentTypes": null, - "id": 17698, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17674, - "src": "9856:8:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17743, - "nodeType": "Block", - "src": "9969:307:22", - "statements": [ - { - "assignments": [ - 17715 - ], - "declarations": [ - { - "constant": false, - "id": 17715, - "name": "newScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17743, - "src": "9983:24:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17726, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17724, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10058:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17720, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "10041:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17718, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10032:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "10032:8:22", - "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": 17721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10032:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17716, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10010:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10010:21:22", - "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": 17722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "10010:47:22", - "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": 17725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9983:80:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17727, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10081:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17728, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10100:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10100:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10081:38:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17741, - "nodeType": "Block", - "src": "10196:70:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17736, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10212:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17737, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10232:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10212:39:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17740, - "nodeType": "ExpressionStatement", - "src": "10212:39:22" - } - ] - }, - "id": 17742, - "nodeType": "IfStatement", - "src": "10077:189:22", - "trueBody": { - "id": 17735, - "nodeType": "Block", - "src": "10121:69:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17731, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10139:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17732, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10159:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10139:36:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17734, - "nodeType": "ExpressionStatement", - "src": "10139:36:22" - } - ] - } - } - ] - }, - "id": 17744, - "nodeType": "IfStatement", - "src": "9851:425:22", - "trueBody": { - "id": 17713, - "nodeType": "Block", - "src": "9866:97:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17700, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9879:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17709, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9947:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17705, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9930:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17703, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9921:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "9921:8:22", - "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": 17706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9921:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17701, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9899:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9899:21:22", - "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": 17707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9899:47:22", - "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": 17710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9879:73:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17712, - "nodeType": "ExpressionStatement", - "src": "9879:73:22" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 17750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17745, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10286:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17748, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10315:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17746, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "10300:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10300:14:22", - "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": 17749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10300:33:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10286:47:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17751, - "nodeType": "ExpressionStatement", - "src": "10286:47:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17753, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "10355:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17754, - "name": "prevYamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17695, - "src": "10362:21:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17755, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10385:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17752, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "10348:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10348:55:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17757, - "nodeType": "EmitStatement", - "src": "10343:60:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17758, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10420:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17759, - "nodeType": "Return", - "src": "10413:18:22" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is CpiOracleRate / baseCpi", - "id": 17761, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17677, - "modifierName": { - "argumentTypes": null, - "id": 17676, - "name": "onlyRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17080, - "src": "9599:11:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9599:11:22" - } - ], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17675, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17670, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9503:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17669, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9503:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17672, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9526:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17671, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9526:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17674, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9554:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17673, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9554:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9493:80:22" - }, - "returnParameters": { - "id": 17680, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17679, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9628:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9628:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9627:9:22" - }, - "scope": 17762, - "src": "9478:960:22", - "stateMutability": "nonpayable", - "superFunction": 19183, - "visibility": "external" - } - ], - "scope": 17829, - "src": "96:10344:22" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17763, - "name": "YAMToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17762, - "src": "10458:8:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - }, - "id": 17764, - "nodeType": "InheritanceSpecifier", - "src": "10458:8:22" - } - ], - "contractDependencies": [ - 17762, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17828, - "linearizedBaseContracts": [ - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17826, - "nodeType": "Block", - "src": "10885:442:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17778, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "10903:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10917:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10903:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "3020696e697420737570706c79", - "id": 17781, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10920:15:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - }, - "value": "0 init supply" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - } - ], - "id": 17777, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10895:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10895:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17783, - "nodeType": "ExpressionStatement", - "src": "10895:41:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17787, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17766, - "src": "10964:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17788, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17768, - "src": "10971:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17789, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17770, - "src": "10980:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "id": 17784, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19341, - "src": "10947:5:22", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAM_$17828", - "typeString": "contract super YAM" - } - }, - "id": 17786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initialize", - "nodeType": "MemberAccess", - "referencedDeclaration": 17153, - "src": "10947:16:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$__$", - "typeString": "function (string memory,string memory,uint8)" - } - }, - "id": 17790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10947:43:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17791, - "nodeType": "ExpressionStatement", - "src": "10947:43:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17792, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "11001:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11030:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11034:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11030:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17798, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11039:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17799, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11038:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11030:14:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17793, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11014:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11014:15:22", - "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": 17801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11014:31:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11001:44:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17803, - "nodeType": "ExpressionStatement", - "src": "11001:44:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17804, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "11055:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17805, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11069:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11055:25:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17807, - "nodeType": "ExpressionStatement", - "src": "11055:25:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17808, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "11090:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17809, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11110:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11090:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17811, - "nodeType": "ExpressionStatement", - "src": "11090:24:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17812, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "11124:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17814, - "indexExpression": { - "argumentTypes": null, - "id": 17813, - "name": "initial_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17772, - "src": "11137:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11124:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17819, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11170:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11174:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11170:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17820, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11180:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17821, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11179:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11170:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17815, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11154:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11154:15:22", - "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": 17823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11154:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11124:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17825, - "nodeType": "ExpressionStatement", - "src": "11124:62:22" - } - ] - }, - "documentation": "@notice Initialize the new money market\n@param name_ ERC-20 name of this token\n@param symbol_ ERC-20 symbol of this token\n@param decimals_ ERC-20 decimal precision of this token", - "id": 17827, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17766, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10724:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10724:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17768, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10753:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17767, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10753:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17770, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10784:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17769, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10784:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17772, - "name": "initial_owner", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10809:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17771, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10809:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17774, - "name": "initSupply_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10840:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17773, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10840:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10714:151:22" - }, - "returnParameters": { - "id": 17776, - "nodeType": "ParameterList", - "parameters": [], - "src": "10885:0:22" - }, - "scope": 17828, - "src": "10695:632:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17829, - "src": "10442:887:22" - } - ], - "src": "0:11330:22" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAM.sol", - "exportedSymbols": { - "YAM": [ - 17828 - ], - "YAMToken": [ - 17762 - ] - }, - "id": 17829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 17055, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:22" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernance.sol", - "file": "./YAMGovernance.sol", - "id": 17056, - "nodeType": "ImportDirective", - "scope": 17829, - "sourceUnit": 18931, - "src": "65:29:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17057, - "name": "YAMGovernanceToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18930, - "src": "117:18:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceToken_$18930", - "typeString": "contract YAMGovernanceToken" - } - }, - "id": 17058, - "nodeType": "InheritanceSpecifier", - "src": "117:18:22" - } - ], - "contractDependencies": [ - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17762, - "linearizedBaseContracts": [ - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAMToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17068, - "nodeType": "Block", - "src": "178:54:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17061, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "196:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "196:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17063, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "210:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "196:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "188:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "188:26:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17066, - "nodeType": "ExpressionStatement", - "src": "188:26:22" - }, - { - "id": 17067, - "nodeType": "PlaceholderStatement", - "src": "224:1:22" - } - ] - }, - "documentation": null, - "id": 17069, - "name": "onlyGov", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17059, - "nodeType": "ParameterList", - "parameters": [], - "src": "175:2:22" - }, - "src": "159:73:22", - "visibility": "internal" - }, - { - "body": { - "id": 17079, - "nodeType": "Block", - "src": "261:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17072, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "279:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "279:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17074, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "293:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "279:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17071, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "271:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "271:30:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17077, - "nodeType": "ExpressionStatement", - "src": "271:30:22" - }, - { - "id": 17078, - "nodeType": "PlaceholderStatement", - "src": "311:1:22" - } - ] - }, - "documentation": null, - "id": 17080, - "name": "onlyRebaser", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17070, - "nodeType": "ParameterList", - "parameters": [], - "src": "258:2:22" - }, - "src": "238:81:22", - "visibility": "internal" - }, - { - "body": { - "id": 17101, - "nodeType": "Block", - "src": "347:123:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 17091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17083, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "365:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "365:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17085, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "379:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "365:21:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17087, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "390:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "390:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17089, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "404:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "390:26:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:51:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17092, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "420:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "420:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17094, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "434:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "420:17:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "365:72:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74206d696e746572", - "id": 17097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "439:12:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - }, - "value": "not minter" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c3f2065c7ea3b20d89603c4967e2aefee454763c2143e29a0c585ad871c002a0", - "typeString": "literal_string \"not minter\"" - } - ], - "id": 17082, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "357:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "357:95:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17099, - "nodeType": "ExpressionStatement", - "src": "357:95:22" - }, - { - "id": 17100, - "nodeType": "PlaceholderStatement", - "src": "462:1:22" - } - ] - }, - "documentation": null, - "id": 17102, - "name": "onlyMinter", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17081, - "nodeType": "ParameterList", - "parameters": [], - "src": "344:2:22" - }, - "src": "325:145:22", - "visibility": "internal" - }, - { - "body": { - "id": 17123, - "nodeType": "Block", - "src": "512:93:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17107, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "530:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 17109, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "544:3:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 17108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "536:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "536:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "530:18:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "522:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "522:27:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17113, - "nodeType": "ExpressionStatement", - "src": "522:27:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17115, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17104, - "src": "567:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17117, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19338, - "src": "581:4:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - ], - "id": 17116, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "573:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "573:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "567:19:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19269, - "src": "559:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 17120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "559:28:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17121, - "nodeType": "ExpressionStatement", - "src": "559:28:22" - }, - { - "id": 17122, - "nodeType": "PlaceholderStatement", - "src": "597:1:22" - } - ] - }, - "documentation": null, - "id": 17124, - "name": "validRecipient", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 17105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17104, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17124, - "src": "500:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17103, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "500:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "499:12:22" - }, - "src": "476:129:22", - "visibility": "internal" - }, - { - "body": { - "id": 17152, - "nodeType": "Block", - "src": "741:149:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17134, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "759:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "780:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "759:22:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "616c726561647920696e697469616c697a6564", - "id": 17137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "783:21:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - }, - "value": "already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6fad3ee6d344e662108f49bced409fae87c3af64246556bdd23a34dddc7e1adc", - "typeString": "literal_string \"already initialized\"" - } - ], - "id": 17133, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "751:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "751:54:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17139, - "nodeType": "ExpressionStatement", - "src": "751:54:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17140, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19212, - "src": "815:4:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17141, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17126, - "src": "822:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "815:12:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17143, - "nodeType": "ExpressionStatement", - "src": "815:12:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17144, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19214, - "src": "837:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17145, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17128, - "src": "846:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "837:16:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 17147, - "nodeType": "ExpressionStatement", - "src": "837:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17148, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19216, - "src": "863:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17149, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17130, - "src": "874:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "863:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 17151, - "nodeType": "ExpressionStatement", - "src": "863:20:22" - } - ] - }, - "documentation": null, - "id": 17153, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17126, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "640:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17125, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "640:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17128, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "669:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17127, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "669:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17130, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17153, - "src": "700:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17129, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "700:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "630:91:22" - }, - "returnParameters": { - "id": 17132, - "nodeType": "ParameterList", - "parameters": [], - "src": "741:0:22" - }, - "scope": 17762, - "src": "611:279:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 17161, - "nodeType": "Block", - "src": "1054:43:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17158, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "1071:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1071:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17157, - "id": 17160, - "nodeType": "Return", - "src": "1064:26:22" - } - ] - }, - "documentation": "@notice Computes the current max scaling factor", - "id": 17162, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17154, - "nodeType": "ParameterList", - "parameters": [], - "src": "991:2:22" - }, - "returnParameters": { - "id": 17157, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17156, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17162, - "src": "1041:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1041:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1040:9:22" - }, - "scope": 17762, - "src": "966:131:22", - "stateMutability": "view", - "superFunction": 19120, - "visibility": "external" - }, - { - "body": { - "id": 17174, - "nodeType": "Block", - "src": "1192:240:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17169, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1409:2:22", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 17168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1410:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 17167, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1401:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 17170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1401:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 17171, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "1415:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1401:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17166, - "id": 17173, - "nodeType": "Return", - "src": "1394:31:22" - } - ] - }, - "documentation": null, - "id": 17175, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17163, - "nodeType": "ParameterList", - "parameters": [], - "src": "1129:2:22" - }, - "returnParameters": { - "id": 17166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17165, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17175, - "src": "1179:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1179:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1178:9:22" - }, - "scope": 17762, - "src": "1103:329:22", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17193, - "nodeType": "Block", - "src": "1689:55:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17187, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17177, - "src": "1705:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17188, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17179, - "src": "1709:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17186, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17250, - "src": "1699:5:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1699:17:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17190, - "nodeType": "ExpressionStatement", - "src": "1699:17:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1733:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17185, - "id": 17192, - "nodeType": "Return", - "src": "1726:11:22" - } - ] - }, - "documentation": "@notice Mints new tokens, increasing totalSupply, initSupply, and a users balance.\n@dev Limited to onlyMinter modifier", - "id": 17194, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17182, - "modifierName": { - "argumentTypes": null, - "id": 17181, - "name": "onlyMinter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17102, - "src": "1651:10:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1651:10:22" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17177, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1598:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17176, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1598:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17179, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1610:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17178, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1610:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1597:28:22" - }, - "returnParameters": { - "id": 17185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17184, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17194, - "src": "1679:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17183, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1679:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1678:6:22" - }, - "scope": 17762, - "src": "1584:160:22", - "stateMutability": "nonpayable", - "superFunction": 19172, - "visibility": "external" - }, - { - "body": { - "id": 17249, - "nodeType": "Block", - "src": "1814:526:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17201, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1852:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17204, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1882:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17202, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "1866:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "1866:15:22", - "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": 17205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1866:23:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1852:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17207, - "nodeType": "ExpressionStatement", - "src": "1852:37:22" - }, - { - "assignments": [ - 17209 - ], - "declarations": [ - { - "constant": false, - "id": 17209, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17249, - "src": "1928:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17208, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1928:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17217, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17215, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "1980:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17212, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "1958:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17210, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "1947:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "1947:10:22", - "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": 17213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:28:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "1947:32:22", - "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": 17216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1947:51:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1928:70:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17218, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2036:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17221, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2064:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17219, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "2049:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2049:14:22", - "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": 17222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2049:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2036:37:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17224, - "nodeType": "ExpressionStatement", - "src": "2036:37:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17226, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "2154:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17227, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "2175:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2175:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2154:40:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6d6178207363616c696e6720666163746f7220746f6f206c6f77", - "id": 17230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2196:28:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - }, - "value": "max scaling factor too low" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f84f88e43426d9d285a72fc9bd59dff603d74c3b8db32e458d73b21e5b343dee", - "typeString": "literal_string \"max scaling factor too low\"" - } - ], - "id": 17225, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "2146:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2146:79:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17232, - "nodeType": "ExpressionStatement", - "src": "2146:79:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17233, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2255:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17235, - "indexExpression": { - "argumentTypes": null, - "id": 17234, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2268:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2255:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17240, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17209, - "src": "2295:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17236, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "2274:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17238, - "indexExpression": { - "argumentTypes": null, - "id": 17237, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2287:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2274:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "2274:20:22", - "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": 17241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2274:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2255:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17243, - "nodeType": "ExpressionStatement", - "src": "2255:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17245, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17196, - "src": "2322:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17246, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17198, - "src": "2326:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17244, - "name": "Mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19045, - "src": "2317:4:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 17247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2317:16:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17248, - "nodeType": "EmitStatement", - "src": "2312:21:22" - } - ] - }, - "documentation": null, - "id": 17250, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17196, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1765:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1765:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17198, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 17250, - "src": "1777:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1777:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1764:28:22" - }, - "returnParameters": { - "id": 17200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1814:0:22" - }, - "scope": 17762, - "src": "1750:590:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 17316, - "nodeType": "Block", - "src": "2704:709:22", - "statements": [ - { - "assignments": [ - 17263 - ], - "declarations": [ - { - "constant": false, - "id": 17263, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17316, - "src": "2983:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17262, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17271, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17269, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "3034:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17266, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3012:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17264, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3002:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3002:9:22", - "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": 17267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3002:31:22", - "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": 17270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3002:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2983:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17272, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3101:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17275, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17273, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3114:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3114:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3101:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17281, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3157:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17276, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17279, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17277, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3141:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3141:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3128:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3128:28:22", - "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": 17282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3128:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3101:65:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17284, - "nodeType": "ExpressionStatement", - "src": "3101:65:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17285, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3215:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17287, - "indexExpression": { - "argumentTypes": null, - "id": 17286, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3228:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3215:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17292, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3255:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17288, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "3234:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17290, - "indexExpression": { - "argumentTypes": null, - "id": 17289, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3247:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3234:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "3234:20:22", - "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": 17293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3234:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3215:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17295, - "nodeType": "ExpressionStatement", - "src": "3215:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17297, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3288:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3288:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17299, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3300:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17300, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17254, - "src": "3304:5:22", - "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" - } - ], - "id": 17296, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "3279:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3279:31:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17302, - "nodeType": "EmitStatement", - "src": "3274:36:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17304, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3336:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17307, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17305, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3347:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3347:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3336:22:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17308, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "3360:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17310, - "indexExpression": { - "argumentTypes": null, - "id": 17309, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "3371:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3360:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17311, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17263, - "src": "3376:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17303, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "3321:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3321:64:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17313, - "nodeType": "ExpressionStatement", - "src": "3321:64:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3402:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17261, - "id": 17315, - "nodeType": "Return", - "src": "3395:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens to a specified address.\n@param to The address to transfer to.\n@param value The amount to be transferred.\n@return True on success, false otherwise.", - "id": 17317, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17252, - "src": "2673:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17258, - "modifierName": { - "argumentTypes": null, - "id": 17256, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "2658:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2658:18:22" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17252, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2606:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2606:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17254, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2618:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17253, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2618:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2605:27:22" - }, - "returnParameters": { - "id": 17261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17260, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17317, - "src": "2694:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17259, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2694:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2693:6:22" - }, - "scope": 17762, - "src": "2588:825:22", - "stateMutability": "nonpayable", - "superFunction": 19054, - "visibility": "external" - }, - { - "body": { - "id": 17398, - "nodeType": "Block", - "src": "3796:518:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17331, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3836:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17335, - "indexExpression": { - "argumentTypes": null, - "id": 17332, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3854:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3836:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17336, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17333, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3860:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3860:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3836:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17344, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3914:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17337, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "3874:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17339, - "indexExpression": { - "argumentTypes": null, - "id": 17338, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "3892:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:23:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17342, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17340, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "3898:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3898:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3874:35:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "3874:39:22", - "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": 17345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3874:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3836:84:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17347, - "nodeType": "ExpressionStatement", - "src": "3836:84:22" - }, - { - "assignments": [ - 17349 - ], - "declarations": [ - { - "constant": false, - "id": 17349, - "name": "yamValue", - "nodeType": "VariableDeclaration", - "scope": 17398, - "src": "3960:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17348, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3960:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17357, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17355, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4011:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17352, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "3989:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17350, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "3979:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "3979:9:22", - "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": 17353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "3979:31:22", - "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": 17356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3979:50:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3960:69:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17358, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4065:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17360, - "indexExpression": { - "argumentTypes": null, - "id": 17359, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4078:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4065:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17365, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4109:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17361, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4086:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17363, - "indexExpression": { - "argumentTypes": null, - "id": 17362, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4099:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4086:18:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "4086:22:22", - "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": 17366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4086:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4065:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17368, - "nodeType": "ExpressionStatement", - "src": "4065:53:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17369, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4128:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17371, - "indexExpression": { - "argumentTypes": null, - "id": 17370, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4141:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4128:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17376, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4168:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17372, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4147:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17374, - "indexExpression": { - "argumentTypes": null, - "id": 17373, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4160:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4147:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "4147:20:22", - "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": 17377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4147:30:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4128:49:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17379, - "nodeType": "ExpressionStatement", - "src": "4128:49:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17381, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4201:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17382, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4207:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17383, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17323, - "src": "4211:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17380, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19031, - "src": "4192:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4192:25:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17385, - "nodeType": "EmitStatement", - "src": "4187:30:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17387, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4243:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17389, - "indexExpression": { - "argumentTypes": null, - "id": 17388, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17319, - "src": "4254:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4243:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17390, - "name": "_delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18937, - "src": "4261:10:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 17392, - "indexExpression": { - "argumentTypes": null, - "id": 17391, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "4272:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4261:14:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17393, - "name": "yamValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17349, - "src": "4277:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17386, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18821, - "src": "4228:14:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4228:58:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17395, - "nodeType": "ExpressionStatement", - "src": "4228:58:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17396, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4303:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17330, - "id": 17397, - "nodeType": "Return", - "src": "4296:11:22" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another.\n@param from The address you want to send tokens from.\n@param to The address you want to transfer to.\n@param value The amount of tokens to be transferred.", - "id": 17399, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 17326, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17321, - "src": "3765:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 17327, - "modifierName": { - "argumentTypes": null, - "id": 17325, - "name": "validRecipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17124, - "src": "3750:14:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "3750:18:22" - } - ], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17319, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3684:12:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17318, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3684:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17321, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3698:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17320, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3698:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17323, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3710:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17322, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3710:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3683:41:22" - }, - "returnParameters": { - "id": 17330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17329, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17399, - "src": "3786:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17328, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3786:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3785:6:22" - }, - "scope": 17762, - "src": "3662:652:22", - "stateMutability": "nonpayable", - "superFunction": 19065, - "visibility": "external" - }, - { - "body": { - "id": 17416, - "nodeType": "Block", - "src": "4512:84:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17413, - "name": "internalDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19231, - "src": "4572:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17410, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "4549:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17406, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4527:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17408, - "indexExpression": { - "argumentTypes": null, - "id": 17407, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17401, - "src": "4540:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4527:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "4527:21:22", - "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": 17411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:40:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "4527:44:22", - "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": 17414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4527:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17405, - "id": 17415, - "nodeType": "Return", - "src": "4520:69:22" - } - ] - }, - "documentation": "@param who The address to query.\n@return The balance of the specified address.", - "id": 17417, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17401, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4445:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17400, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4445:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4444:13:22" - }, - "returnParameters": { - "id": 17405, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17404, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17417, - "src": "4499:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17403, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4499:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4498:9:22" - }, - "scope": 17762, - "src": "4426:170:22", - "stateMutability": "view", - "superFunction": 19072, - "visibility": "external" - }, - { - "body": { - "id": 17428, - "nodeType": "Block", - "src": "4869:39:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17424, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "4884:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17426, - "indexExpression": { - "argumentTypes": null, - "id": 17425, - "name": "who", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17419, - "src": "4897:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4884:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17423, - "id": 17427, - "nodeType": "Return", - "src": "4877:24:22" - } - ] - }, - "documentation": "@notice Currently returns the internal storage amount\n@param who The address to query.\n@return The underlying balance of the specified address.", - "id": 17429, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17419, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4802:11:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17418, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4802:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4801:13:22" - }, - "returnParameters": { - "id": 17423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17429, - "src": "4856:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17421, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4856:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4855:9:22" - }, - "scope": 17762, - "src": "4773:135:22", - "stateMutability": "view", - "superFunction": 19079, - "visibility": "external" - }, - { - "body": { - "id": 17444, - "nodeType": "Block", - "src": "5319:58:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17438, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "5336:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17440, - "indexExpression": { - "argumentTypes": null, - "id": 17439, - "name": "owner_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17431, - "src": "5354:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:25:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17442, - "indexExpression": { - "argumentTypes": null, - "id": 17441, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17433, - "src": "5362:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5336:34:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17437, - "id": 17443, - "nodeType": "Return", - "src": "5329:41:22" - } - ] - }, - "documentation": "@dev Function to check the amount of tokens that an owner has allowed to a spender.\n@param owner_ The address which owns the funds.\n@param spender The address which will spend the funds.\n@return The number of tokens still available for the spender.", - "id": 17445, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17431, - "name": "owner_", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5226:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17430, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5226:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17433, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5242:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17432, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5242:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5225:33:22" - }, - "returnParameters": { - "id": 17437, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17436, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17445, - "src": "5306:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17435, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5306:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5305:9:22" - }, - "scope": 17762, - "src": "5207:170:22", - "stateMutability": "view", - "superFunction": 19088, - "visibility": "external" - }, - { - "body": { - "id": 17472, - "nodeType": "Block", - "src": "6099:135:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17454, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6109:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17458, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6127:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6127:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6109:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17459, - "indexExpression": { - "argumentTypes": null, - "id": 17457, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6139:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6109:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17460, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6150:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6109:46:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17462, - "nodeType": "ExpressionStatement", - "src": "6109:46:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17464, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6179:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6179:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17466, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17447, - "src": "6191:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17467, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17449, - "src": "6200:5:22", - "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" - } - ], - "id": 17463, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6170:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6170:36:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17469, - "nodeType": "EmitStatement", - "src": "6165:41:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17453, - "id": 17471, - "nodeType": "Return", - "src": "6216:11:22" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of\nmsg.sender. This method is included for ERC20 compatibility.\nincreaseAllowance and decreaseAllowance should be used instead.\nChanging an allowance with this method brings the risk that someone may transfer both\nthe old and the new allowance - if they are both greater than zero - if a transfer\ntransaction is mined before the later approve() call is mined.\n * @param spender The address which will spend the funds.\n@param value The amount of tokens to be spent.", - "id": 17473, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17450, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17447, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6023:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17446, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6023:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17449, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6040:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17448, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6040:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6022:32:22" - }, - "returnParameters": { - "id": 17453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17452, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17473, - "src": "6089:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17451, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6089:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6088:6:22" - }, - "scope": 17762, - "src": "6006:228:22", - "stateMutability": "nonpayable", - "superFunction": 19097, - "visibility": "external" - }, - { - "body": { - "id": 17513, - "nodeType": "Block", - "src": "6706:229:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17482, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6716:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17486, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17483, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6734:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6734:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6716:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17487, - "indexExpression": { - "argumentTypes": null, - "id": 17485, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6746:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6716:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17495, - "name": "addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17477, - "src": "6812:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17488, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6769:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17491, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17489, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6787:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6787:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17493, - "indexExpression": { - "argumentTypes": null, - "id": 17492, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6799:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6769:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "6769:42:22", - "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": 17496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6769:54:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6716:107:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17498, - "nodeType": "ExpressionStatement", - "src": "6716:107:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17500, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6847:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6847:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17502, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6859:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17503, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "6868:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17506, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17504, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "6886:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6886:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17508, - "indexExpression": { - "argumentTypes": null, - "id": 17507, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17475, - "src": "6898:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6868:38:22", - "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" - } - ], - "id": 17499, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "6838:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6838:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17510, - "nodeType": "EmitStatement", - "src": "6833:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6924:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17481, - "id": 17512, - "nodeType": "Return", - "src": "6917:11:22" - } - ] - }, - "documentation": "@dev Increase the amount of tokens that an owner has allowed to a spender.\nThis method should be used instead of approve() to avoid the double approval vulnerability\ndescribed above.\n@param spender The address which will spend the funds.\n@param addedValue The amount of tokens to increase the allowance by.", - "id": 17514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17475, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6625:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17474, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6625:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17477, - "name": "addedValue", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6642:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6642:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6624:37:22" - }, - "returnParameters": { - "id": 17481, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17480, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17514, - "src": "6696:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17479, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6696:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6695:6:22" - }, - "scope": 17762, - "src": "6598:337:22", - "stateMutability": "nonpayable", - "superFunction": 19106, - "visibility": "external" - }, - { - "body": { - "id": 17573, - "nodeType": "Block", - "src": "7302:389:22", - "statements": [ - { - "assignments": [ - 17524 - ], - "declarations": [ - { - "constant": false, - "id": 17524, - "name": "oldValue", - "nodeType": "VariableDeclaration", - "scope": 17573, - "src": "7312:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17523, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7312:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17531, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17525, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7331:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17528, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17526, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7349:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7349:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17530, - "indexExpression": { - "argumentTypes": null, - "id": 17529, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7361:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7331:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7312:57:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17532, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7383:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 17533, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7402:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7383:27:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17557, - "nodeType": "Block", - "src": "7485:95:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17545, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7499:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17549, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17546, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7517:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7517:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7499:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17550, - "indexExpression": { - "argumentTypes": null, - "id": 17548, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7529:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7499:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17553, - "name": "subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17518, - "src": "7553:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17551, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17524, - "src": "7540:8:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "7540:12:22", - "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": 17554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7540:29:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7499:70:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17556, - "nodeType": "ExpressionStatement", - "src": "7499:70:22" - } - ] - }, - "id": 17558, - "nodeType": "IfStatement", - "src": "7379:201:22", - "trueBody": { - "id": 17544, - "nodeType": "Block", - "src": "7412:67:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17535, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7426:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17539, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17536, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7444:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7444:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7426:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17540, - "indexExpression": { - "argumentTypes": null, - "id": 17538, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7456:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7426:38:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 17541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7467:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7426:42:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17543, - "nodeType": "ExpressionStatement", - "src": "7426:42:22" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17560, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7603:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7603:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 17562, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7615:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17563, - "name": "_allowedFragments", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19248, - "src": "7624:17:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 17566, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17564, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "7642:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7642:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:29:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17568, - "indexExpression": { - "argumentTypes": null, - "id": 17567, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17516, - "src": "7654:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7624:38:22", - "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" - } - ], - "id": 17559, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19039, - "src": "7594:8:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 17569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7594:69:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17570, - "nodeType": "EmitStatement", - "src": "7589:74:22" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 17571, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7680:4:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 17522, - "id": 17572, - "nodeType": "Return", - "src": "7673:11:22" - } - ] - }, - "documentation": "@dev Decrease the amount of tokens that an owner has allowed to a spender.\n * @param spender The address which will spend the funds.\n@param subtractedValue The amount of tokens to decrease the allowance by.", - "id": 17574, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17519, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17516, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7216:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7216:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17518, - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7233:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7233:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7215:42:22" - }, - "returnParameters": { - "id": 17522, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17521, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17574, - "src": "7292:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17520, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7292:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7291:6:22" - }, - "scope": 17762, - "src": "7189:502:22", - "stateMutability": "nonpayable", - "superFunction": 19115, - "visibility": "external" - }, - { - "body": { - "id": 17594, - "nodeType": "Block", - "src": "7936:120:22", - "statements": [ - { - "assignments": [ - 17582 - ], - "declarations": [ - { - "constant": false, - "id": 17582, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 17594, - "src": "7946:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17581, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7946:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17584, - "initialValue": { - "argumentTypes": null, - "id": 17583, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7967:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7946:28:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17585, - "name": "rebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19222, - "src": "7984:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17586, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "7994:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7984:18:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17588, - "nodeType": "ExpressionStatement", - "src": "7984:18:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17590, - "name": "oldRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17582, - "src": "8028:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17591, - "name": "rebaser_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17576, - "src": "8040:8:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17589, - "name": "NewRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19017, - "src": "8017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8017:32:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17593, - "nodeType": "EmitStatement", - "src": "8012:37:22" - } - ] - }, - "documentation": "@notice sets the rebaser\n@param rebaser_ The address of the rebaser contract to use for authentication.", - "id": 17595, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17579, - "modifierName": { - "argumentTypes": null, - "id": 17578, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "7924:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7924:7:22" - } - ], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17577, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17576, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 17595, - "src": "7881:16:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17575, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7881:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7880:18:22" - }, - "returnParameters": { - "id": 17580, - "nodeType": "ParameterList", - "parameters": [], - "src": "7936:0:22" - }, - "scope": 17762, - "src": "7860:196:22", - "stateMutability": "nonpayable", - "superFunction": 19188, - "visibility": "external" - }, - { - "body": { - "id": 17615, - "nodeType": "Block", - "src": "8285:155:22", - "statements": [ - { - "assignments": [ - 17603 - ], - "declarations": [ - { - "constant": false, - "id": 17603, - "name": "oldIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 17615, - "src": "8295:23:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17602, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8295:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17605, - "initialValue": { - "argumentTypes": null, - "id": 17604, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8321:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8295:38:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17606, - "name": "incentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19224, - "src": "8343:12:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17607, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8358:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8343:28:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17609, - "nodeType": "ExpressionStatement", - "src": "8343:28:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17611, - "name": "oldIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17603, - "src": "8402:15:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17612, - "name": "incentivizer_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17597, - "src": "8419:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17610, - "name": "NewIncentivizer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19023, - "src": "8386:15:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8386:47:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17614, - "nodeType": "EmitStatement", - "src": "8381:52:22" - } - ] - }, - "documentation": "@notice sets the incentivizer\n@param incentivizer_ The address of the rebaser contract to use for authentication.", - "id": 17616, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17600, - "modifierName": { - "argumentTypes": null, - "id": 17599, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8273:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8273:7:22" - } - ], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17597, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 17616, - "src": "8225:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17596, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8225:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8224:23:22" - }, - "returnParameters": { - "id": 17601, - "nodeType": "ParameterList", - "parameters": [], - "src": "8285:0:22" - }, - "scope": 17762, - "src": "8199:241:22", - "stateMutability": "nonpayable", - "superFunction": 19193, - "visibility": "external" - }, - { - "body": { - "id": 17636, - "nodeType": "Block", - "src": "8661:141:22", - "statements": [ - { - "assignments": [ - 17624 - ], - "declarations": [ - { - "constant": false, - "id": 17624, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 17636, - "src": "8671:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17623, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8671:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17626, - "initialValue": { - "argumentTypes": null, - "id": 17625, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8695:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8671:34:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17627, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8715:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17628, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8728:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8715:24:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17630, - "nodeType": "ExpressionStatement", - "src": "8715:24:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17632, - "name": "oldPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17624, - "src": "8768:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17633, - "name": "pendingGov_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17618, - "src": "8783:11:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17631, - "name": "NewPendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19005, - "src": "8754:13:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8754:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17635, - "nodeType": "EmitStatement", - "src": "8749:46:22" - } - ] - }, - "documentation": "@notice sets the pendingGov\n@param pendingGov_ The address of the rebaser contract to use for authentication.", - "id": 17637, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17621, - "modifierName": { - "argumentTypes": null, - "id": 17620, - "name": "onlyGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17069, - "src": "8649:7:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8649:7:22" - } - ], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17619, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17618, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 17637, - "src": "8603:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17617, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8603:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8602:21:22" - }, - "returnParameters": { - "id": 17622, - "nodeType": "ParameterList", - "parameters": [], - "src": "8661:0:22" - }, - "scope": 17762, - "src": "8579:223:22", - "stateMutability": "nonpayable", - "superFunction": 19198, - "visibility": "external" - }, - { - "body": { - "id": 17667, - "nodeType": "Block", - "src": "8916:185:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 17644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 17641, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19266, - "src": "8934:3:22", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 17642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8934:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 17643, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "8948:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8934:24:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "2170656e64696e67", - "id": 17645, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8960:10:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - }, - "value": "!pending" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a5bb950491963be72bf5362b00dec7770d7ee950f7d51fc4749851a6d0cfe90a", - "typeString": "literal_string \"!pending\"" - } - ], - "id": 17640, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "8926:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8926:45:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17647, - "nodeType": "ExpressionStatement", - "src": "8926:45:22" - }, - { - "assignments": [ - 17649 - ], - "declarations": [ - { - "constant": false, - "id": 17649, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 17667, - "src": "8981:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17648, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8981:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17651, - "initialValue": { - "argumentTypes": null, - "id": 17650, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "8998:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8981:20:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17652, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9011:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17653, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9017:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "9011:16:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17655, - "nodeType": "ExpressionStatement", - "src": "9011:16:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17656, - "name": "pendingGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19220, - "src": "9037:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 17658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9058:1:22", - "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": 17657, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9050:7:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 17659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9050:10:22", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9037:23:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 17661, - "nodeType": "ExpressionStatement", - "src": "9037:23:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17663, - "name": "oldGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17649, - "src": "9082:6:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 17664, - "name": "gov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19218, - "src": "9090:3:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 17662, - "name": "NewGov", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19011, - "src": "9075:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 17665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9075:19:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17666, - "nodeType": "EmitStatement", - "src": "9070:24:22" - } - ] - }, - "documentation": "@notice lets msg.sender accept governance\n ", - "id": 17668, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17638, - "nodeType": "ParameterList", - "parameters": [], - "src": "8892:2:22" - }, - "returnParameters": { - "id": 17639, - "nodeType": "ParameterList", - "parameters": [], - "src": "8916:0:22" - }, - "scope": 17762, - "src": "8873:228:22", - "stateMutability": "nonpayable", - "superFunction": 19201, - "visibility": "external" - }, - { - "body": { - "id": 17760, - "nodeType": "Block", - "src": "9641:797:22", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17681, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9655:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9669:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9655:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17693, - "nodeType": "IfStatement", - "src": "9651:130:22", - "trueBody": { - "id": 17692, - "nodeType": "Block", - "src": "9672:109:22", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17685, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "9696:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17686, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9703:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17687, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9722:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17684, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "9689:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9689:51:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17689, - "nodeType": "EmitStatement", - "src": "9684:56:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17690, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "9759:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17691, - "nodeType": "Return", - "src": "9752:18:22" - } - ] - } - }, - { - "assignments": [ - 17695 - ], - "declarations": [ - { - "constant": false, - "id": 17695, - "name": "prevYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17760, - "src": "9791:29:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17694, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9791:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17697, - "initialValue": { - "argumentTypes": null, - "id": 17696, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9823:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9791:49:22" - }, - { - "condition": { - "argumentTypes": null, - "id": 17699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9855:9:22", - "subExpression": { - "argumentTypes": null, - "id": 17698, - "name": "positive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17674, - "src": "9856:8:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17743, - "nodeType": "Block", - "src": "9969:307:22", - "statements": [ - { - "assignments": [ - 17715 - ], - "declarations": [ - { - "constant": false, - "id": 17715, - "name": "newScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 17743, - "src": "9983:24:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9983:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17726, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17724, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10058:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17720, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "10041:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17718, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "10032:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 14832, - "src": "10032:8:22", - "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": 17721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10032:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17716, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10010:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10010:21:22", - "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": 17722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "10010:47:22", - "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": 17725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10010:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9983:80:22" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17727, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10081:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17728, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10100:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10100:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10081:38:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 17741, - "nodeType": "Block", - "src": "10196:70:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17736, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10212:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 17737, - "name": "_maxScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17175, - "src": "10232:17:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 17738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10232:19:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10212:39:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17740, - "nodeType": "ExpressionStatement", - "src": "10212:39:22" - } - ] - }, - "id": 17742, - "nodeType": "IfStatement", - "src": "10077:189:22", - "trueBody": { - "id": 17735, - "nodeType": "Block", - "src": "10121:69:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17733, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17731, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10139:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17732, - "name": "newScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17715, - "src": "10159:16:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10139:36:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17734, - "nodeType": "ExpressionStatement", - "src": "10139:36:22" - } - ] - } - } - ] - }, - "id": 17744, - "nodeType": "IfStatement", - "src": "9851:425:22", - "trueBody": { - "id": 17713, - "nodeType": "Block", - "src": "9866:97:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 17711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17700, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9879:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17709, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9947:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17705, - "name": "indexDelta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17672, - "src": "9930:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17703, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "9921:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 14848, - "src": "9921:8:22", - "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": 17706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9921:20:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17701, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "9899:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "9899:21:22", - "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": 17707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:43:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 14925, - "src": "9899:47:22", - "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": 17710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9899:53:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9879:73:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17712, - "nodeType": "ExpressionStatement", - "src": "9879:73:22" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 17750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17745, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10286:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17748, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10315:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17746, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "10300:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "10300:14:22", - "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": 17749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10300:33:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10286:47:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17751, - "nodeType": "ExpressionStatement", - "src": "10286:47:22" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17753, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17670, - "src": "10355:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17754, - "name": "prevYamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17695, - "src": "10362:21:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 17755, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "10385:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 17752, - "name": "Rebase", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18999, - "src": "10348:6:22", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 17756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10348:55:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17757, - "nodeType": "EmitStatement", - "src": "10343:60:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17758, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "10420:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 17680, - "id": 17759, - "nodeType": "Return", - "src": "10413:18:22" - } - ] - }, - "documentation": "@notice Initiates a new rebase operation, provided the minimum time period has elapsed.\n * @dev The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag\n Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate\n and targetRate is CpiOracleRate / baseCpi", - "id": 17761, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 17677, - "modifierName": { - "argumentTypes": null, - "id": 17676, - "name": "onlyRebaser", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17080, - "src": "9599:11:22", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9599:11:22" - } - ], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17675, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17670, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9503:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17669, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9503:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17672, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9526:18:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17671, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9526:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17674, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9554:13:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 17673, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9554:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9493:80:22" - }, - "returnParameters": { - "id": 17680, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17679, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 17761, - "src": "9628:7:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9628:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9627:9:22" - }, - "scope": 17762, - "src": "9478:960:22", - "stateMutability": "nonpayable", - "superFunction": 19183, - "visibility": "external" - } - ], - "scope": 17829, - "src": "96:10344:22" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 17763, - "name": "YAMToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 17762, - "src": "10458:8:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMToken_$17762", - "typeString": "contract YAMToken" - } - }, - "id": 17764, - "nodeType": "InheritanceSpecifier", - "src": "10458:8:22" - } - ], - "contractDependencies": [ - 17762, - 18930, - 18967, - 19202, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 17828, - "linearizedBaseContracts": [ - 17828, - 17762, - 18930, - 19202, - 18967, - 19251 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 17826, - "nodeType": "Block", - "src": "10885:442:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 17778, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "10903:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 17779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10917:1:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10903:15:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "3020696e697420737570706c79", - "id": 17781, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10920:15:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - }, - "value": "0 init supply" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0f1a05c3e51d0fbafedd9e4050c1e4560b0f01cee2432c0b2da0e0f2ca660d6d", - "typeString": "literal_string \"0 init supply\"" - } - ], - "id": 17777, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19269, - 19270 - ], - "referencedDeclaration": 19270, - "src": "10895:7:22", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 17782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10895:41:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17783, - "nodeType": "ExpressionStatement", - "src": "10895:41:22" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 17787, - "name": "name_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17766, - "src": "10964:5:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17788, - "name": "symbol_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17768, - "src": "10971:7:22", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 17789, - "name": "decimals_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17770, - "src": "10980:9:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "id": 17784, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19341, - "src": "10947:5:22", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAM_$17828", - "typeString": "contract super YAM" - } - }, - "id": 17786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "initialize", - "nodeType": "MemberAccess", - "referencedDeclaration": 17153, - "src": "10947:16:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$__$", - "typeString": "function (string memory,string memory,uint8)" - } - }, - "id": 17790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10947:43:22", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17791, - "nodeType": "ExpressionStatement", - "src": "10947:43:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17792, - "name": "initSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19250, - "src": "11001:10:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11030:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11034:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11030:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17798, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11039:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17799, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11038:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11030:14:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17793, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11014:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11014:15:22", - "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": 17801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11014:31:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11001:44:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17803, - "nodeType": "ExpressionStatement", - "src": "11001:44:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17804, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19226, - "src": "11055:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17805, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11069:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11055:25:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17807, - "nodeType": "ExpressionStatement", - "src": "11055:25:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 17808, - "name": "yamsScalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19238, - "src": "11090:17:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 17809, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11110:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11090:24:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17811, - "nodeType": "ExpressionStatement", - "src": "11090:24:22" - }, - { - "expression": { - "argumentTypes": null, - "id": 17824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 17812, - "name": "_yamBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19242, - "src": "11124:12:22", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 17814, - "indexExpression": { - "argumentTypes": null, - "id": 17813, - "name": "initial_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17772, - "src": "11137:13:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11124:27:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17822, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 17819, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 17817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11170:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 17818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11174:2:22", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "11170:6:22", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 17820, - "name": "BASE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19236, - "src": "11180:4:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 17821, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11179:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11170:15:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 17815, - "name": "initSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17774, - "src": "11154:11:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 14909, - "src": "11154:15:22", - "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": 17823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11154:32:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11124:62:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 17825, - "nodeType": "ExpressionStatement", - "src": "11124:62:22" - } - ] - }, - "documentation": "@notice Initialize the new money market\n@param name_ ERC-20 name of this token\n@param symbol_ ERC-20 symbol of this token\n@param decimals_ ERC-20 decimal precision of this token", - "id": 17827, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 17775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 17766, - "name": "name_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10724:19:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17765, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10724:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17768, - "name": "symbol_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10753:21:22", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17767, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10753:6:22", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17770, - "name": "decimals_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10784:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 17769, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10784:5:22", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17772, - "name": "initial_owner", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10809:21:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 17771, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10809:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 17774, - "name": "initSupply_", - "nodeType": "VariableDeclaration", - "scope": 17827, - "src": "10840:19:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 17773, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10840:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10714:151:22" - }, - "returnParameters": { - "id": 17776, - "nodeType": "ParameterList", - "parameters": [], - "src": "10885:0:22" - }, - "scope": 17828, - "src": "10695:632:22", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 17829, - "src": "10442:887:22" - } - ], - "src": "0:11330:22" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.427Z", - "devdoc": { - "methods": { - "_setIncentivizer(address)": { - "params": { - "incentivizer_": "The address of the rebaser contract to use for authentication." - } - }, - "_setPendingGov(address)": { - "params": { - "pendingGov_": "The address of the rebaser contract to use for authentication." - } - }, - "_setRebaser(address)": { - "params": { - "rebaser_": "The address of the rebaser contract to use for authentication." - } - }, - "allowance(address,address)": { - "details": "Function to check the amount of tokens that an owner has allowed to a spender.", - "params": { - "owner_": "The address which owns the funds.", - "spender": "The address which will spend the funds." - }, - "return": "The number of tokens still available for the spender." - }, - "approve(address,uint256)": { - "details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. This method is included for ERC20 compatibility. increaseAllowance and decreaseAllowance should be used instead. Changing an allowance with this method brings the risk that someone may transfer both the old and the new allowance - if they are both greater than zero - if a transfer transaction is mined before the later approve() call is mined.", - "params": { - "spender": "The address which will spend the funds.", - "value": "The amount of tokens to be spent." - } - }, - "balanceOf(address)": { - "params": { - "who": "The address to query." - }, - "return": "The balance of the specified address." - }, - "balanceOfUnderlying(address)": { - "params": { - "who": "The address to query." - }, - "return": "The underlying balance of the specified address." - }, - "decreaseAllowance(address,uint256)": { - "details": "Decrease the amount of tokens that an owner has allowed to a spender.", - "params": { - "spender": "The address which will spend the funds.", - "subtractedValue": "The amount of tokens to decrease the allowance by." - } - }, - "delegate(address)": { - "params": { - "delegatee": "The address to delegate votes to" - } - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "params": { - "delegatee": "The address to delegate votes to", - "expiry": "The time at which to expire the signature", - "nonce": "The contract state required to match the signature", - "r": "Half of the ECDSA signature pair", - "s": "Half of the ECDSA signature pair", - "v": "The recovery byte of the signature" - } - }, - "delegates(address)": { - "params": { - "delegator": "The address to get delegatee for" - } - }, - "getCurrentVotes(address)": { - "params": { - "account": "The address to get votes balance" - }, - "return": "The number of current votes for `account`" - }, - "getPriorVotes(address,uint256)": { - "details": "Block number must be a finalized block or else this function will revert to prevent misinformation.", - "params": { - "account": "The address of the account to check", - "blockNumber": "The block number to get the vote balance at" - }, - "return": "The number of votes the account had as of the given block" - }, - "increaseAllowance(address,uint256)": { - "details": "Increase the amount of tokens that an owner has allowed to a spender. This method should be used instead of approve() to avoid the double approval vulnerability described above.", - "params": { - "addedValue": "The amount of tokens to increase the allowance by.", - "spender": "The address which will spend the funds." - } - }, - "mint(address,uint256)": { - "details": "Limited to onlyMinter modifier" - }, - "rebase(uint256,uint256,bool)": { - "details": "The supply adjustment equals (totalSupply * DeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi" - }, - "transfer(address,uint256)": { - "details": "Transfer tokens to a specified address.", - "params": { - "to": "The address to transfer to.", - "value": "The amount to be transferred." - }, - "return": "True on success, false otherwise." - }, - "transferFrom(address,address,uint256)": { - "details": "Transfer tokens from one address to another.", - "params": { - "from": "The address you want to send tokens from.", - "to": "The address you want to transfer to.", - "value": "The amount of tokens to be transferred." - } - } - } - }, - "userdoc": { - "methods": { - "_acceptGov()": { - "notice": "lets msg.sender accept governance " - }, - "_setIncentivizer(address)": { - "notice": "sets the incentivizer" - }, - "_setPendingGov(address)": { - "notice": "sets the pendingGov" - }, - "_setRebaser(address)": { - "notice": "sets the rebaser" - }, - "balanceOfUnderlying(address)": { - "notice": "Currently returns the internal storage amount" - }, - "delegate(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "notice": "Delegates votes from signatory to `delegatee`" - }, - "delegates(address)": { - "notice": "Delegate votes from `msg.sender` to `delegatee`" - }, - "getCurrentVotes(address)": { - "notice": "Gets the current votes balance for `account`" - }, - "getPriorVotes(address,uint256)": { - "notice": "Determine the prior number of votes for an account as of a block number" - }, - "maxScalingFactor()": { - "notice": "Computes the current max scaling factor" - }, - "mint(address,uint256)": { - "notice": "Mints new tokens, increasing totalSupply, initSupply, and a users balance." - }, - "rebase(uint256,uint256,bool)": { - "notice": "Initiates a new rebase operation, provided the minimum time period has elapsed." - } - } - } -} \ No newline at end of file diff --git a/build/contracts/YAMTokenInterface.json b/build/contracts/YAMTokenInterface.json deleted file mode 100644 index e28d80d..0000000 --- a/build/contracts/YAMTokenInterface.json +++ /dev/null @@ -1,6552 +0,0 @@ -{ - "contractName": "YAMTokenInterface", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newGov", - "type": "address" - } - ], - "name": "NewGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldIncentivizer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newIncentivizer", - "type": "address" - } - ], - "name": "NewIncentivizer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingGov", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingGov", - "type": "address" - } - ], - "name": "NewPendingGov", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldRebaser", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRebaser", - "type": "address" - } - ], - "name": "NewRebaser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "prevYamsScalingFactor", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newYamsScalingFactor", - "type": "uint256" - } - ], - "name": "Rebase", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "BASE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "incentivizer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "internalDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamsScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "who", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "indexDelta", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "positive", - "type": "bool" - } - ], - "name": "rebase", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "rebaser_", - "type": "address" - } - ], - "name": "_setRebaser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "incentivizer_", - "type": "address" - } - ], - "name": "_setIncentivizer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "pendingGov_", - "type": "address" - } - ], - "name": "_setPendingGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptGov", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGov\",\"type\":\"address\"}],\"name\":\"NewGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldIncentivizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newIncentivizer\",\"type\":\"address\"}],\"name\":\"NewIncentivizer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingGov\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingGov\",\"type\":\"address\"}],\"name\":\"NewPendingGov\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRebaser\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRebaser\",\"type\":\"address\"}],\"name\":\"NewRebaser\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevYamsScalingFactor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newYamsScalingFactor\",\"type\":\"uint256\"}],\"name\":\"Rebase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"incentivizer_\",\"type\":\"address\"}],\"name\":\"_setIncentivizer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingGov_\",\"type\":\"address\"}],\"name\":\"_setPendingGov\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebaser_\",\"type\":\"address\"}],\"name\":\"_setRebaser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"incentivizer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"internalDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexDelta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"positive\",\"type\":\"bool\"}],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamsScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":\"YAMTokenInterface\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol\":{\"keccak256\":\"0x337e9c44bf683ce14c7299e6a59db83f4b1468d75bead7b716cb563ed3cabc39\",\"urls\":[\"bzz-raw://36c77e72c9aad315991ef2eebb85b8ff69bc27a1628468228b940d02f07b623f\",\"dweb:/ipfs/QmcnuBzdk2qhB49NrwMZwhhGqNKRs7cjALqzcnJwTE9ECx\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol\":{\"keccak256\":\"0x369a00875ad1c5db96f69e0dcaea1f82fa69ba0dd480a777c684cfd95ceb642a\",\"urls\":[\"bzz-raw://2af9187c58bafcefd7a27a10f978282332c7068496068b31969d697c75f7319d\",\"dweb:/ipfs/QmPzazkd6wE194CrwtHDcdv3xjx74TVDirhmwkDHGpoRa8\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity 0.5.17;\n\nimport \"./YAMTokenStorage.sol\";\nimport \"./YAMGovernanceStorage.sol\";\n\ncontract YAMTokenInterface is YAMTokenStorage, YAMGovernanceStorage {\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /**\n * @notice Event emitted when tokens are rebased\n */\n event Rebase(uint256 epoch, uint256 prevYamsScalingFactor, uint256 newYamsScalingFactor);\n\n /*** Gov Events ***/\n\n /**\n * @notice Event emitted when pendingGov is changed\n */\n event NewPendingGov(address oldPendingGov, address newPendingGov);\n\n /**\n * @notice Event emitted when gov is changed\n */\n event NewGov(address oldGov, address newGov);\n\n /**\n * @notice Sets the rebaser contract\n */\n event NewRebaser(address oldRebaser, address newRebaser);\n\n /**\n * @notice Sets the incentivizer contract\n */\n event NewIncentivizer(address oldIncentivizer, address newIncentivizer);\n\n /* - ERC20 Events - */\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /* - Extra Events - */\n /**\n * @notice Tokens minted event\n */\n event Mint(address to, uint256 amount);\n\n // Public functions\n function transfer(address to, uint256 value) external returns(bool);\n function transferFrom(address from, address to, uint256 value) external returns(bool);\n function balanceOf(address who) external view returns(uint256);\n function balanceOfUnderlying(address who) external view returns(uint256);\n function allowance(address owner_, address spender) external view returns(uint256);\n function approve(address spender, uint256 value) external returns (bool);\n function increaseAllowance(address spender, uint256 addedValue) external returns (bool);\n function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);\n function maxScalingFactor() external view returns (uint256);\n\n /* - Governance Functions - */\n function getPriorVotes(address account, uint blockNumber) external view returns (uint256);\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) external;\n function delegate(address delegatee) external;\n function delegates(address delegator) external view returns (address);\n function getCurrentVotes(address account) external view returns (uint256);\n\n /* - Permissioned/Governance functions - */\n function mint(address to, uint256 amount) external returns (bool);\n function rebase(uint256 epoch, uint256 indexDelta, bool positive) external returns (uint256);\n function _setRebaser(address rebaser_) external;\n function _setIncentivizer(address incentivizer_) external;\n function _setPendingGov(address pendingGov_) external;\n function _acceptGov() external;\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "exportedSymbols": { - "YAMTokenInterface": [ - 19202 - ] - }, - "id": 19203, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18969, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:27" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol", - "file": "./YAMTokenStorage.sol", - "id": 18970, - "nodeType": "ImportDirective", - "scope": 19203, - "sourceUnit": 19252, - "src": "25:31:27", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol", - "file": "./YAMGovernanceStorage.sol", - "id": 18971, - "nodeType": "ImportDirective", - "scope": 19203, - "sourceUnit": 18968, - "src": "57:36:27", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 18972, - "name": "YAMTokenStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19251, - "src": "125:15:27", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenStorage_$19251", - "typeString": "contract YAMTokenStorage" - } - }, - "id": 18973, - "nodeType": "InheritanceSpecifier", - "src": "125:15:27" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 18974, - "name": "YAMGovernanceStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18967, - "src": "142:20:27", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceStorage_$18967", - "typeString": "contract YAMGovernanceStorage" - } - }, - "id": 18975, - "nodeType": "InheritanceSpecifier", - "src": "142:20:27" - } - ], - "contractDependencies": [ - 18967, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 19202, - "linearizedBaseContracts": [ - 19202, - 18967, - 19251 - ], - "name": "YAMTokenInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice An event thats emitted when an account changes its delegate", - "id": 18983, - "name": "DelegateChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18982, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18977, - "indexed": true, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18983, - "src": "268:25:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18976, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "268:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18979, - "indexed": true, - "name": "fromDelegate", - "nodeType": "VariableDeclaration", - "scope": 18983, - "src": "295:28:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18978, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "295:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18981, - "indexed": true, - "name": "toDelegate", - "nodeType": "VariableDeclaration", - "scope": 18983, - "src": "325:26:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18980, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "325:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "267:85:27" - }, - "src": "246:107:27" - }, - { - "anonymous": false, - "documentation": "@notice An event thats emitted when a delegate account's vote balance changes", - "id": 18991, - "name": "DelegateVotesChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18990, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18985, - "indexed": true, - "name": "delegate", - "nodeType": "VariableDeclaration", - "scope": 18991, - "src": "472:24:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18984, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "472:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18987, - "indexed": false, - "name": "previousBalance", - "nodeType": "VariableDeclaration", - "scope": 18991, - "src": "498:20:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18986, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "498:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18989, - "indexed": false, - "name": "newBalance", - "nodeType": "VariableDeclaration", - "scope": 18991, - "src": "520:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18988, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "520:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "471:65:27" - }, - "src": "445:92:27" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when tokens are rebased", - "id": 18999, - "name": "Rebase", - "nodeType": "EventDefinition", - "parameters": { - "id": 18998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18993, - "indexed": false, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 18999, - "src": "625:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18992, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "625:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18995, - "indexed": false, - "name": "prevYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 18999, - "src": "640:29:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18994, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "640:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18997, - "indexed": false, - "name": "newYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 18999, - "src": "671:28:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18996, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "671:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "624:76:27" - }, - "src": "612:89:27" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 19005, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 19004, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19001, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 19005, - "src": "825:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19000, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "825:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19003, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 19005, - "src": "848:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19002, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "848:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "824:46:27" - }, - "src": "805:66:27" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 19011, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 19010, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19007, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 19011, - "src": "955:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "955:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19009, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 19011, - "src": "971:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19008, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "971:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "954:32:27" - }, - "src": "942:45:27" - }, - { - "anonymous": false, - "documentation": "@notice Sets the rebaser contract", - "id": 19017, - "name": "NewRebaser", - "nodeType": "EventDefinition", - "parameters": { - "id": 19016, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19013, - "indexed": false, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 19017, - "src": "1067:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19012, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1067:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19015, - "indexed": false, - "name": "newRebaser", - "nodeType": "VariableDeclaration", - "scope": 19017, - "src": "1087:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19014, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1087:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1066:40:27" - }, - "src": "1050:57:27" - }, - { - "anonymous": false, - "documentation": "@notice Sets the incentivizer contract", - "id": 19023, - "name": "NewIncentivizer", - "nodeType": "EventDefinition", - "parameters": { - "id": 19022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19019, - "indexed": false, - "name": "oldIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 19023, - "src": "1197:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1197:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19021, - "indexed": false, - "name": "newIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 19023, - "src": "1222:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19020, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1222:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1196:50:27" - }, - "src": "1175:72:27" - }, - { - "anonymous": false, - "documentation": "@notice EIP20 Transfer event", - "id": 19031, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 19030, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19025, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 19031, - "src": "1348:20:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19024, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1348:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19027, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19031, - "src": "1370:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19026, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1370:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19029, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19031, - "src": "1390:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19028, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1390:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1347:55:27" - }, - "src": "1333:70:27" - }, - { - "anonymous": false, - "documentation": "@notice EIP20 Approval event", - "id": 19039, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 19038, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19033, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 19039, - "src": "1476:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1476:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19035, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19039, - "src": "1499:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19034, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1499:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19037, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19039, - "src": "1524:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19036, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1524:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1475:61:27" - }, - "src": "1461:76:27" - }, - { - "anonymous": false, - "documentation": "@notice Tokens minted event", - "id": 19045, - "name": "Mint", - "nodeType": "EventDefinition", - "parameters": { - "id": 19044, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19041, - "indexed": false, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19045, - "src": "1632:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19040, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1632:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19043, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19045, - "src": "1644:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19042, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1644:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1631:28:27" - }, - "src": "1621:39:27" - }, - { - "body": null, - "documentation": null, - "id": 19054, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19050, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19047, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19054, - "src": "1708:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19046, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1708:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19049, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 19054, - "src": "1720:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19048, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1720:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1707:27:27" - }, - "returnParameters": { - "id": 19053, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19052, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19054, - "src": "1752:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19051, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1752:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:6:27" - }, - "scope": 19202, - "src": "1690:68:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19065, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19061, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19056, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1785:12:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19055, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1785:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19058, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1799:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1799:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19060, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1811:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19059, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1811:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1784:41:27" - }, - "returnParameters": { - "id": 19064, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19063, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1843:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19062, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1843:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1842:6:27" - }, - "scope": 19202, - "src": "1763:86:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19072, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19068, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19067, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 19072, - "src": "1873:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19066, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1873:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1872:13:27" - }, - "returnParameters": { - "id": 19071, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19070, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19072, - "src": "1908:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19069, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1908:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1907:9:27" - }, - "scope": 19202, - "src": "1854:63:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19079, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19074, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 19079, - "src": "1951:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19073, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1951:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1950:13:27" - }, - "returnParameters": { - "id": 19078, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19077, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19079, - "src": "1986:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19076, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1986:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1985:9:27" - }, - "scope": 19202, - "src": "1922:73:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19088, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19084, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19081, - "name": "owner_", - "nodeType": "VariableDeclaration", - "scope": 19088, - "src": "2019:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19080, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2019:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19083, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19088, - "src": "2035:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19082, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2035:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2018:33:27" - }, - "returnParameters": { - "id": 19087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19086, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19088, - "src": "2074:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19085, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2074:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2073:9:27" - }, - "scope": 19202, - "src": "2000:83:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19097, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19090, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19097, - "src": "2105:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2105:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19092, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 19097, - "src": "2122:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2122:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2104:32:27" - }, - "returnParameters": { - "id": 19096, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19095, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19097, - "src": "2155:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19094, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2155:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2154:6:27" - }, - "scope": 19202, - "src": "2088:73:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19106, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19102, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19099, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19106, - "src": "2193:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19098, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2193:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19101, - "name": "addedValue", - "nodeType": "VariableDeclaration", - "scope": 19106, - "src": "2210:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19100, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2210:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2192:37:27" - }, - "returnParameters": { - "id": 19105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19104, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19106, - "src": "2248:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19103, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2248:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2247:6:27" - }, - "scope": 19202, - "src": "2166:88:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19115, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19108, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19115, - "src": "2286:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19107, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2286:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19110, - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 19115, - "src": "2303:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19109, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2303:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2285:42:27" - }, - "returnParameters": { - "id": 19114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19113, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19115, - "src": "2346:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19112, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2346:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2345:6:27" - }, - "scope": 19202, - "src": "2259:93:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19120, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19116, - "nodeType": "ParameterList", - "parameters": [], - "src": "2382:2:27" - }, - "returnParameters": { - "id": 19119, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19118, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19120, - "src": "2408:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19117, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2408:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2407:9:27" - }, - "scope": 19202, - "src": "2357:60:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19129, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19125, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19122, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 19129, - "src": "2481:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19121, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2481:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19124, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 19129, - "src": "2498:16:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19123, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2498:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2480:35:27" - }, - "returnParameters": { - "id": 19128, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19127, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19129, - "src": "2539:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19126, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2539:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2538:9:27" - }, - "scope": 19202, - "src": "2458:90:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19144, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delegateBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19131, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2576:17:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2576:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19133, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2595:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19132, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2595:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19135, - "name": "expiry", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2607:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19134, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2607:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19137, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2620:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 19136, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2620:5:27", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19139, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2629:9:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 19138, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2629:7:27", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19141, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2640:9:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 19140, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2640:7:27", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2575:75:27" - }, - "returnParameters": { - "id": 19143, - "nodeType": "ParameterList", - "parameters": [], - "src": "2659:0:27" - }, - "scope": 19202, - "src": "2553:107:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19149, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19146, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 19149, - "src": "2683:17:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2683:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2682:19:27" - }, - "returnParameters": { - "id": 19148, - "nodeType": "ParameterList", - "parameters": [], - "src": "2710:0:27" - }, - "scope": 19202, - "src": "2665:46:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19156, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19152, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19151, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 19156, - "src": "2735:17:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19150, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2735:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2734:19:27" - }, - "returnParameters": { - "id": 19155, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19154, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19156, - "src": "2777:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19153, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2777:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2776:9:27" - }, - "scope": 19202, - "src": "2716:70:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19163, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getCurrentVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19158, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 19163, - "src": "2816:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19157, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2816:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2815:17:27" - }, - "returnParameters": { - "id": 19162, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19161, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19163, - "src": "2856:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2856:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2855:9:27" - }, - "scope": 19202, - "src": "2791:74:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19172, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19168, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19165, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19172, - "src": "2933:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2933:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19167, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19172, - "src": "2945:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19166, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2945:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2932:28:27" - }, - "returnParameters": { - "id": 19171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19170, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19172, - "src": "2979:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19169, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2979:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2978:6:27" - }, - "scope": 19202, - "src": "2919:66:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19183, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19179, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19174, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3006:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19173, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3006:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19176, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3021:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3021:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19178, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3041:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19177, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3041:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3005:50:27" - }, - "returnParameters": { - "id": 19182, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19181, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3074:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3074:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3073:9:27" - }, - "scope": 19202, - "src": "2990:93:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19188, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19186, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19185, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 19188, - "src": "3109:16:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19184, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3109:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3108:18:27" - }, - "returnParameters": { - "id": 19187, - "nodeType": "ParameterList", - "parameters": [], - "src": "3135:0:27" - }, - "scope": 19202, - "src": "3088:48:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19193, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19191, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19190, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 19193, - "src": "3167:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19189, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3167:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3166:23:27" - }, - "returnParameters": { - "id": 19192, - "nodeType": "ParameterList", - "parameters": [], - "src": "3198:0:27" - }, - "scope": 19202, - "src": "3141:58:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19198, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19195, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 19198, - "src": "3228:19:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3228:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3227:21:27" - }, - "returnParameters": { - "id": 19197, - "nodeType": "ParameterList", - "parameters": [], - "src": "3257:0:27" - }, - "scope": 19202, - "src": "3204:54:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19201, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19199, - "nodeType": "ParameterList", - "parameters": [], - "src": "3282:2:27" - }, - "returnParameters": { - "id": 19200, - "nodeType": "ParameterList", - "parameters": [], - "src": "3293:0:27" - }, - "scope": 19202, - "src": "3263:31:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 19203, - "src": "95:3201:27" - } - ], - "src": "0:3297:27" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenInterface.sol", - "exportedSymbols": { - "YAMTokenInterface": [ - 19202 - ] - }, - "id": 19203, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 18969, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:27" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol", - "file": "./YAMTokenStorage.sol", - "id": 18970, - "nodeType": "ImportDirective", - "scope": 19203, - "sourceUnit": 19252, - "src": "25:31:27", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMGovernanceStorage.sol", - "file": "./YAMGovernanceStorage.sol", - "id": 18971, - "nodeType": "ImportDirective", - "scope": 19203, - "sourceUnit": 18968, - "src": "57:36:27", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 18972, - "name": "YAMTokenStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 19251, - "src": "125:15:27", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMTokenStorage_$19251", - "typeString": "contract YAMTokenStorage" - } - }, - "id": 18973, - "nodeType": "InheritanceSpecifier", - "src": "125:15:27" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 18974, - "name": "YAMGovernanceStorage", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 18967, - "src": "142:20:27", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAMGovernanceStorage_$18967", - "typeString": "contract YAMGovernanceStorage" - } - }, - "id": 18975, - "nodeType": "InheritanceSpecifier", - "src": "142:20:27" - } - ], - "contractDependencies": [ - 18967, - 19251 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 19202, - "linearizedBaseContracts": [ - 19202, - 18967, - 19251 - ], - "name": "YAMTokenInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": "@notice An event thats emitted when an account changes its delegate", - "id": 18983, - "name": "DelegateChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18982, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18977, - "indexed": true, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 18983, - "src": "268:25:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18976, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "268:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18979, - "indexed": true, - "name": "fromDelegate", - "nodeType": "VariableDeclaration", - "scope": 18983, - "src": "295:28:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18978, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "295:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18981, - "indexed": true, - "name": "toDelegate", - "nodeType": "VariableDeclaration", - "scope": 18983, - "src": "325:26:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18980, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "325:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "267:85:27" - }, - "src": "246:107:27" - }, - { - "anonymous": false, - "documentation": "@notice An event thats emitted when a delegate account's vote balance changes", - "id": 18991, - "name": "DelegateVotesChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 18990, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18985, - "indexed": true, - "name": "delegate", - "nodeType": "VariableDeclaration", - "scope": 18991, - "src": "472:24:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 18984, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "472:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18987, - "indexed": false, - "name": "previousBalance", - "nodeType": "VariableDeclaration", - "scope": 18991, - "src": "498:20:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18986, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "498:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18989, - "indexed": false, - "name": "newBalance", - "nodeType": "VariableDeclaration", - "scope": 18991, - "src": "520:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18988, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "520:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "471:65:27" - }, - "src": "445:92:27" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when tokens are rebased", - "id": 18999, - "name": "Rebase", - "nodeType": "EventDefinition", - "parameters": { - "id": 18998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18993, - "indexed": false, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 18999, - "src": "625:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18992, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "625:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18995, - "indexed": false, - "name": "prevYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 18999, - "src": "640:29:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18994, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "640:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 18997, - "indexed": false, - "name": "newYamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 18999, - "src": "671:28:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 18996, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "671:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "624:76:27" - }, - "src": "612:89:27" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when pendingGov is changed", - "id": 19005, - "name": "NewPendingGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 19004, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19001, - "indexed": false, - "name": "oldPendingGov", - "nodeType": "VariableDeclaration", - "scope": 19005, - "src": "825:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19000, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "825:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19003, - "indexed": false, - "name": "newPendingGov", - "nodeType": "VariableDeclaration", - "scope": 19005, - "src": "848:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19002, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "848:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "824:46:27" - }, - "src": "805:66:27" - }, - { - "anonymous": false, - "documentation": "@notice Event emitted when gov is changed", - "id": 19011, - "name": "NewGov", - "nodeType": "EventDefinition", - "parameters": { - "id": 19010, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19007, - "indexed": false, - "name": "oldGov", - "nodeType": "VariableDeclaration", - "scope": 19011, - "src": "955:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "955:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19009, - "indexed": false, - "name": "newGov", - "nodeType": "VariableDeclaration", - "scope": 19011, - "src": "971:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19008, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "971:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "954:32:27" - }, - "src": "942:45:27" - }, - { - "anonymous": false, - "documentation": "@notice Sets the rebaser contract", - "id": 19017, - "name": "NewRebaser", - "nodeType": "EventDefinition", - "parameters": { - "id": 19016, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19013, - "indexed": false, - "name": "oldRebaser", - "nodeType": "VariableDeclaration", - "scope": 19017, - "src": "1067:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19012, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1067:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19015, - "indexed": false, - "name": "newRebaser", - "nodeType": "VariableDeclaration", - "scope": 19017, - "src": "1087:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19014, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1087:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1066:40:27" - }, - "src": "1050:57:27" - }, - { - "anonymous": false, - "documentation": "@notice Sets the incentivizer contract", - "id": 19023, - "name": "NewIncentivizer", - "nodeType": "EventDefinition", - "parameters": { - "id": 19022, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19019, - "indexed": false, - "name": "oldIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 19023, - "src": "1197:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1197:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19021, - "indexed": false, - "name": "newIncentivizer", - "nodeType": "VariableDeclaration", - "scope": 19023, - "src": "1222:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19020, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1222:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1196:50:27" - }, - "src": "1175:72:27" - }, - { - "anonymous": false, - "documentation": "@notice EIP20 Transfer event", - "id": 19031, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 19030, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19025, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 19031, - "src": "1348:20:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19024, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1348:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19027, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19031, - "src": "1370:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19026, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1370:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19029, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19031, - "src": "1390:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19028, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1390:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1347:55:27" - }, - "src": "1333:70:27" - }, - { - "anonymous": false, - "documentation": "@notice EIP20 Approval event", - "id": 19039, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 19038, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19033, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 19039, - "src": "1476:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1476:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19035, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19039, - "src": "1499:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19034, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1499:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19037, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19039, - "src": "1524:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19036, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1524:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1475:61:27" - }, - "src": "1461:76:27" - }, - { - "anonymous": false, - "documentation": "@notice Tokens minted event", - "id": 19045, - "name": "Mint", - "nodeType": "EventDefinition", - "parameters": { - "id": 19044, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19041, - "indexed": false, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19045, - "src": "1632:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19040, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1632:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19043, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19045, - "src": "1644:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19042, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1644:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1631:28:27" - }, - "src": "1621:39:27" - }, - { - "body": null, - "documentation": null, - "id": 19054, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19050, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19047, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19054, - "src": "1708:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19046, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1708:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19049, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 19054, - "src": "1720:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19048, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1720:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1707:27:27" - }, - "returnParameters": { - "id": 19053, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19052, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19054, - "src": "1752:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19051, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1752:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1751:6:27" - }, - "scope": 19202, - "src": "1690:68:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19065, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19061, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19056, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1785:12:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19055, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1785:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19058, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1799:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1799:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19060, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1811:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19059, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1811:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1784:41:27" - }, - "returnParameters": { - "id": 19064, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19063, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19065, - "src": "1843:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19062, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1843:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1842:6:27" - }, - "scope": 19202, - "src": "1763:86:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19072, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19068, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19067, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 19072, - "src": "1873:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19066, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1873:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1872:13:27" - }, - "returnParameters": { - "id": 19071, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19070, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19072, - "src": "1908:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19069, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1908:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1907:9:27" - }, - "scope": 19202, - "src": "1854:63:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19079, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOfUnderlying", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19074, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 19079, - "src": "1951:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19073, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1951:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1950:13:27" - }, - "returnParameters": { - "id": 19078, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19077, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19079, - "src": "1986:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19076, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1986:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1985:9:27" - }, - "scope": 19202, - "src": "1922:73:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19088, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19084, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19081, - "name": "owner_", - "nodeType": "VariableDeclaration", - "scope": 19088, - "src": "2019:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19080, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2019:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19083, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19088, - "src": "2035:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19082, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2035:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2018:33:27" - }, - "returnParameters": { - "id": 19087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19086, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19088, - "src": "2074:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19085, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2074:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2073:9:27" - }, - "scope": 19202, - "src": "2000:83:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19097, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19093, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19090, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19097, - "src": "2105:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2105:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19092, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 19097, - "src": "2122:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2122:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2104:32:27" - }, - "returnParameters": { - "id": 19096, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19095, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19097, - "src": "2155:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19094, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2155:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2154:6:27" - }, - "scope": 19202, - "src": "2088:73:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19106, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "increaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19102, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19099, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19106, - "src": "2193:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19098, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2193:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19101, - "name": "addedValue", - "nodeType": "VariableDeclaration", - "scope": 19106, - "src": "2210:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19100, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2210:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2192:37:27" - }, - "returnParameters": { - "id": 19105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19104, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19106, - "src": "2248:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19103, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2248:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2247:6:27" - }, - "scope": 19202, - "src": "2166:88:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19115, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "decreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19108, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 19115, - "src": "2286:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19107, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2286:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19110, - "name": "subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 19115, - "src": "2303:23:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19109, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2303:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2285:42:27" - }, - "returnParameters": { - "id": 19114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19113, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19115, - "src": "2346:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19112, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2346:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2345:6:27" - }, - "scope": 19202, - "src": "2259:93:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19120, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "maxScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19116, - "nodeType": "ParameterList", - "parameters": [], - "src": "2382:2:27" - }, - "returnParameters": { - "id": 19119, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19118, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19120, - "src": "2408:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19117, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2408:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2407:9:27" - }, - "scope": 19202, - "src": "2357:60:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19129, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19125, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19122, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 19129, - "src": "2481:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19121, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2481:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19124, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 19129, - "src": "2498:16:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19123, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2498:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2480:35:27" - }, - "returnParameters": { - "id": 19128, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19127, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19129, - "src": "2539:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19126, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2539:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2538:9:27" - }, - "scope": 19202, - "src": "2458:90:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19144, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delegateBySig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19131, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2576:17:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19130, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2576:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19133, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2595:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19132, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2595:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19135, - "name": "expiry", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2607:11:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19134, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2607:4:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19137, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2620:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 19136, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2620:5:27", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19139, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2629:9:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 19138, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2629:7:27", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19141, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 19144, - "src": "2640:9:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 19140, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2640:7:27", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2575:75:27" - }, - "returnParameters": { - "id": 19143, - "nodeType": "ParameterList", - "parameters": [], - "src": "2659:0:27" - }, - "scope": 19202, - "src": "2553:107:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19149, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delegate", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19146, - "name": "delegatee", - "nodeType": "VariableDeclaration", - "scope": 19149, - "src": "2683:17:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2683:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2682:19:27" - }, - "returnParameters": { - "id": 19148, - "nodeType": "ParameterList", - "parameters": [], - "src": "2710:0:27" - }, - "scope": 19202, - "src": "2665:46:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19156, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delegates", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19152, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19151, - "name": "delegator", - "nodeType": "VariableDeclaration", - "scope": 19156, - "src": "2735:17:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19150, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2735:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2734:19:27" - }, - "returnParameters": { - "id": 19155, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19154, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19156, - "src": "2777:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19153, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2777:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2776:9:27" - }, - "scope": 19202, - "src": "2716:70:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19163, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getCurrentVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19158, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 19163, - "src": "2816:15:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19157, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2816:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2815:17:27" - }, - "returnParameters": { - "id": 19162, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19161, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19163, - "src": "2856:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2856:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2855:9:27" - }, - "scope": 19202, - "src": "2791:74:27", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19172, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19168, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19165, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 19172, - "src": "2933:10:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2933:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19167, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 19172, - "src": "2945:14:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19166, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2945:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2932:28:27" - }, - "returnParameters": { - "id": 19171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19170, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19172, - "src": "2979:4:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19169, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2979:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2978:6:27" - }, - "scope": 19202, - "src": "2919:66:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19183, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "rebase", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19179, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19174, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3006:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19173, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3006:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19176, - "name": "indexDelta", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3021:18:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3021:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19178, - "name": "positive", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3041:13:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19177, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3041:4:27", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3005:50:27" - }, - "returnParameters": { - "id": 19182, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19181, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19183, - "src": "3074:7:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19180, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3074:7:27", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3073:9:27" - }, - "scope": 19202, - "src": "2990:93:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19188, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setRebaser", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19186, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19185, - "name": "rebaser_", - "nodeType": "VariableDeclaration", - "scope": 19188, - "src": "3109:16:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19184, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3109:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3108:18:27" - }, - "returnParameters": { - "id": 19187, - "nodeType": "ParameterList", - "parameters": [], - "src": "3135:0:27" - }, - "scope": 19202, - "src": "3088:48:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19193, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setIncentivizer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19191, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19190, - "name": "incentivizer_", - "nodeType": "VariableDeclaration", - "scope": 19193, - "src": "3167:21:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19189, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3167:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3166:23:27" - }, - "returnParameters": { - "id": 19192, - "nodeType": "ParameterList", - "parameters": [], - "src": "3198:0:27" - }, - "scope": 19202, - "src": "3141:58:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19198, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_setPendingGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19195, - "name": "pendingGov_", - "nodeType": "VariableDeclaration", - "scope": 19198, - "src": "3228:19:27", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3228:7:27", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3227:21:27" - }, - "returnParameters": { - "id": 19197, - "nodeType": "ParameterList", - "parameters": [], - "src": "3257:0:27" - }, - "scope": 19202, - "src": "3204:54:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "id": 19201, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_acceptGov", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19199, - "nodeType": "ParameterList", - "parameters": [], - "src": "3282:2:27" - }, - "returnParameters": { - "id": 19200, - "nodeType": "ParameterList", - "parameters": [], - "src": "3293:0:27" - }, - "scope": 19202, - "src": "3263:31:27", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 19203, - "src": "95:3201:27" - } - ], - "src": "0:3297:27" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.485Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMTokenStorage.json b/build/contracts/YAMTokenStorage.json deleted file mode 100644 index a68e69c..0000000 --- a/build/contracts/YAMTokenStorage.json +++ /dev/null @@ -1,1479 +0,0 @@ -{ - "contractName": "YAMTokenStorage", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "BASE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "incentivizer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "internalDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingGov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rebaser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yamsScalingFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"incentivizer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"internalDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingGov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rebaser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yamsScalingFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":\"YAMTokenStorage\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0xfb72ae2642cad8f5da1644433dbcc12681f8064335dff144623f0514dc7922c6\",\"urls\":[\"bzz-raw://c174cb41d37d772336abf35cfef58015621ff96b834819531a65a67594aec5c4\",\"dweb:/ipfs/Qmdw3SxV2kaqdCoY4NBBXYcbX6baWbvGjJ6XP8jaH9pvyu\"]},\"/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol\":{\"keccak256\":\"0x8d8dc64204f5c4eea4b9cd278a6695212d55c084924b512b564acb8c7420d6d1\",\"urls\":[\"bzz-raw://408918db261b7431c944e8e521a41c7159e10fa88955781bdb267253250bc504\",\"dweb:/ipfs/QmeHzKxF3LPtf2wxTMPqQCEFqcTTZzK4Sb41giV7te8Sos\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506103ff806100206000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c806364dd48f51161008157806397d63f931161005b57806397d63f93146101e7578063b6fa8576146101ef578063ec342ad0146101f7576100d4565b806364dd48f5146101cf5780636fc6407c146101d757806395d89b41146101df576100d4565b806318160ddd116100b257806318160ddd1461018f57806325240810146101a9578063313ce567146101b1576100d4565b806306fdde03146100d957806311fd8a831461015657806312d43a5114610187575b600080fd5b6100e16101ff565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011b578181015183820152602001610103565b50505050905090810190601f1680156101485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61015e6102aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015e6102c6565b6101976102e7565b60408051918252519081900360200190f35b61015e6102ed565b6101b9610309565b6040805160ff9092168252519081900360200190f35b610197610312565b61015e610320565b6100e161033c565b6101976103b2565b6101976103b8565b6101976103be565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156102a25780601f10610277576101008083540402835291602001916102a2565b820191906000526020600020905b81548152906001019060200180831161028557829003601f168201915b505050505081565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b69d3c21bcecceda100000081565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f810184900484028201840190925281815292918301828280156102a25780601f10610277576101008083540402835291602001916102a2565b600b5481565b60085481565b670de0b6b3a76400008156fea265627a7a7231582048e6240ddfba9819a6e8075c3d5c7ac73f39da294d3aec83b85e03daa0bad3b764736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c806364dd48f51161008157806397d63f931161005b57806397d63f93146101e7578063b6fa8576146101ef578063ec342ad0146101f7576100d4565b806364dd48f5146101cf5780636fc6407c146101d757806395d89b41146101df576100d4565b806318160ddd116100b257806318160ddd1461018f57806325240810146101a9578063313ce567146101b1576100d4565b806306fdde03146100d957806311fd8a831461015657806312d43a5114610187575b600080fd5b6100e16101ff565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011b578181015183820152602001610103565b50505050905090810190601f1680156101485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61015e6102aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015e6102c6565b6101976102e7565b60408051918252519081900360200190f35b61015e6102ed565b6101b9610309565b6040805160ff9092168252519081900360200190f35b610197610312565b61015e610320565b6100e161033c565b6101976103b2565b6101976103b8565b6101976103be565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156102a25780601f10610277576101008083540402835291602001916102a2565b820191906000526020600020905b81548152906001019060200180831161028557829003601f168201915b505050505081565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035460ff1681565b69d3c21bcecceda100000081565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f810184900484028201840190925281815292918301828280156102a25780601f10610277576101008083540402835291602001916102a2565b600b5481565b60085481565b670de0b6b3a76400008156fea265627a7a7231582048e6240ddfba9819a6e8075c3d5c7ac73f39da294d3aec83b85e03daa0bad3b764736f6c63430005110032", - "sourceMap": "83:1444:28:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83:1444:28;;;;;;;", - "deployedSourceMap": "83:1444:28:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83:1444:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;330:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;330:18:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;793:22;;;:::i;:::-;;;;;;;;;;;;;;;;;;;602:18;;;:::i;971:26::-;;;:::i;:::-;;;;;;;;;;;;;;;;695:25;;;:::i;516:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1083:49;;;:::i;885:27::-;;;:::i;421:20::-;;;:::i;1498:25::-;;;:::i;1319:32::-;;;:::i;1196:37::-;;;:::i;330:18::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;793:22::-;;;;;;:::o;602:18::-;;;;;;;;;:::o;971:26::-;;;;:::o;695:25::-;;;;;;:::o;516:21::-;;;;;;:::o;1083:49::-;1126:6;1083:49;:::o;885:27::-;;;;;;:::o;421:20::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1498:25;;;;:::o;1319:32::-;;;;:::o;1196:37::-;1227:6;1196:37;:::o", - "source": "pragma solidity 0.5.17;\n\nimport \"../lib/SafeMath.sol\";\n\n// Storage for a YAM token\ncontract YAMTokenStorage {\n\n using SafeMath for uint256;\n\n /**\n * @dev Guard variable for re-entrancy checks. Not currently used\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Governor for this contract\n */\n address public gov;\n\n /**\n * @notice Pending governance for this contract\n */\n address public pendingGov;\n\n /**\n * @notice Approved rebaser for this contract\n */\n address public rebaser;\n\n /**\n * @notice Reserve address of YAM protocol\n */\n address public incentivizer;\n\n /**\n * @notice Total supply of YAMs\n */\n uint256 public totalSupply;\n\n /**\n * @notice Internal decimals used to handle scaling factor\n */\n uint256 public constant internalDecimals = 10**24;\n\n /**\n * @notice Used for percentage maths\n */\n uint256 public constant BASE = 10**18;\n\n /**\n * @notice Scaling factor that adjusts everyone's balances\n */\n uint256 public yamsScalingFactor;\n\n mapping (address => uint256) internal _yamBalances;\n\n mapping (address => mapping (address => uint256)) internal _allowedFragments;\n\n uint256 public initSupply;\n\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol", - "exportedSymbols": { - "YAMTokenStorage": [ - 19251 - ] - }, - "id": 19252, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 19204, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:28" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 19205, - "nodeType": "ImportDirective", - "scope": 19252, - "sourceUnit": 14993, - "src": "25:29:28", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 19251, - "linearizedBaseContracts": [ - 19251 - ], - "name": "YAMTokenStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 19208, - "libraryName": { - "contractScope": null, - "id": 19206, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "121:8:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "115:27:28", - "typeName": { - "id": 19207, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "134:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": false, - "id": 19210, - "name": "_notEntered", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "234:25:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19209, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "234:4:28", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19212, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "330:18:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 19211, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "330:6:28", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19214, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "421:20:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 19213, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "421:6:28", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19216, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "516:21:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 19215, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "516:5:28", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19218, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "602:18:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19217, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "602:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19220, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "695:25:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19219, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "695:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19222, - "name": "rebaser", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "793:22:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "793:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19224, - "name": "incentivizer", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "885:27:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19223, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "885:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19226, - "name": "totalSupply", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "971:26:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "971:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 19231, - "name": "internalDecimals", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1083:49:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19227, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1083:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 19230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 19228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1126:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 19229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1130:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "1126:6:28", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 19236, - "name": "BASE", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1196:37:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1196:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 19235, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 19233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1227:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 19234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1231:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "1227:6:28", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 19238, - "name": "yamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1319:32:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1319:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19242, - "name": "_yamBalances", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1358:50:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 19241, - "keyType": { - "id": 19239, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1367:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1358:28:28", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 19240, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1378:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19248, - "name": "_allowedFragments", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1415:76:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 19247, - "keyType": { - "id": 19243, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1424:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1415:49:28", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 19246, - "keyType": { - "id": 19244, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1444:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1435:28:28", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 19245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1455:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19250, - "name": "initSupply", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1498:25:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1498:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 19252, - "src": "83:1444:28" - } - ], - "src": "0:1528:28" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/token/YAMTokenStorage.sol", - "exportedSymbols": { - "YAMTokenStorage": [ - 19251 - ] - }, - "id": 19252, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 19204, - "literals": [ - "solidity", - "0.5", - ".17" - ], - "nodeType": "PragmaDirective", - "src": "0:23:28" - }, - { - "absolutePath": "/Users/brockelmore/YAM/contracts/lib/SafeMath.sol", - "file": "../lib/SafeMath.sol", - "id": 19205, - "nodeType": "ImportDirective", - "scope": 19252, - "sourceUnit": 14993, - "src": "25:29:28", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 19251, - "linearizedBaseContracts": [ - 19251 - ], - "name": "YAMTokenStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 19208, - "libraryName": { - "contractScope": null, - "id": 19206, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 14992, - "src": "121:8:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$14992", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "115:27:28", - "typeName": { - "id": 19207, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "134:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": false, - "id": 19210, - "name": "_notEntered", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "234:25:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 19209, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "234:4:28", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19212, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "330:18:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 19211, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "330:6:28", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19214, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "421:20:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 19213, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "421:6:28", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19216, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "516:21:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 19215, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "516:5:28", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19218, - "name": "gov", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "602:18:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19217, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "602:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19220, - "name": "pendingGov", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "695:25:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19219, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "695:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19222, - "name": "rebaser", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "793:22:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "793:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19224, - "name": "incentivizer", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "885:27:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 19223, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "885:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19226, - "name": "totalSupply", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "971:26:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "971:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 19231, - "name": "internalDecimals", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1083:49:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19227, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1083:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - }, - "id": 19230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 19228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1126:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3234", - "id": 19229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1130:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24_by_1", - "typeString": "int_const 24" - }, - "value": "24" - }, - "src": "1126:6:28", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000000000_by_1", - "typeString": "int_const 1000000000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 19236, - "name": "BASE", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1196:37:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19232, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1196:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 19235, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 19233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1227:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 19234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1231:2:28", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "1227:6:28", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 19238, - "name": "yamsScalingFactor", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1319:32:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1319:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 19242, - "name": "_yamBalances", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1358:50:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 19241, - "keyType": { - "id": 19239, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1367:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1358:28:28", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 19240, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1378:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19248, - "name": "_allowedFragments", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1415:76:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 19247, - "keyType": { - "id": 19243, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1424:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1415:49:28", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 19246, - "keyType": { - "id": 19244, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1444:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1435:28:28", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 19245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1455:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19250, - "name": "initSupply", - "nodeType": "VariableDeclaration", - "scope": 19251, - "src": "1498:25:28", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19249, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1498:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 19252, - "src": "83:1444:28" - } - ], - "src": "0:1528:28" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:19.491Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/YAMYFIPool.json b/build/contracts/YAMYFIPool.json deleted file mode 100644 index f79c5bb..0000000 --- a/build/contracts/YAMYFIPool.json +++ /dev/null @@ -1,35681 +0,0 @@ -{ - "contractName": "YAMYFIPool", - "abi": [ - { - "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": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastUpdateTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodFinish", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardDistribution", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerTokenStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardDistribution", - "type": "address" - } - ], - "name": "setRewardDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "starttime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userRewardPerTokenPaid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yam", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "yfi", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastTimeRewardApplicable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "rewardPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "earned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "getReward", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "notifyRewardAmount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardDistribution\",\"type\":\"address\"}],\"name\":\"setRewardDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"starttime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yam\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"yfi\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMYFIPool.sol\":\"YAMYFIPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":50000},\"remappings\":[]},\"sources\":{\"/Users/brockelmore/YAM/contracts/distribution/YAMYFIPool.sol\":{\"keccak256\":\"0xa59d7f588d4db19982ade006ef91d5f9eb0e0eda26a9e541dab16b39d5890f5d\",\"urls\":[\"bzz-raw://796c87202ffda5c78c4727ed819a8756c2d016706ebbc056588fcde52249f6e9\",\"dweb:/ipfs/QmaesZvZz12wNS2PwE4HVsByNgADTPRKVnjhqa6JMgkdv4\"]}},\"version\":1}", - "bytecode": "0x6080604052600080546001600160a01b0319908116730bc529c00c6401aef6d220be8c6ea1667f6ad93e17825560058054909116734bc6657283f8f24e27eac1d21d1dee566c534a9a179055635f3e7ec0600655600781905560085561006c6001600160e01b036100bd16565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100c1565b3390565b611904806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c806380faa57d116100ee578063c8f33c9111610097578063e310fa5d11610071578063e310fa5d146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063c8f33c91146103b1578063cd3daf9d146103b9578063df136d65146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b14610378578063a694fc3a14610394576101ad565b806380faa57d1461032d5780638b876347146103355780638da5889714610368576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b6101e5610cc8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cdb565b6101e5610ced565b610232610cf3565b610380610d0f565b604080519115158252519081900360200190f35b61028e600480360360208110156103aa57600080fd5b5035610d4f565b6101e5610ee7565b6101e5610eed565b6101e5610f41565b610232610f47565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610eed565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d0f565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610eed565b600a556105cd610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610eed565b600a556107f3610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610eed565b600a556109a4610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d0f565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cd642600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d336111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d58610eed565b600a55610d63610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610dc457610d8b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ea457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ead8261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610ef76105ab565b610f045750600a546105af565b610cd6610f32610f126105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610cc8565b600a549063ffffffff61110116565b600a5481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d0f565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158203f44374629f3631305dcb0a254bb5d105bd6afd6e57c876881253a49826c576b64736f6c63430005110032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c806380faa57d116100ee578063c8f33c9111610097578063e310fa5d11610071578063e310fa5d146103c9578063e9fad8ee146103d1578063ebe2b12b146103d9578063f2fde38b146103e1576101ad565b8063c8f33c91146103b1578063cd3daf9d146103b9578063df136d65146103c1576101ad565b80638da5cb5b116100c85780638da5cb5b146103705780638f32d59b14610378578063a694fc3a14610394576101ad565b806380faa57d1461032d5780638b876347146103355780638da5889714610368576101ad565b80631be052891161015b5780633d18b912116101355780633d18b912146102e257806370a08231146102ea578063715018a61461031d5780637b0a47ee14610325576101ad565b80631be05289146102a05780632e1a7d4d146102a85780633c6b16ab146102c5576101ad565b80630d68b7611161018c5780630d68b7611461025b578063101114cf1461029057806318160ddd14610298576101ad565b80628cc262146101b25780630700037d146101f7578063071c03321461022a575b600080fd5b6101e5600480360360208110156101c857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610414565b60408051918252519081900360200190f35b6101e56004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a7565b6102326104b9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61028e6004803603602081101561027157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104d5565b005b61023261058f565b6101e56105ab565b6101e56105b2565b61028e600480360360208110156102be57600080fd5b50356105b9565b61028e600480360360208110156102db57600080fd5b5035610751565b61028e610990565b6101e56004803603602081101561030057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bb8565b61028e610be0565b6101e5610cc2565b6101e5610cc8565b6101e56004803603602081101561034b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cdb565b6101e5610ced565b610232610cf3565b610380610d0f565b604080519115158252519081900360200190f35b61028e600480360360208110156103aa57600080fd5b5035610d4f565b6101e5610ee7565b6101e5610eed565b6101e5610f41565b610232610f47565b61028e610f63565b6101e5610f7e565b61028e600480360360208110156103f757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832054600b9092528220546104a1919061049590670de0b6b3a7640000906104899061047490610468610eed565b9063ffffffff61100316565b61047d88610bb8565b9063ffffffff61104c16565b9063ffffffff6110bf16565b9063ffffffff61110116565b92915050565b600c6020526000908152604090205481565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b6104dd610d0f565b61054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6001545b90565b6209896881565b336105c2610eed565b600a556105cd610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff81161561062e576105f581610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442101561069f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000821161070e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b61071782611175565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b60045473ffffffffffffffffffffffffffffffffffffffff166107726111e3565b73ffffffffffffffffffffffffffffffffffffffff16146107de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118856021913960400191505060405180910390fd5b60006107e8610eed565b600a556107f3610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff8116156108545761081b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b6006544211156109245760075442106108825761087a826209896863ffffffff6110bf16565b6008556108d0565b600754600090610898904263ffffffff61100316565b905060006108b16008548361104c90919063ffffffff16565b90506108ca62098968610489868463ffffffff61110116565b60085550505b4260098190556108e9906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a161098c565b610937826209896863ffffffff6110bf16565b6008556006546009819055610955906209896863ffffffff61110116565b6007556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15b5050565b33610999610eed565b600a556109a4610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610a05576109cc81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610a7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610a8133610414565b9050801561098c57336000908152600c6020908152604080832083905560055481517fb6fa8576000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff9091169263b6fa8576926004808201939182900301818787803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b505190506000610b4f670de0b6b3a7640000610489858563ffffffff61104c16565b600554909150610b7c9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff6111e716565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a250505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b610be8610d0f565b610c5357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60035460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60085481565b6000610cd642600754611279565b905090565b600b6020526000908152604090205481565b60065481565b60035473ffffffffffffffffffffffffffffffffffffffff1690565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610d336111e3565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b33610d58610eed565b600a55610d63610cc8565b60095573ffffffffffffffffffffffffffffffffffffffff811615610dc457610d8b81610414565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020908152604080832093909355600a54600b909152919020555b600654421015610e3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f742073746172740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008211610ea457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b610ead8261128f565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60095481565b6000610ef76105ab565b610f045750600a546105af565b610cd6610f32610f126105ab565b610489670de0b6b3a764000061047d60085461047d600954610468610cc8565b600a549063ffffffff61110116565b600a5481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b610f74610f6f33610bb8565b6105b9565b610f7c610990565b565b60075481565b610f8c610d0f565b610ff757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611000816112fe565b50565b600061104583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f8565b9392505050565b60008261105b575060006104a1565b8282028284828161106857fe5b0414611045576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118646021913960400191505060405180910390fd5b600061104583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a9565b60008282018381101561104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154611188908263ffffffff61100316565b600155336000908152600260205260409020546111ab908263ffffffff61100316565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690836111e7565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611274908490611528565b505050565b60008183106112885781611045565b5090919050565b6001546112a2908263ffffffff61110116565b600155336000908152600260205260409020546112c5908263ffffffff61110116565b3360008181526002602052604081209290925590546110009173ffffffffffffffffffffffffffffffffffffffff90911690308461176c565b73ffffffffffffffffffffffffffffffffffffffff811661136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061183e6026913960400191505060405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081848411156114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146657818101518382015260200161144e565b50505050905090810190601f1680156114935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561146657818101518382015260200161144e565b50600083858161151e57fe5b0495945050505050565b6115478273ffffffffffffffffffffffffffffffffffffffff16611801565b6115b257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061161b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115de565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461167d576040519150601f19603f3d011682016040523d82523d6000602084013e611682565b606091505b5091509150816116f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156117665780806020019051602081101561170f57600080fd5b5051611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806118a6602a913960400191505060405180910390fd5b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611766908590611528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906118355750808214155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158203f44374629f3631305dcb0a254bb5d105bd6afd6e57c876881253a49826c576b64736f6c63430005110032", - "sourceMap": "22370:3900:8:-;;;21552:70;;;-1:-1:-1;;;;;;21552:70:8;;;21579:42;21552:70;;;22444;;;;;;22471:42;22444:70;;;22610:10;22583:37;;22664:31;;;;22701:29;;9510:12;-1:-1:-1;;;;;9510:10:8;:12;:::i;:::-;9501:6;:21;;-1:-1:-1;;;;;;9501:21:8;-1:-1:-1;;;;;9501:21:8;;;;;;;;9537:40;;9570:6;;;-1:-1:-1;;9537:40:8;;-1:-1:-1;;9537:40:8;22370:3900;;8448:96;8527:10;8448:96;:::o;22370:3900::-;;;;;;;", - "deployedSourceMap": "22370:3900:8:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22370:3900:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24120:259;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24120:259:8;;;;:::i;:::-;;;;;;;;;;;;;;;;22875:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22875:42:8;;;;:::i;22444:70::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21153:156;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21153:156:8;;;;:::i;:::-;;20906:33;;;:::i;21715:89::-;;;:::i;22520:41::-;;;:::i;24671:210::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24671:210:8;;:::i;25436:832::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25436:832:8;;:::i;24987:443::-;;;:::i;21810:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;21810:108:8;;;;:::i;10445:137::-;;;:::i;22701:29::-;;;:::i;23571:129::-;;;:::i;22812:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;22812:57:8;;;;:::i;22583:37::-;;;:::i;9660:77::-;;;:::i;10011:92::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;24467:198;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24467:198:8;;:::i;22736:29::-;;;:::i;23706:408::-;;;:::i;22771:35::-;;;:::i;21552:70::-;;;:::i;24887:94::-;;;:::i;22664:31::-;;;:::i;10731:107::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10731:107:8;;;;:::i;24120:259::-;24355:16;;;24174:7;24355:16;;;:7;:16;;;;;;;;;24273:22;:31;;;;;;24212:160;;24355:16;24212:121;;24328:4;;24212:94;;24252:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;24212:18;24222:7;24212:9;:18::i;:::-;:39;:94;:39;:94;:::i;:::-;:115;:121;:115;:121;:::i;:::-;:142;:160;:142;:160;:::i;:::-;24193:179;24120:259;-1:-1:-1;;24120:259:8:o;22875:42::-;;;;;;;;;;;;;:::o;22444:70::-;;;;;;:::o;21153:156::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21262:18;:40;;;;;;;;;;;;;;;21153:156::o;20906:33::-;;;;;;:::o;21715:89::-;21785:12;;21715:89;;:::o;22520:41::-;22555:6;22520:41;:::o;24671:210::-;24725:10;23315:16;:14;:16::i;:::-;23292:20;:39;23358:26;:24;:26::i;:::-;23341:14;:43;23398:21;;;;23394:154;;23454:15;23461:7;23454:6;:15::i;:::-;23435:16;;;;;;;:7;:16;;;;;;;;:34;;;;23517:20;;23483:22;:31;;;;;;:54;23394:154;23197:9;;23178:15;:28;;23170:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24775:1;24766:6;:10;24758:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24808:22;24823:6;24808:14;:22::i;:::-;24845:29;;;;;;;;24855:10;;24845:29;;;;;;;;;;24671:210;;:::o;25436:832::-;21073:18;;;;21057:12;:10;:12::i;:::-;:34;;;21049:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25557:1;23315:16;:14;:16::i;:::-;23292:20;:39;23358:26;:24;:26::i;:::-;23341:14;:43;23398:21;;;;23394:154;;23454:15;23461:7;23454:6;:15::i;:::-;23435:16;;;;;;;:7;:16;;;;;;;;:34;;;;23517:20;;23483:22;:31;;;;;;:54;23394:154;25597:9;;25579:15;:27;25575:687;;;25643:12;;25624:15;:31;25620:310;;25686:20;:6;22555;25686:20;:10;:20;:::i;:::-;25673:10;:33;25620:310;;;25761:12;;25741:17;;25761:33;;25778:15;25761:33;:16;:33;:::i;:::-;25741:53;;25810:16;25829:25;25843:10;;25829:9;:13;;:25;;;;:::i;:::-;25810:44;-1:-1:-1;25883:34:8;22555:6;25883:20;:6;25810:44;25883:20;:10;:20;:::i;:34::-;25870:10;:47;-1:-1:-1;;25620:310:8;25958:15;25941:14;:32;;;26000:29;;22555:6;26000:29;:19;:29;:::i;:::-;25985:12;:44;26046:19;;;;;;;;;;;;;;;;;25575:687;;;26107:20;:6;22555;26107:20;:10;:20;:::i;:::-;26094:10;:33;26156:9;;26139:14;:26;;;26192:23;;22555:6;26192:23;:13;:23;:::i;:::-;26177:12;:38;26232:19;;;;;;;;;;;;;;;;;25575:687;21139:1;25436:832;:::o;24987:443::-;25028:10;23315:16;:14;:16::i;:::-;23292:20;:39;23358:26;:24;:26::i;:::-;23341:14;:43;23398:21;;;;23394:154;;23454:15;23461:7;23454:6;:15::i;:::-;23435:16;;;;;;;:7;:16;;;;;;;;:34;;;;23517:20;;23483:22;:31;;;;;;:54;23394:154;23197:9;;23178:15;:28;;23170:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25061:14;25078:18;25085:10;25078:6;:18::i;:::-;25061:35;-1:-1:-1;25110:10:8;;25106:318;;25144:10;25158:1;25136:19;;;:7;:19;;;;;;;;:23;;;25209:3;;25197:37;;;;;;;25136:19;25209:3;;;;25197:35;;:37;;;;;;;;;;;25158:1;25209:3;25197:37;;;5:2:-1;;;;30:1;27;20:12;5:2;25197:37:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25197:37:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25197:37:8;;-1:-1:-1;25248:18:8;25269:37;25299:6;25269:25;:6;25197:37;25269:25;:10;:25;:::i;:37::-;25320:3;;25248:58;;-1:-1:-1;25320:40:8;;:3;;25337:10;25248:58;25320:40;:16;:40;:::i;:::-;25379:34;;;;;;;;25390:10;;25379:34;;;;;;;;;;25106:318;;23229:1;24987:443;:::o;21810:108::-;21893:18;;21867:7;21893:18;;;:9;:18;;;;;;;21810:108::o;10445:137::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10527:6;;10506:40;;10543:1;;10506:40;10527:6;;10506:40;;10543:1;;10506:40;10556:6;:19;;;;;;10445:137::o;22701:29::-;;;;:::o;23571:129::-;23628:7;23654:39;23663:15;23680:12;;23654:8;:39::i;:::-;23647:46;;23571:129;:::o;22812:57::-;;;;;;;;;;;;;:::o;22583:37::-;;;;:::o;9660:77::-;9724:6;;;;9660:77;:::o;10011:92::-;10090:6;;10051:4;;10090:6;;10074:12;:10;:12::i;:::-;:22;;;10067:29;;10011:92;:::o;24467:198::-;24518:10;23315:16;:14;:16::i;:::-;23292:20;:39;23358:26;:24;:26::i;:::-;23341:14;:43;23398:21;;;;23394:154;;23454:15;23461:7;23454:6;:15::i;:::-;23435:16;;;;;;;:7;:16;;;;;;;;:34;;;;23517:20;;23483:22;:31;;;;;;:54;23394:154;23197:9;;23178:15;:28;;23170:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24568:1;24559:6;:10;24551:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24598:19;24610:6;24598:11;:19::i;:::-;24632:26;;;;;;;;24639:10;;24632:26;;;;;;;;;;24467:198;;:::o;22736:29::-;;;;:::o;23706:408::-;23753:7;23776:13;:11;:13::i;:::-;23772:76;;-1:-1:-1;23817:20:8;;23810:27;;23772:76;23876:231;23918:175;24079:13;:11;:13::i;:::-;23918:135;24048:4;23918:104;24011:10;;23918:67;23970:14;;23918:26;:24;:26::i;:175::-;23876:20;;;:231;:24;:231;:::i;22771:35::-;;;;:::o;21552:70::-;;;;;;:::o;24887:94::-;24922:31;24931:21;24941:10;24931:9;:21::i;:::-;24922:8;:31::i;:::-;24963:11;:9;:11::i;:::-;24887:94::o;22664:31::-;;;;:::o;10731:107::-;9864:9;:7;:9::i;:::-;9856:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10803:28;10822:8;10803:18;:28::i;:::-;10731:107;:::o;3585:134::-;3643:7;3669:43;3673:1;3676;3669:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3662:50;3585:134;-1:-1:-1;;;3585:134:8:o;4470:459::-;4528:7;4769:6;4765:45;;-1:-1:-1;4798:1:8;4791:8;;4765:45;4832:5;;;4836:1;4832;:5;:1;4855:5;;;;;:10;4847:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:130;5442:7;5468:39;5472:1;5475;5468:39;;;;;;;;;;;;;;;;;:3;:39::i;3145:176::-;3203:7;3234:5;;;3257:6;;;;3249:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22156:210;22222:12;;:24;;22239:6;22222:24;:16;:24;:::i;:::-;22207:12;:39;22290:10;22280:21;;;;:9;:21;;;;;;:33;;22306:6;22280:33;:25;:33;:::i;:::-;22266:10;22256:21;;;;:9;:21;;;;;:57;;;;22323:3;;:36;;22256:21;22323:3;;;;22352:6;22323:16;:36::i;8448:96::-;8527:10;8448:96;:::o;17668:174::-;17776:58;;;17799:14;17776:58;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17776:58:8;;;;;;;;25:18:-1;;61:17;;17776:58:8;182:15:-1;17799:23:8;179:29:-1;160:49;;17750:85:8;;17769:5;;17750:18;:85::i;:::-;17668:174;;;:::o;1848:104::-;1906:7;1936:1;1932;:5;:13;;1944:1;1932:13;;;-1:-1:-1;1940:1:8;;1848:104;-1:-1:-1;1848:104:8:o;21924:226::-;21987:12;;:24;;22004:6;21987:24;:16;:24;:::i;:::-;21972:12;:39;22055:10;22045:21;;;;:9;:21;;;;;;:33;;22071:6;22045:33;:25;:33;:::i;:::-;22031:10;22021:21;;;;:9;:21;;;;;:57;;;;22088:3;;:55;;22021:21;22088:3;;;;22129:4;22136:6;22088:20;:55::i;10939:225::-;11012:22;;;11004:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:6;;11092:38;;;;;;;11113:6;;11092:38;;11113:6;;11092:38;11140:6;:17;;;;;;;;;;;;;;;10939:225::o;4043:187::-;4129:7;4164:12;4156:6;;;;4148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4148:29:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4199:5:8;;;4043:187::o;6029:338::-;6115:7;6215:12;6208:5;6200:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6200:28:8;;6238:9;6254:1;6250;:5;;;;;;;6029:338;-1:-1:-1;;;;;6029:338:8:o;19672:1095::-;20267:27;20275:5;20267:25;;;:27::i;:::-;20259:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20401:12;20415:23;20450:5;20442:19;;20462:4;20442:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;20442:25:8;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;20400:67:8;;;;20485:7;20477:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20544:17;;:21;20540:221;;20684:10;20673:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20673:30:8;20665:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19672:1095;;;;:::o;17848:202::-;17974:68;;;17997:18;17974:68;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;17974:68:8;;;;;;;;25:18:-1;;61:17;;17974:68:8;182:15:-1;17997:27:8;179:29:-1;160:49;;17948:95:8;;17967:5;;17948:18;:95::i;14578:797::-;14638:4;15286:20;;15131:66;15325:15;;;;;:42;;;15356:11;15344:8;:23;;15325:42;15317:51;14578:797;-1:-1:-1;;;;14578:797:8:o", - "source": "/**\n *Submitted for verification at Etherscan.io on 2020-07-17\n*/\n\n/*\n ____ __ __ __ _\n / __/__ __ ___ / /_ / / ___ / /_ (_)__ __\n _\\ \\ / // // _ \\/ __// _ \\/ -_)/ __// / \\ \\ /\n/___/ \\_, //_//_/\\__//_//_/\\__/ \\__//_/ /_\\_\\\n /___/\n\n* Synthetix: YAMRewards.sol\n*\n* Docs: https://docs.synthetix.io/\n*\n*\n* MIT License\n* ===========\n*\n* Copyright (c) 2020 Synthetix\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n*/\n\n// File: @openzeppelin/contracts/math/Math.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n\n// File: @openzeppelin/contracts/math/SafeMath.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\n// File: @openzeppelin/contracts/GSN/Context.sol\n\npragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n\n// File: @openzeppelin/contracts/ownership/Ownable.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\n\npragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n// File: @openzeppelin/contracts/utils/Address.sol\n\npragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\n\npragma solidity ^0.5.0;\n\n\n\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n\n// File: contracts/IRewardDistributionRecipient.sol\n\npragma solidity ^0.5.0;\n\n\n\ncontract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution)\n external\n onlyOwner\n {\n rewardDistribution = _rewardDistribution;\n }\n}\n\n// File: contracts/CurveRewards.sol\n\npragma solidity ^0.5.0;\n\n\ninterface YAM {\n function yamsScalingFactor() external returns (uint256);\n}\n\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public yfi = IERC20(0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e);\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n yfi.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n yfi.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract YAMYFIPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public yam = IERC20(0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A);\n uint256 public constant DURATION = 625000; // ~7 1/4 days\n\n uint256 public starttime = 1597931200; // Sunday, August 9, 2020 12:00:00 AM\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier checkStart(){\n require(block.timestamp >= starttime,\"not start\");\n _;\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable()\n .sub(lastUpdateTime)\n .mul(rewardRate)\n .mul(1e18)\n .div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account)\n .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))\n .div(1e18)\n .add(rewards[account]);\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public updateReward(msg.sender) checkStart {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) checkStart {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor();\n uint256 trueReward = reward.mul(scalingFactor).div(10**18);\n yam.safeTransfer(msg.sender, trueReward);\n emit RewardPaid(msg.sender, trueReward);\n }\n }\n\n function notifyRewardAmount(uint256 reward)\n external\n onlyRewardDistribution\n updateReward(address(0))\n {\n if (block.timestamp > starttime) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n } else {\n rewardRate = reward.div(DURATION);\n lastUpdateTime = starttime;\n periodFinish = starttime.add(DURATION);\n emit RewardAdded(reward);\n }\n }\n}\n", - "sourcePath": "/Users/brockelmore/YAM/contracts/distribution/YAMYFIPool.sol", - "ast": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMYFIPool.sol", - "exportedSymbols": { - "Address": [ - 9818 - ], - "Context": [ - 9564 - ], - "IERC20": [ - 9744 - ], - "IRewardDistributionRecipient": [ - 10069 - ], - "LPTokenWrapper": [ - 10185 - ], - "Math": [ - 9352 - ], - "Ownable": [ - 9676 - ], - "SafeERC20": [ - 10034 - ], - "SafeMath": [ - 9538 - ], - "YAM": [ - 10076 - ], - "YAMYFIPool": [ - 10604 - ] - }, - "id": 10605, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 9285, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 9352, - "linearizedBaseContracts": [ - 9352 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9301, - "nodeType": "Block", - "src": "1739:38:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9294, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9287, - "src": "1756:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9295, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9289, - "src": "1761:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 9298, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9289, - "src": "1769:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:8", - "trueExpression": { - "argumentTypes": null, - "id": 9297, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9287, - "src": "1765:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9293, - "id": 9300, - "nodeType": "Return", - "src": "1749:21:8" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 9302, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9287, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9302, - "src": "1685:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9286, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9289, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9302, - "src": "1696:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:8" - }, - "returnParameters": { - "id": 9293, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9292, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9302, - "src": "1730:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9291, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:8" - }, - "scope": 9352, - "src": "1672:105:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9318, - "nodeType": "Block", - "src": "1915:37:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9311, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9304, - "src": "1932:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 9312, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9306, - "src": "1936:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 9315, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9306, - "src": "1944:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:8", - "trueExpression": { - "argumentTypes": null, - "id": 9314, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9304, - "src": "1940:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9310, - "id": 9317, - "nodeType": "Return", - "src": "1925:20:8" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 9319, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9307, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9304, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9319, - "src": "1861:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9303, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9306, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9319, - "src": "1872:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9305, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:8" - }, - "returnParameters": { - "id": 9310, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9309, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9319, - "src": "1906:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9308, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:8" - }, - "scope": 9352, - "src": "1848:104:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9350, - "nodeType": "Block", - "src": "2136:119:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9328, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9321, - "src": "2208:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9331, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9332, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9323, - "src": "2218:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9335, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9337, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9321, - "src": "2229:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9340, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9323, - "src": "2237:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9344, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9345, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9347, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9327, - "id": 9349, - "nodeType": "Return", - "src": "2200:48:8" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 9351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9321, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9351, - "src": "2082:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9323, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9351, - "src": "2093:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9322, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:8" - }, - "returnParameters": { - "id": 9327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9351, - "src": "2127:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:8" - }, - "scope": 9352, - "src": "2065:190:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "1589:668:8" - }, - { - "id": 9353, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 9538, - "linearizedBaseContracts": [ - 9538 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9377, - "nodeType": "Block", - "src": "3212:109:8", - "statements": [ - { - "assignments": [ - 9363 - ], - "declarations": [ - { - "constant": false, - "id": 9363, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9377, - "src": "3222:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9362, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9367, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9364, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9355, - "src": "3234:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 9365, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9357, - "src": "3238:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9369, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9363, - "src": "3257:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9370, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9355, - "src": "3262:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 9372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 9368, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9374, - "nodeType": "ExpressionStatement", - "src": "3249:46:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9375, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9363, - "src": "3313:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9361, - "id": 9376, - "nodeType": "Return", - "src": "3306:8:8" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 9378, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9355, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9378, - "src": "3158:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9357, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9378, - "src": "3169:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9356, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:8" - }, - "returnParameters": { - "id": 9361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9360, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9378, - "src": "3203:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9359, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:8" - }, - "scope": 9538, - "src": "3145:176:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9393, - "nodeType": "Block", - "src": "3652:67:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9388, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9380, - "src": "3673:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 9389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9382, - "src": "3676:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 9390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 9387, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9394, - 9421 - ], - "referencedDeclaration": 9421, - "src": "3669:3:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9386, - "id": 9392, - "nodeType": "Return", - "src": "3662:50:8" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 9394, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9383, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9380, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9394, - "src": "3598:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9379, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9382, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9394, - "src": "3609:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:8" - }, - "returnParameters": { - "id": 9386, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9385, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9394, - "src": "3643:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:8" - }, - "scope": 9538, - "src": "3585:134:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9420, - "nodeType": "Block", - "src": "4138:92:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9406, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9398, - "src": "4156:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 9407, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9396, - "src": "4161:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 9409, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9400, - "src": "4164:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 9405, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9411, - "nodeType": "ExpressionStatement", - "src": "4148:29:8" - }, - { - "assignments": [ - 9413 - ], - "declarations": [ - { - "constant": false, - "id": 9413, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9420, - "src": "4187:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9412, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9417, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9414, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9396, - "src": "4199:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 9415, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9398, - "src": "4203:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9413, - "src": "4222:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9404, - "id": 9419, - "nodeType": "Return", - "src": "4215:8:8" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 9421, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9396, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4056:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9395, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9398, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4067:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9397, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9400, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4078:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 9399, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:8" - }, - "returnParameters": { - "id": 9404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9403, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4129:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9402, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:8" - }, - "scope": 9538, - "src": "4043:187:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9454, - "nodeType": "Block", - "src": "4537:392:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9430, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9423, - "src": "4769:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 9436, - "nodeType": "IfStatement", - "src": "4765:45:8", - "trueBody": { - "id": 9435, - "nodeType": "Block", - "src": "4777:33:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 9429, - "id": 9434, - "nodeType": "Return", - "src": "4791:8:8" - } - ] - } - }, - { - "assignments": [ - 9438 - ], - "declarations": [ - { - "constant": false, - "id": 9438, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9454, - "src": "4820:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9437, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9442, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9439, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9423, - "src": "4832:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 9440, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9425, - "src": "4836:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9444, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9438, - "src": "4855:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 9445, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9423, - "src": "4859:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 9447, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9425, - "src": "4864:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 9449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 9443, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9451, - "nodeType": "ExpressionStatement", - "src": "4847:56:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9452, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9438, - "src": "4921:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9429, - "id": 9453, - "nodeType": "Return", - "src": "4914:8:8" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 9455, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9426, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9423, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9455, - "src": "4483:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9422, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9425, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9455, - "src": "4494:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9424, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:8" - }, - "returnParameters": { - "id": 9429, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9428, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9455, - "src": "4528:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9427, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:8" - }, - "scope": 9538, - "src": "4470:459:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9470, - "nodeType": "Block", - "src": "5451:63:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9465, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9457, - "src": "5472:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 9466, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9459, - "src": "5475:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 9467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 9464, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9471, - 9498 - ], - "referencedDeclaration": 9498, - "src": "5468:3:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9463, - "id": 9469, - "nodeType": "Return", - "src": "5461:46:8" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 9471, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9457, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9471, - "src": "5397:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9456, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9459, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9471, - "src": "5408:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:8" - }, - "returnParameters": { - "id": 9463, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9462, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9471, - "src": "5442:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:8" - }, - "scope": 9538, - "src": "5384:130:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9497, - "nodeType": "Block", - "src": "6124:243:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9483, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9475, - "src": "6208:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 9486, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9477, - "src": "6215:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 9482, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9488, - "nodeType": "ExpressionStatement", - "src": "6200:28:8" - }, - { - "assignments": [ - 9490 - ], - "declarations": [ - { - "constant": false, - "id": 9490, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9497, - "src": "6238:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9489, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9494, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9491, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9473, - "src": "6250:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 9492, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9475, - "src": "6254:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9495, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9490, - "src": "6359:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9481, - "id": 9496, - "nodeType": "Return", - "src": "6352:8:8" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 9498, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9473, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6042:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9472, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9475, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6053:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9477, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6064:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 9476, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:8" - }, - "returnParameters": { - "id": 9481, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9480, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6115:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9479, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:8" - }, - "scope": 9538, - "src": "6029:338:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9513, - "nodeType": "Block", - "src": "6878:61:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9508, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9500, - "src": "6899:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 9509, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9502, - "src": "6902:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 9510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 9507, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9514, - 9537 - ], - "referencedDeclaration": 9537, - "src": "6895:3:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9506, - "id": 9512, - "nodeType": "Return", - "src": "6888:44:8" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 9514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9500, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9514, - "src": "6824:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9499, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9502, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9514, - "src": "6835:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9501, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:8" - }, - "returnParameters": { - "id": 9506, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9505, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9514, - "src": "6869:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9504, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:8" - }, - "scope": 9538, - "src": "6811:128:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9536, - "nodeType": "Block", - "src": "7538:68:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9526, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9518, - "src": "7556:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 9529, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9520, - "src": "7564:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 9525, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9531, - "nodeType": "ExpressionStatement", - "src": "7548:29:8" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9532, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9516, - "src": "7594:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 9533, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9518, - "src": "7598:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9524, - "id": 9535, - "nodeType": "Return", - "src": "7587:12:8" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 9537, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9521, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9516, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7456:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9515, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9518, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7467:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9520, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7478:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 9519, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:8" - }, - "returnParameters": { - "id": 9524, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9523, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7529:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9522, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:8" - }, - "scope": 9538, - "src": "7443:163:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "2900:4708:8" - }, - { - "id": 9539, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 9564, - "linearizedBaseContracts": [ - 9564 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9542, - "nodeType": "Block", - "src": "8386:3:8", - "statements": [] - }, - "documentation": null, - "id": 9543, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9540, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:8" - }, - "returnParameters": { - "id": 9541, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:8" - }, - "scope": 9564, - "src": "8362:27:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9551, - "nodeType": "Block", - "src": "8510:34:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9548, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 9547, - "id": 9550, - "nodeType": "Return", - "src": "8520:17:8" - } - ] - }, - "documentation": null, - "id": 9552, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9544, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:8" - }, - "returnParameters": { - "id": 9547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9546, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9552, - "src": "8493:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 9545, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:8", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:8" - }, - "scope": 9564, - "src": "8448:96:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9562, - "nodeType": "Block", - "src": "8607:165:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9557, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19417, - "src": "8617:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$9564", - "typeString": "contract Context" - } - }, - "id": 9558, - "nodeType": "ExpressionStatement", - "src": "8617:4:8" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 9556, - "id": 9561, - "nodeType": "Return", - "src": "8750:15:8" - } - ] - }, - "documentation": null, - "id": 9563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9553, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:8" - }, - "returnParameters": { - "id": 9556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9555, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9563, - "src": "8593:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 9554, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:8" - }, - "scope": 9564, - "src": "8550:222:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "8185:589:8" - }, - { - "id": 9565, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:8" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 9566, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9564, - "src": "9238:7:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$9564", - "typeString": "contract Context" - } - }, - "id": 9567, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:8" - } - ], - "contractDependencies": [ - 9564 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 9676, - "linearizedBaseContracts": [ - 9676, - 9564 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 9569, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 9676, - "src": "9252:22:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9568, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 9575, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 9574, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9571, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 9575, - "src": "9308:29:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9570, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9573, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 9575, - "src": "9339:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9572, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:8" - }, - "src": "9281:84:8" - }, - { - "body": { - "id": 9590, - "nodeType": "Block", - "src": "9491:93:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9578, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "9501:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9579, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9552, - "src": "9510:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 9580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9582, - "nodeType": "ExpressionStatement", - "src": "9501:21:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:8", - "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": 9584, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9587, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "9570:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9583, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9575, - "src": "9537:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 9588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9589, - "nodeType": "EmitStatement", - "src": "9532:45:8" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 9591, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9576, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:8" - }, - "returnParameters": { - "id": 9577, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:8" - }, - "scope": 9676, - "src": "9467:117:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9598, - "nodeType": "Block", - "src": "9707:30:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9596, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "9724:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 9595, - "id": 9597, - "nodeType": "Return", - "src": "9717:13:8" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 9599, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9592, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:8" - }, - "returnParameters": { - "id": 9595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9594, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9599, - "src": "9698:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9593, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:8" - }, - "scope": 9676, - "src": "9660:77:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9608, - "nodeType": "Block", - "src": "9846:82:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9602, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9620, - "src": "9864:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 9603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 9604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 9601, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9606, - "nodeType": "ExpressionStatement", - "src": "9856:54:8" - }, - { - "id": 9607, - "nodeType": "PlaceholderStatement", - "src": "9920:1:8" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 9609, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 9600, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:8" - }, - "src": "9825:103:8", - "visibility": "internal" - }, - { - "body": { - "id": 9619, - "nodeType": "Block", - "src": "10057:46:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 9617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9614, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9552, - "src": "10074:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 9615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 9616, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "10090:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 9613, - "id": 9618, - "nodeType": "Return", - "src": "10067:29:8" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 9620, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9610, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:8" - }, - "returnParameters": { - "id": 9613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9612, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9620, - "src": "10051:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9611, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:8" - }, - "scope": 9676, - "src": "10011:92:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9638, - "nodeType": "Block", - "src": "10491:91:8", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9626, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "10527:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9628, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:8", - "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": 9627, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9629, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 9625, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9575, - "src": "10506:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 9630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9631, - "nodeType": "EmitStatement", - "src": "10501:45:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9632, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "10556:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:8", - "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": 9633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9637, - "nodeType": "ExpressionStatement", - "src": "10556:19:8" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 9639, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 9623, - "modifierName": { - "argumentTypes": null, - "id": 9622, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9609, - "src": "10481:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:8" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9621, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:8" - }, - "returnParameters": { - "id": 9624, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:8" - }, - "scope": 9676, - "src": "10445:137:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9650, - "nodeType": "Block", - "src": "10793:45:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9647, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9641, - "src": "10822:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9646, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9675, - "src": "10803:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 9648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9649, - "nodeType": "ExpressionStatement", - "src": "10803:28:8" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 9651, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 9644, - "modifierName": { - "argumentTypes": null, - "id": 9643, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9609, - "src": "10783:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:8" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9642, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9641, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 9651, - "src": "10758:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9640, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:8" - }, - "returnParameters": { - "id": 9645, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:8" - }, - "scope": 9676, - "src": "10731:107:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9674, - "nodeType": "Block", - "src": "10994:170:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 9661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9657, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9653, - "src": "11012:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:8", - "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": 9658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 9662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 9656, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9664, - "nodeType": "ExpressionStatement", - "src": "11004:73:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9666, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "11113:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9667, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9653, - "src": "11121:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9665, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9575, - "src": "11092:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 9668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9669, - "nodeType": "EmitStatement", - "src": "11087:43:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9670, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "11140:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 9671, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9653, - "src": "11149:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9673, - "nodeType": "ExpressionStatement", - "src": "11140:17:8" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 9675, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9654, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9653, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 9675, - "src": "10967:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9652, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:8" - }, - "returnParameters": { - "id": 9655, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:8" - }, - "scope": 9676, - "src": "10939:225:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "9218:1948:8" - }, - { - "id": 9677, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 9744, - "linearizedBaseContracts": [ - 9744 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 9682, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9678, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:8" - }, - "returnParameters": { - "id": 9681, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9680, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9682, - "src": "11541:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9679, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:8" - }, - "scope": 9744, - "src": "11495:55:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 9689, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9684, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9689, - "src": "11652:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9683, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:8" - }, - "returnParameters": { - "id": 9688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9687, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9689, - "src": "11692:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:8" - }, - "scope": 9744, - "src": "11633:68:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 9698, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9694, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9691, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 9698, - "src": "11939:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9690, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9693, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9698, - "src": "11958:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9692, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:8" - }, - "returnParameters": { - "id": 9697, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9696, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9698, - "src": "11992:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9695, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:8" - }, - "scope": 9744, - "src": "11921:77:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 9707, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9700, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 9707, - "src": "12292:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9699, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9702, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9707, - "src": "12307:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:8" - }, - "returnParameters": { - "id": 9706, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9705, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9707, - "src": "12347:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9704, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:8" - }, - "scope": 9744, - "src": "12273:83:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 9716, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9712, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9709, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9716, - "src": "13026:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9708, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9711, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9716, - "src": "13043:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:8" - }, - "returnParameters": { - "id": 9715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9714, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9716, - "src": "13077:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9713, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:8" - }, - "scope": 9744, - "src": "13009:74:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 9727, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9723, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9718, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13412:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9720, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13428:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9722, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13447:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9721, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:8" - }, - "returnParameters": { - "id": 9726, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9725, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13481:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9724, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:8" - }, - "scope": 9744, - "src": "13390:97:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 9735, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 9734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9729, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 9735, - "src": "13671:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9728, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9731, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 9735, - "src": "13693:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9730, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9733, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9735, - "src": "13713:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9732, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:8" - }, - "src": "13656:72:8" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 9743, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 9742, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9737, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 9743, - "src": "13902:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9739, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9743, - "src": "13925:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9738, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9741, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9743, - "src": "13950:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9740, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:8" - }, - "src": "13887:78:8" - } - ], - "scope": 10605, - "src": "11401:2566:8" - }, - { - "id": 9745, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 9818, - "linearizedBaseContracts": [ - 9818 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9769, - "nodeType": "Block", - "src": "14644:731:8", - "statements": [ - { - "assignments": [ - 9753 - ], - "declarations": [ - { - "constant": false, - "id": 9753, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 9769, - "src": "15083:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 9752, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9754, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:8" - }, - { - "assignments": [ - 9756 - ], - "declarations": [ - { - "constant": false, - "id": 9756, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 9769, - "src": "15109:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 9755, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9758, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 9757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:8" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 9753, - "isOffset": false, - "isSlot": false, - "src": "15274:8:8", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 9747, - "isOffset": false, - "isSlot": false, - "src": "15298:7:8", - "valueSize": 1 - } - } - ], - "id": 9759, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:8" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 9766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 9762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9760, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9753, - "src": "15325:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 9761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 9765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9763, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9753, - "src": "15344:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 9764, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9756, - "src": "15356:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 9767, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 9751, - "id": 9768, - "nodeType": "Return", - "src": "15317:51:8" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 9770, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9748, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9747, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9770, - "src": "14598:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9746, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:8" - }, - "returnParameters": { - "id": 9751, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9750, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9770, - "src": "14638:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9749, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:8" - }, - "scope": 9818, - "src": "14578:797:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9783, - "nodeType": "Block", - "src": "15660:49:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9779, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9772, - "src": "15693:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9778, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 9780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 9777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 9776, - "id": 9782, - "nodeType": "Return", - "src": "15670:32:8" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 9784, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9773, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9772, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9784, - "src": "15603:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9771, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:8" - }, - "returnParameters": { - "id": 9776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9775, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9784, - "src": "15643:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 9774, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:8", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:8" - }, - "scope": 9818, - "src": "15584:125:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9816, - "nodeType": "Block", - "src": "16737:294:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9793, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19423, - "src": "16763:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$9818", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$9818", - "typeString": "library Address" - } - ], - "id": 9792, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9796, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9788, - "src": "16780:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 9798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 9791, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9800, - "nodeType": "ExpressionStatement", - "src": "16747:73:8" - }, - { - "assignments": [ - 9802, - null - ], - "declarations": [ - { - "constant": false, - "id": 9802, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 9816, - "src": "16886:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9801, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 9810, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 9808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 9806, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9788, - "src": "16925:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9803, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9786, - "src": "16904:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 9804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:8", - "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": 9805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 9807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:8", - "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": 9809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9812, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9802, - "src": "16954:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 9813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 9811, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9815, - "nodeType": "ExpressionStatement", - "src": "16946:78:8" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 9817, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9786, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 9817, - "src": "16685:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 9785, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:8", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9788, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9817, - "src": "16712:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9787, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:8" - }, - "returnParameters": { - "id": 9790, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:8" - }, - "scope": 9818, - "src": "16666:365:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "14114:2919:8" - }, - { - "id": 9819, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 10034, - "linearizedBaseContracts": [ - 10034 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 9822, - "libraryName": { - "contractScope": null, - "id": 9820, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9538, - "src": "17610:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$9538", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:8", - "typeName": { - "id": 9821, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 9825, - "libraryName": { - "contractScope": null, - "id": 9823, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9818, - "src": "17642:7:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$9818", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:8", - "typeName": { - "id": 9824, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 9846, - "nodeType": "Block", - "src": "17740:102:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9835, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9827, - "src": "17769:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9838, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9827, - "src": "17799:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9698, - "src": "17799:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9841, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9829, - "src": "17824:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9842, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9831, - "src": "17828:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9836, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9834, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "17750:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9845, - "nodeType": "ExpressionStatement", - "src": "17750:85:8" - } - ] - }, - "documentation": null, - "id": 9847, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9827, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9847, - "src": "17690:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9826, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "17690:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9829, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 9847, - "src": "17704:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9828, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9831, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9847, - "src": "17716:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:8" - }, - "returnParameters": { - "id": 9833, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:8" - }, - "scope": 10034, - "src": "17668:174:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9871, - "nodeType": "Block", - "src": "17938:112:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9859, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9849, - "src": "17967:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9862, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9849, - "src": "17997:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 9727, - "src": "17997:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 9864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9865, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9851, - "src": "18026:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9866, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9853, - "src": "18032:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9867, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9855, - "src": "18036:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9860, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9861, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9858, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "17948:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9870, - "nodeType": "ExpressionStatement", - "src": "17948:95:8" - } - ] - }, - "documentation": null, - "id": 9872, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9856, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9849, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17874:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9848, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "17874:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9851, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17888:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9850, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9853, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17902:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9852, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9855, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17914:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9854, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:8" - }, - "returnParameters": { - "id": 9857, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:8" - }, - "scope": 10034, - "src": "17848:202:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9912, - "nodeType": "Block", - "src": "18132:536:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 9896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9882, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9878, - "src": "18421:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 9885, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9889, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19425, - "src": "18461:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - ], - "id": 9888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9891, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9876, - "src": "18468:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 9886, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9874, - "src": "18437:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 9707, - "src": "18437:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 9892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 9895, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 9897, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 9881, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9899, - "nodeType": "ExpressionStatement", - "src": "18412:150:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9901, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9874, - "src": "18591:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9904, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9874, - "src": "18621:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 9716, - "src": "18621:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9907, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9876, - "src": "18645:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9908, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9878, - "src": "18654:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9902, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9900, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "18572:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9911, - "nodeType": "ExpressionStatement", - "src": "18572:89:8" - } - ] - }, - "documentation": null, - "id": 9913, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9874, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9913, - "src": "18077:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9873, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "18077:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9876, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9913, - "src": "18091:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9878, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9913, - "src": "18108:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:8" - }, - "returnParameters": { - "id": 9880, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:8" - }, - "scope": 10034, - "src": "18056:612:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9947, - "nodeType": "Block", - "src": "18760:196:8", - "statements": [ - { - "assignments": [ - 9923 - ], - "declarations": [ - { - "constant": false, - "id": 9923, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 9947, - "src": "18770:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9922, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9934, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9932, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9919, - "src": "18837:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9927, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19425, - "src": "18817:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - ], - "id": 9926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9929, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9917, - "src": "18824:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 9924, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9915, - "src": "18793:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 9707, - "src": "18793:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 9930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "18793:43:8", - "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": 9933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9936, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9915, - "src": "18872:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9939, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9915, - "src": "18902:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 9716, - "src": "18902:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9942, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9917, - "src": "18926:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9943, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9923, - "src": "18935:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9937, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9935, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "18853:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9946, - "nodeType": "ExpressionStatement", - "src": "18853:96:8" - } - ] - }, - "documentation": null, - "id": 9948, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9920, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9915, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9948, - "src": "18705:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9914, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "18705:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9917, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9948, - "src": "18719:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9916, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9919, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9948, - "src": "18736:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9918, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:8" - }, - "returnParameters": { - "id": 9921, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:8" - }, - "scope": 10034, - "src": "18674:282:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9983, - "nodeType": "Block", - "src": "19048:241:8", - "statements": [ - { - "assignments": [ - 9958 - ], - "declarations": [ - { - "constant": false, - "id": 9958, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 9983, - "src": "19058:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9957, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9967, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9954, - "src": "19125:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 9968, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9962, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19425, - "src": "19105:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - ], - "id": 9961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9964, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9952, - "src": "19112:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 9959, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9950, - "src": "19081:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9960, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 9707, - "src": "19081:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 9965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9421, - "src": "19081:43:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9972, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9950, - "src": "19205:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9975, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9950, - "src": "19235:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 9716, - "src": "19235:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9978, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9952, - "src": "19259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9979, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9958, - "src": "19268:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9973, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9974, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9971, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "19186:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9982, - "nodeType": "ExpressionStatement", - "src": "19186:96:8" - } - ] - }, - "documentation": null, - "id": 9984, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9950, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9984, - "src": "18993:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9949, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "18993:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9952, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9984, - "src": "19007:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9951, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9954, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9984, - "src": "19024:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9953, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:8" - }, - "returnParameters": { - "id": 9956, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:8" - }, - "scope": 10034, - "src": "18962:327:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 10032, - "nodeType": "Block", - "src": "19741:1026:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9993, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9986, - "src": "20275:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - ], - "id": 9992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 9770, - "src": "20267:25:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 9996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 9997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 9991, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9999, - "nodeType": "ExpressionStatement", - "src": "20259:71:8" - }, - { - "assignments": [ - 10001, - 10003 - ], - "declarations": [ - { - "constant": false, - "id": 10001, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 10032, - "src": "20401:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 10000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10003, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 10032, - "src": "20415:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10002, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10010, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10008, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9988, - "src": "20462:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10005, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9986, - "src": "20450:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - ], - "id": 10004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:8", - "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": 10009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10012, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10001, - "src": "20485:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 10013, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 10011, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10015, - "nodeType": "ExpressionStatement", - "src": "20477:52:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10016, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10003, - "src": "20544:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 10017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10018, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10031, - "nodeType": "IfStatement", - "src": "20540:221:8", - "trueBody": { - "id": 10030, - "nodeType": "Block", - "src": "20567:194:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10023, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10003, - "src": "20684:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 10024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 10025, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 10021, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 10026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 10027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 10020, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10029, - "nodeType": "ExpressionStatement", - "src": "20665:85:8" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 10033, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9986, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 10033, - "src": "19700:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9985, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "19700:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9988, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10033, - "src": "19714:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 9987, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:8" - }, - "returnParameters": { - "id": 9990, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:8" - }, - "scope": 10034, - "src": "19672:1095:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 10605, - "src": "17580:3189:8" - }, - { - "id": 10035, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:8" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 10036, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9676, - "src": "20892:7:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$9676", - "typeString": "contract Ownable" - } - }, - "id": 10037, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:8" - } - ], - "contractDependencies": [ - 9564, - 9676 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 10069, - "linearizedBaseContracts": [ - 10069, - 9676, - 9564 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 10039, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 10069, - "src": "20906:33:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 10044, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10042, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10041, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10044, - "src": "20974:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10040, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:8" - }, - "returnParameters": { - "id": 10043, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:8" - }, - "scope": 10069, - "src": "20946:53:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 10055, - "nodeType": "Block", - "src": "21039:108:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10047, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9552, - "src": "21057:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 10048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10049, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10039, - "src": "21073:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 10051, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 10046, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10053, - "nodeType": "ExpressionStatement", - "src": "21049:80:8" - }, - { - "id": 10054, - "nodeType": "PlaceholderStatement", - "src": "21139:1:8" - } - ] - }, - "documentation": null, - "id": 10056, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 10045, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:8" - }, - "src": "21005:142:8", - "visibility": "internal" - }, - { - "body": { - "id": 10067, - "nodeType": "Block", - "src": "21252:57:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10063, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10039, - "src": "21262:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10064, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10058, - "src": "21283:19:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10066, - "nodeType": "ExpressionStatement", - "src": "21262:40:8" - } - ] - }, - "documentation": null, - "id": 10068, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 10061, - "modifierName": { - "argumentTypes": null, - "id": 10060, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9609, - "src": "21238:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:8" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10058, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 10068, - "src": "21184:27:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:8" - }, - "returnParameters": { - "id": 10062, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:8" - }, - "scope": 10069, - "src": "21153:156:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 10605, - "src": "20851:460:8" - }, - { - "id": 10070, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 10076, - "linearizedBaseContracts": [ - 10076 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 10075, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10071, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:8" - }, - "returnParameters": { - "id": 10074, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10073, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10075, - "src": "21443:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10072, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:8" - }, - "scope": 10076, - "src": "21396:56:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 10605, - "src": "21376:78:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 10185, - "linearizedBaseContracts": [ - 10185 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 10079, - "libraryName": { - "contractScope": null, - "id": 10077, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9538, - "src": "21493:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$9538", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21487:27:8", - "typeName": { - "id": 10078, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21506:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 10082, - "libraryName": { - "contractScope": null, - "id": 10080, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10034, - "src": "21525:9:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21519:27:8", - "typeName": { - "contractScope": null, - "id": 10081, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "21539:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 10087, - "name": "yfi", - "nodeType": "VariableDeclaration", - "scope": 10185, - "src": "21552:70:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 10083, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "21552:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830626335323963303043363430316145463644323230424538433645613136363746364164393365", - "id": 10085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21579:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10084, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9744, - "src": "21572:6:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$9744_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 10086, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21572:50:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10089, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 10185, - "src": "21629:28:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10088, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21629:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 10093, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 10185, - "src": "21663:45:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 10092, - "keyType": { - "id": 10090, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21671:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21663:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 10091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21682:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 10100, - "nodeType": "Block", - "src": "21768:36:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10098, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "21785:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10097, - "id": 10099, - "nodeType": "Return", - "src": "21778:19:8" - } - ] - }, - "documentation": null, - "id": 10101, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10094, - "nodeType": "ParameterList", - "parameters": [], - "src": "21735:2:8" - }, - "returnParameters": { - "id": 10097, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10096, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10101, - "src": "21759:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10095, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21759:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21758:9:8" - }, - "scope": 10185, - "src": "21715:89:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10112, - "nodeType": "Block", - "src": "21876:42:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10108, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "21893:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10110, - "indexExpression": { - "argumentTypes": null, - "id": 10109, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10103, - "src": "21903:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21893:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10107, - "id": 10111, - "nodeType": "Return", - "src": "21886:25:8" - } - ] - }, - "documentation": null, - "id": 10113, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10104, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10103, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 10113, - "src": "21829:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21829:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21828:17:8" - }, - "returnParameters": { - "id": 10107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10113, - "src": "21867:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21867:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21866:9:8" - }, - "scope": 10185, - "src": "21810:108:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10149, - "nodeType": "Block", - "src": "21962:188:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10118, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "21972:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10121, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10115, - "src": "22004:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10119, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "21987:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "21987:16:8", - "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": 10122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21987:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21972:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10124, - "nodeType": "ExpressionStatement", - "src": "21972:39:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10125, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22021:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10128, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10126, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22031:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22031:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22021:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10134, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10115, - "src": "22071:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10129, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22045:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10132, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10130, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22055:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22055:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22045:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "22045:25:8", - "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": 10135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22045:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22021:57:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10137, - "nodeType": "ExpressionStatement", - "src": "22021:57:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10141, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22109:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22109:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10144, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19431, - "src": "22129:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$10185", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$10185", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 10143, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22121:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22121:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10146, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10115, - "src": "22136:6:8", - "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, - "id": 10138, - "name": "yfi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10087, - "src": "22088:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 10140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 9872, - "src": "22088:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$9744_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 10147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22088:55:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10148, - "nodeType": "ExpressionStatement", - "src": "22088:55:8" - } - ] - }, - "documentation": null, - "id": 10150, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10116, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10115, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10150, - "src": "21939:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10114, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21939:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21938:16:8" - }, - "returnParameters": { - "id": 10117, - "nodeType": "ParameterList", - "parameters": [], - "src": "21962:0:8" - }, - "scope": 10185, - "src": "21924:226:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10183, - "nodeType": "Block", - "src": "22197:169:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10155, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "22207:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10158, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10152, - "src": "22239:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10156, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "22222:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "22222:16:8", - "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": 10159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22222:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22207:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10161, - "nodeType": "ExpressionStatement", - "src": "22207:39:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10162, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22256:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10165, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10163, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22266:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22266:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22256:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10152, - "src": "22306:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10166, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22280:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10169, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10167, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22290:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22290:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22280:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "22280:25:8", - "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": 10172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22280:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22256:57:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10174, - "nodeType": "ExpressionStatement", - "src": "22256:57:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10178, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22340:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22340:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10180, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10152, - "src": "22352:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10175, - "name": "yfi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10087, - "src": "22323:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 10177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9847, - "src": "22323:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$9744_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 10181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22323:36:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10182, - "nodeType": "ExpressionStatement", - "src": "22323:36:8" - } - ] - }, - "documentation": null, - "id": 10184, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10152, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10184, - "src": "22174:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10151, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22174:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22173:16:8" - }, - "returnParameters": { - "id": 10154, - "nodeType": "ParameterList", - "parameters": [], - "src": "22197:0:8" - }, - "scope": 10185, - "src": "22156:210:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 10605, - "src": "21457:911:8" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 10186, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10185, - "src": "22393:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$10185", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 10187, - "nodeType": "InheritanceSpecifier", - "src": "22393:14:8" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 10188, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10069, - "src": "22409:28:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$10069", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 10189, - "nodeType": "InheritanceSpecifier", - "src": "22409:28:8" - } - ], - "contractDependencies": [ - 9564, - 9676, - 10069, - 10185 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 10604, - "linearizedBaseContracts": [ - 10604, - 10069, - 9676, - 9564, - 10185 - ], - "name": "YAMYFIPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 10194, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22444:70:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 10190, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "22444:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 10192, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22471:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10191, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9744, - "src": "22464:6:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$9744_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 10193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22464:50:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 10197, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22520:41:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10195, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22520:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 10196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22555:6:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10200, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22583:37:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10198, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22583:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 10199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22610:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10203, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22664:31:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22664:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 10202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22694:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10206, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22701:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10204, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22701:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 10205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22729:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10208, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22736:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10207, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22736:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10210, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22771:35:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22771:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10214, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22812:57:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 10213, - "keyType": { - "id": 10211, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22820:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22812:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 10212, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22831:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10218, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22875:42:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 10217, - "keyType": { - "id": 10215, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22883:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22875:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 10216, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22894:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 10222, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 10221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10220, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10222, - "src": "22942:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22942:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22941:16:8" - }, - "src": "22924:34:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 10228, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 10227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10224, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 10228, - "src": "22976:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10223, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22976:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10226, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10228, - "src": "22998:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22998:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22975:38:8" - }, - "src": "22963:51:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 10234, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 10233, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10230, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 10234, - "src": "23035:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23035:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10232, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10234, - "src": "23057:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23057:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23034:38:8" - }, - "src": "23019:54:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 10240, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 10239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10236, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 10240, - "src": "23095:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10235, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23095:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10238, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10240, - "src": "23117:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23117:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23094:38:8" - }, - "src": "23078:55:8" - }, - { - "body": { - "id": 10251, - "nodeType": "Block", - "src": "23160:77:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10243, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23178:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23178:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10245, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "23197:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23178:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 10247, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23207:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 10242, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23170:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23170:49:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10249, - "nodeType": "ExpressionStatement", - "src": "23170:49:8" - }, - { - "id": 10250, - "nodeType": "PlaceholderStatement", - "src": "23229:1:8" - } - ] - }, - "documentation": null, - "id": 10252, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 10241, - "nodeType": "ParameterList", - "parameters": [], - "src": "23158:2:8" - }, - "src": "23139:98:8", - "visibility": "internal" - }, - { - "body": { - "id": 10288, - "nodeType": "Block", - "src": "23282:283:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10256, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23292:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10257, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10335, - "src": "23315:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23315:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23292:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10260, - "nodeType": "ExpressionStatement", - "src": "23292:39:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10261, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "23341:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10262, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10302, - "src": "23358:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23358:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23341:43:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10265, - "nodeType": "ExpressionStatement", - "src": "23341:43:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10266, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23398:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 10268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23417:1:8", - "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": 10267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23409:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23409:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23398:21:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10286, - "nodeType": "IfStatement", - "src": "23394:154:8", - "trueBody": { - "id": 10285, - "nodeType": "Block", - "src": "23421:127:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10271, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10218, - "src": "23435:7:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10273, - "indexExpression": { - "argumentTypes": null, - "id": 10272, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23443:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23435:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10275, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23461:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10274, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10364, - "src": "23454:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23454:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23435:34:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10278, - "nodeType": "ExpressionStatement", - "src": "23435:34:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10279, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10214, - "src": "23483:22:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10281, - "indexExpression": { - "argumentTypes": null, - "id": 10280, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23506:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23483:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10282, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23517:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23483:54:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10284, - "nodeType": "ExpressionStatement", - "src": "23483:54:8" - } - ] - } - }, - { - "id": 10287, - "nodeType": "PlaceholderStatement", - "src": "23557:1:8" - } - ] - }, - "documentation": null, - "id": 10289, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 10255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10254, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 10289, - "src": "23265:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23265:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23264:17:8" - }, - "src": "23243:322:8", - "visibility": "internal" - }, - { - "body": { - "id": 10301, - "nodeType": "Block", - "src": "23637:63:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10296, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23663:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23663:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10298, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "23680:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10294, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9352, - "src": "23654:4:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$9352_$", - "typeString": "type(library Math)" - } - }, - "id": 10295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 9319, - "src": "23654:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 10299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23654:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10293, - "id": 10300, - "nodeType": "Return", - "src": "23647:46:8" - } - ] - }, - "documentation": null, - "id": 10302, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10290, - "nodeType": "ParameterList", - "parameters": [], - "src": "23604:2:8" - }, - "returnParameters": { - "id": 10293, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10292, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10302, - "src": "23628:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10291, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23628:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23627:9:8" - }, - "scope": 10604, - "src": "23571:129:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10334, - "nodeType": "Block", - "src": "23762:352:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10307, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10101, - "src": "23776:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23776:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10309, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23793:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23776:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10314, - "nodeType": "IfStatement", - "src": "23772:76:8", - "trueBody": { - "id": 10313, - "nodeType": "Block", - "src": "23796:52:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10311, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23817:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10306, - "id": 10312, - "nodeType": "Return", - "src": "23810:27:8" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10329, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10101, - "src": "24079:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24079:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 10326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24048:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10323, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "24011:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10320, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "23970:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10317, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10302, - "src": "23918:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "23918:51:8", - "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": 10321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:67:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "23918:92:8", - "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": 10324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:104:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "23918:129:8", - "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": 10327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:135:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "23918:160:8", - "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": 10331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:175:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10315, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23876:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "23876:24:8", - "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": 10332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23876:231:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10306, - "id": 10333, - "nodeType": "Return", - "src": "23857:250:8" - } - ] - }, - "documentation": null, - "id": 10335, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10303, - "nodeType": "ParameterList", - "parameters": [], - "src": "23729:2:8" - }, - "returnParameters": { - "id": 10306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10305, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10335, - "src": "23753:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10304, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23753:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23752:9:8" - }, - "scope": 10604, - "src": "23706:408:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10363, - "nodeType": "Block", - "src": "24183:196:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10358, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10218, - "src": "24355:7:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10360, - "indexExpression": { - "argumentTypes": null, - "id": 10359, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10337, - "src": "24363:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24355:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 10355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24328:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10349, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10214, - "src": "24273:22:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10351, - "indexExpression": { - "argumentTypes": null, - "id": 10350, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10337, - "src": "24296:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24273:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10346, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10335, - "src": "24252:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24252:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "24252:20:8", - "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": 10352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24252:53:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10343, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10337, - "src": "24222:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10342, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10113, - "src": "24212:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "24212:39:8", - "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": 10353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:94:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "24212:115:8", - "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": 10356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:121:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "24212:142:8", - "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": 10361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:160:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10341, - "id": 10362, - "nodeType": "Return", - "src": "24193:179:8" - } - ] - }, - "documentation": null, - "id": 10364, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10338, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10337, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 10364, - "src": "24136:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10336, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24136:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24135:17:8" - }, - "returnParameters": { - "id": 10341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10340, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10364, - "src": "24174:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10339, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24174:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24173:9:8" - }, - "scope": 10604, - "src": "24120:259:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10394, - "nodeType": "Block", - "src": "24541:124:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10376, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10366, - "src": "24559:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24568:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24559:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 10379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24571:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 10375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24551:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24551:37:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10381, - "nodeType": "ExpressionStatement", - "src": "24551:37:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10385, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10366, - "src": "24610:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10382, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19434, - "src": "24598:5:8", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMYFIPool_$10604", - "typeString": "contract super YAMYFIPool" - } - }, - "id": 10384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 10150, - "src": "24598:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24598:19:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10387, - "nodeType": "ExpressionStatement", - "src": "24598:19:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10389, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24639:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24639:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10391, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10366, - "src": "24651:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10388, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10228, - "src": "24632:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 10392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24632:26:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10393, - "nodeType": "EmitStatement", - "src": "24627:31:8" - } - ] - }, - "documentation": null, - "id": 10395, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10369, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24518:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24518:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10371, - "modifierName": { - "argumentTypes": null, - "id": 10368, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "24505:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24505:24:8" - }, - { - "arguments": null, - "id": 10373, - "modifierName": { - "argumentTypes": null, - "id": 10372, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10252, - "src": "24530:10:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24530:10:8" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10366, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10395, - "src": "24482:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24482:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24481:16:8" - }, - "returnParameters": { - "id": 10374, - "nodeType": "ParameterList", - "parameters": [], - "src": "24541:0:8" - }, - "scope": 10604, - "src": "24467:198:8", - "stateMutability": "nonpayable", - "superFunction": 10150, - "visibility": "public" - }, - { - "body": { - "id": 10425, - "nodeType": "Block", - "src": "24748:133:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10407, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10397, - "src": "24766:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24775:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24766:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 10410, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24778:19:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 10406, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24758:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24758:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10412, - "nodeType": "ExpressionStatement", - "src": "24758:40:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10416, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10397, - "src": "24823:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10413, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19434, - "src": "24808:5:8", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMYFIPool_$10604", - "typeString": "contract super YAMYFIPool" - } - }, - "id": 10415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 10184, - "src": "24808:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24808:22:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10418, - "nodeType": "ExpressionStatement", - "src": "24808:22:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10420, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24855:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24855:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10422, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10397, - "src": "24867:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10419, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10234, - "src": "24845:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 10423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24845:29:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10424, - "nodeType": "EmitStatement", - "src": "24840:34:8" - } - ] - }, - "documentation": null, - "id": 10426, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10400, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24725:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24725:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10402, - "modifierName": { - "argumentTypes": null, - "id": 10399, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "24712:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24712:24:8" - }, - { - "arguments": null, - "id": 10404, - "modifierName": { - "argumentTypes": null, - "id": 10403, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10252, - "src": "24737:10:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24737:10:8" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10397, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10426, - "src": "24689:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24689:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24688:16:8" - }, - "returnParameters": { - "id": 10405, - "nodeType": "ParameterList", - "parameters": [], - "src": "24748:0:8" - }, - "scope": 10604, - "src": "24671:210:8", - "stateMutability": "nonpayable", - "superFunction": 10184, - "visibility": "public" - }, - { - "body": { - "id": 10439, - "nodeType": "Block", - "src": "24912:69:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10431, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24941:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24941:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10430, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10113, - "src": "24931:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24931:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10429, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10426 - ], - "referencedDeclaration": 10426, - "src": "24922:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24922:31:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10435, - "nodeType": "ExpressionStatement", - "src": "24922:31:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10436, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10505, - "src": "24963:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 10437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24963:11:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10438, - "nodeType": "ExpressionStatement", - "src": "24963:11:8" - } - ] - }, - "documentation": null, - "id": 10440, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10427, - "nodeType": "ParameterList", - "parameters": [], - "src": "24900:2:8" - }, - "returnParameters": { - "id": 10428, - "nodeType": "ParameterList", - "parameters": [], - "src": "24912:0:8" - }, - "scope": 10604, - "src": "24887:94:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 10504, - "nodeType": "Block", - "src": "25051:379:8", - "statements": [ - { - "assignments": [ - 10450 - ], - "declarations": [ - { - "constant": false, - "id": 10450, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10504, - "src": "25061:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10449, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25061:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10455, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10452, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25085:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25085:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10451, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10364, - "src": "25078:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25078:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25061:35:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10456, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10450, - "src": "25110:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25119:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25110:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10503, - "nodeType": "IfStatement", - "src": "25106:318:8", - "trueBody": { - "id": 10502, - "nodeType": "Block", - "src": "25122:302:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10459, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10218, - "src": "25136:7:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10462, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10460, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25144:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25144:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25136:19:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 10463, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25158:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25136:23:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10465, - "nodeType": "ExpressionStatement", - "src": "25136:23:8" - }, - { - "assignments": [ - 10467 - ], - "declarations": [ - { - "constant": false, - "id": 10467, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 10502, - "src": "25173:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10466, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25173:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10475, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10470, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10194, - "src": "25209:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - ], - "id": 10469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25201:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25201:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10468, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10076, - "src": "25197:3:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$10076_$", - "typeString": "type(contract YAM)" - } - }, - "id": 10472, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25197:17:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$10076", - "typeString": "contract YAM" - } - }, - "id": 10473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10075, - "src": "25197:35:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 10474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25197:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25173:61:8" - }, - { - "assignments": [ - 10477 - ], - "declarations": [ - { - "constant": false, - "id": 10477, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 10502, - "src": "25248:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25248:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 10485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 10483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25299:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 10484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25303:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25299:6:8", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10480, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10467, - "src": "25280:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10478, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10450, - "src": "25269:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "25269:10:8", - "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": 10481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25269:25:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "25269:29:8", - "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": 10486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25269:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25248:58:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10491, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25337:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25337:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10493, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10477, - "src": "25349:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10488, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10194, - "src": "25320:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 10490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9847, - "src": "25320:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$9744_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 10494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25320:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10495, - "nodeType": "ExpressionStatement", - "src": "25320:40:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25390:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25390:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10499, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10477, - "src": "25402:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10496, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10240, - "src": "25379:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 10500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25379:34:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10501, - "nodeType": "EmitStatement", - "src": "25374:39:8" - } - ] - } - } - ] - }, - "documentation": null, - "id": 10505, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10443, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25028:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25028:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10445, - "modifierName": { - "argumentTypes": null, - "id": 10442, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "25015:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25015:24:8" - }, - { - "arguments": null, - "id": 10447, - "modifierName": { - "argumentTypes": null, - "id": 10446, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10252, - "src": "25040:10:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25040:10:8" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10441, - "nodeType": "ParameterList", - "parameters": [], - "src": "25005:2:8" - }, - "returnParameters": { - "id": 10448, - "nodeType": "ParameterList", - "parameters": [], - "src": "25051:0:8" - }, - "scope": 10604, - "src": "24987:443:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10602, - "nodeType": "Block", - "src": "25565:703:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10517, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25579:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25579:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 10519, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "25597:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25579:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 10600, - "nodeType": "Block", - "src": "26082:180:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10578, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "26094:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10581, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "26118:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10579, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "26107:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "26107:10:8", - "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": 10582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26107:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26094:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10584, - "nodeType": "ExpressionStatement", - "src": "26094:33:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10585, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "26139:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10586, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "26156:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26139:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10588, - "nodeType": "ExpressionStatement", - "src": "26139:26:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10589, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "26177:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10592, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "26206:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10590, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "26192:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "26192:13:8", - "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": 10593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26192:23:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26177:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10595, - "nodeType": "ExpressionStatement", - "src": "26177:38:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10597, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "26244:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10596, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10222, - "src": "26232:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26232:19:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10599, - "nodeType": "EmitStatement", - "src": "26227:24:8" - } - ] - }, - "id": 10601, - "nodeType": "IfStatement", - "src": "25575:687:8", - "trueBody": { - "id": 10577, - "nodeType": "Block", - "src": "25608:468:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10521, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25624:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25624:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10523, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "25643:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25624:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 10558, - "nodeType": "Block", - "src": "25725:205:8", - "statements": [ - { - "assignments": [ - 10534 - ], - "declarations": [ - { - "constant": false, - "id": 10534, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 10558, - "src": "25741:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10533, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25741:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10540, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10537, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25778:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25778:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10535, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "25761:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "25761:16:8", - "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": 10539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25761:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25741:53:8" - }, - { - "assignments": [ - 10542 - ], - "declarations": [ - { - "constant": false, - "id": 10542, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 10558, - "src": "25810:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10541, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25810:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10547, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10545, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "25843:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10543, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10534, - "src": "25829:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "25829:13:8", - "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": 10546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25829:25:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25810:44:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10548, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "25870:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10554, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "25908:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10551, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10542, - "src": "25894:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10549, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "25883:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "25883:10:8", - "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": 10552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25883:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "25883:24:8", - "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": 10555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25883:34:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25870:47:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10557, - "nodeType": "ExpressionStatement", - "src": "25870:47:8" - } - ] - }, - "id": 10559, - "nodeType": "IfStatement", - "src": "25620:310:8", - "trueBody": { - "id": 10532, - "nodeType": "Block", - "src": "25657:62:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10525, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "25673:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10528, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "25697:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10526, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "25686:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "25686:10:8", - "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": 10529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25686:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25673:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10531, - "nodeType": "ExpressionStatement", - "src": "25673:33:8" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 10563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10560, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "25941:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10561, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25958:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25958:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25941:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10564, - "nodeType": "ExpressionStatement", - "src": "25941:32:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10565, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "25985:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10569, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "26020:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10566, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26000:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26000:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "26000:19:8", - "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": 10570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26000:29:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25985:44:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10572, - "nodeType": "ExpressionStatement", - "src": "25985:44:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10574, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "26058:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10573, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10222, - "src": "26046:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26046:19:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10576, - "nodeType": "EmitStatement", - "src": "26041:24:8" - } - ] - } - } - ] - }, - "documentation": null, - "id": 10603, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 10510, - "modifierName": { - "argumentTypes": null, - "id": 10509, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10056, - "src": "25505:22:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25505:22:8" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 10513, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25557:1:8", - "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": 10512, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25549:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25549:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10515, - "modifierName": { - "argumentTypes": null, - "id": 10511, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "25536:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25536:24:8" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10508, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10507, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10603, - "src": "25464:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10506, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25464:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25463:16:8" - }, - "returnParameters": { - "id": 10516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25565:0:8" - }, - "scope": 10604, - "src": "25436:832:8", - "stateMutability": "nonpayable", - "superFunction": 10044, - "visibility": "external" - } - ], - "scope": 10605, - "src": "22370:3900:8" - } - ], - "src": "1490:24781:8" - }, - "legacyAST": { - "absolutePath": "/Users/brockelmore/YAM/contracts/distribution/YAMYFIPool.sol", - "exportedSymbols": { - "Address": [ - 9818 - ], - "Context": [ - 9564 - ], - "IERC20": [ - 9744 - ], - "IRewardDistributionRecipient": [ - 10069 - ], - "LPTokenWrapper": [ - 10185 - ], - "Math": [ - 9352 - ], - "Ownable": [ - 9676 - ], - "SafeERC20": [ - 10034 - ], - "SafeMath": [ - 9538 - ], - "YAM": [ - 10076 - ], - "YAMYFIPool": [ - 10604 - ] - }, - "id": 10605, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 9285, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1490:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Standard math utilities missing in the Solidity language.", - "fullyImplemented": true, - "id": 9352, - "linearizedBaseContracts": [ - 9352 - ], - "name": "Math", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9301, - "nodeType": "Block", - "src": "1739:38:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9294, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9287, - "src": "1756:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9295, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9289, - "src": "1761:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1756:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 9298, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9289, - "src": "1769:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1756:14:8", - "trueExpression": { - "argumentTypes": null, - "id": 9297, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9287, - "src": "1765:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9293, - "id": 9300, - "nodeType": "Return", - "src": "1749:21:8" - } - ] - }, - "documentation": "@dev Returns the largest of two numbers.", - "id": 9302, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9287, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9302, - "src": "1685:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9286, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1685:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9289, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9302, - "src": "1696:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1696:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1684:22:8" - }, - "returnParameters": { - "id": 9293, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9292, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9302, - "src": "1730:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9291, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1730:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1729:9:8" - }, - "scope": 9352, - "src": "1672:105:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9318, - "nodeType": "Block", - "src": "1915:37:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9311, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9304, - "src": "1932:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 9312, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9306, - "src": "1936:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1932:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "id": 9315, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9306, - "src": "1944:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "1932:13:8", - "trueExpression": { - "argumentTypes": null, - "id": 9314, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9304, - "src": "1940:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9310, - "id": 9317, - "nodeType": "Return", - "src": "1925:20:8" - } - ] - }, - "documentation": "@dev Returns the smallest of two numbers.", - "id": 9319, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "min", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9307, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9304, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9319, - "src": "1861:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9303, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1861:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9306, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9319, - "src": "1872:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9305, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1872:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1860:22:8" - }, - "returnParameters": { - "id": 9310, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9309, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9319, - "src": "1906:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9308, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1906:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1905:9:8" - }, - "scope": 9352, - "src": "1848:104:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9350, - "nodeType": "Block", - "src": "2136:119:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9328, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9321, - "src": "2208:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2212:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2208:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9331, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2207:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9332, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9323, - "src": "2218:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2222:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2218:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9335, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2217:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9337, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9321, - "src": "2229:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2233:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2229:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9340, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9323, - "src": "2237:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2241:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2237:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2229:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9344, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2228:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 9345, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2246:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "2228:19:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 9347, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2227:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2207:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9327, - "id": 9349, - "nodeType": "Return", - "src": "2200:48:8" - } - ] - }, - "documentation": "@dev Returns the average of two numbers. The result is rounded towards\nzero.", - "id": 9351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "average", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9321, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9351, - "src": "2082:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2082:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9323, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9351, - "src": "2093:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9322, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2093:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2081:22:8" - }, - "returnParameters": { - "id": 9327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9326, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9351, - "src": "2127:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2127:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2126:9:8" - }, - "scope": 9352, - "src": "2065:190:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "1589:668:8" - }, - { - "id": 9353, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "2311:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", - "fullyImplemented": true, - "id": 9538, - "linearizedBaseContracts": [ - 9538 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9377, - "nodeType": "Block", - "src": "3212:109:8", - "statements": [ - { - "assignments": [ - 9363 - ], - "declarations": [ - { - "constant": false, - "id": 9363, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9377, - "src": "3222:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9362, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3222:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9367, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9364, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9355, - "src": "3234:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 9365, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9357, - "src": "3238:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3234:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3222:17:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9369, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9363, - "src": "3257:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9370, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9355, - "src": "3262:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3257:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 9372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3265:29:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 9368, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "3249:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3249:46:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9374, - "nodeType": "ExpressionStatement", - "src": "3249:46:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9375, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9363, - "src": "3313:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9361, - "id": 9376, - "nodeType": "Return", - "src": "3306:8:8" - } - ] - }, - "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", - "id": 9378, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9355, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9378, - "src": "3158:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3158:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9357, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9378, - "src": "3169:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9356, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3169:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3157:22:8" - }, - "returnParameters": { - "id": 9361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9360, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9378, - "src": "3203:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9359, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3203:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3202:9:8" - }, - "scope": 9538, - "src": "3145:176:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9393, - "nodeType": "Block", - "src": "3652:67:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9388, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9380, - "src": "3673:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 9389, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9382, - "src": "3676:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 9390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3679:32:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 9387, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9394, - 9421 - ], - "referencedDeclaration": 9421, - "src": "3669:3:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3669:43:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9386, - "id": 9392, - "nodeType": "Return", - "src": "3662:50:8" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", - "id": 9394, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9383, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9380, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9394, - "src": "3598:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9379, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3598:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9382, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9394, - "src": "3609:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3609:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3597:22:8" - }, - "returnParameters": { - "id": 9386, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9385, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9394, - "src": "3643:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9384, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3643:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3642:9:8" - }, - "scope": 9538, - "src": "3585:134:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9420, - "nodeType": "Block", - "src": "4138:92:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9406, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9398, - "src": "4156:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 9407, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9396, - "src": "4161:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4156:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 9409, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9400, - "src": "4164:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 9405, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4148:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4148:29:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9411, - "nodeType": "ExpressionStatement", - "src": "4148:29:8" - }, - { - "assignments": [ - 9413 - ], - "declarations": [ - { - "constant": false, - "id": 9413, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9420, - "src": "4187:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9412, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4187:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9417, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9414, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9396, - "src": "4199:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 9415, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9398, - "src": "4203:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4199:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4187:17:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9418, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9413, - "src": "4222:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9404, - "id": 9419, - "nodeType": "Return", - "src": "4215:8:8" - } - ] - }, - "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", - "id": 9421, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9396, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4056:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9395, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4056:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9398, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4067:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9397, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4067:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9400, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4078:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 9399, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4078:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4055:50:8" - }, - "returnParameters": { - "id": 9404, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9403, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9421, - "src": "4129:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9402, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4129:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4128:9:8" - }, - "scope": 9538, - "src": "4043:187:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9454, - "nodeType": "Block", - "src": "4537:392:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9430, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9423, - "src": "4769:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4774:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4769:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 9436, - "nodeType": "IfStatement", - "src": "4765:45:8", - "trueBody": { - "id": 9435, - "nodeType": "Block", - "src": "4777:33:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4798:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 9429, - "id": 9434, - "nodeType": "Return", - "src": "4791:8:8" - } - ] - } - }, - { - "assignments": [ - 9438 - ], - "declarations": [ - { - "constant": false, - "id": 9438, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9454, - "src": "4820:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9437, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4820:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9442, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9439, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9423, - "src": "4832:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 9440, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9425, - "src": "4836:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4832:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4820:17:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9444, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9438, - "src": "4855:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 9445, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9423, - "src": "4859:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 9447, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9425, - "src": "4864:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4855:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 9449, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4867:35:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 9443, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "4847:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4847:56:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9451, - "nodeType": "ExpressionStatement", - "src": "4847:56:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9452, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9438, - "src": "4921:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9429, - "id": 9453, - "nodeType": "Return", - "src": "4914:8:8" - } - ] - }, - "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", - "id": 9455, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9426, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9423, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9455, - "src": "4483:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9422, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4483:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9425, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9455, - "src": "4494:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9424, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4494:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4482:22:8" - }, - "returnParameters": { - "id": 9429, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9428, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9455, - "src": "4528:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9427, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4528:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4527:9:8" - }, - "scope": 9538, - "src": "4470:459:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9470, - "nodeType": "Block", - "src": "5451:63:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9465, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9457, - "src": "5472:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 9466, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9459, - "src": "5475:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 9467, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5478:28:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 9464, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9471, - 9498 - ], - "referencedDeclaration": 9498, - "src": "5468:3:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5468:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9463, - "id": 9469, - "nodeType": "Return", - "src": "5461:46:8" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 9471, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9457, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9471, - "src": "5397:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9456, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5397:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9459, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9471, - "src": "5408:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9458, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5408:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5396:22:8" - }, - "returnParameters": { - "id": 9463, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9462, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9471, - "src": "5442:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9461, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5442:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5441:9:8" - }, - "scope": 9538, - "src": "5384:130:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9497, - "nodeType": "Block", - "src": "6124:243:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9483, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9475, - "src": "6208:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6212:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6208:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 9486, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9477, - "src": "6215:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 9482, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "6200:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6200:28:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9488, - "nodeType": "ExpressionStatement", - "src": "6200:28:8" - }, - { - "assignments": [ - 9490 - ], - "declarations": [ - { - "constant": false, - "id": 9490, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 9497, - "src": "6238:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9489, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6238:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9494, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9491, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9473, - "src": "6250:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 9492, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9475, - "src": "6254:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6250:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6238:17:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9495, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9490, - "src": "6359:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9481, - "id": 9496, - "nodeType": "Return", - "src": "6352:8:8" - } - ] - }, - "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 9498, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9478, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9473, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6042:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9472, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6042:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9475, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6053:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6053:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9477, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6064:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 9476, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6064:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6041:50:8" - }, - "returnParameters": { - "id": 9481, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9480, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9498, - "src": "6115:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9479, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6115:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6114:9:8" - }, - "scope": 9538, - "src": "6029:338:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9513, - "nodeType": "Block", - "src": "6878:61:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9508, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9500, - "src": "6899:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 9509, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9502, - "src": "6902:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 9510, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6905:26:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 9507, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 9514, - 9537 - ], - "referencedDeclaration": 9537, - "src": "6895:3:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6895:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9506, - "id": 9512, - "nodeType": "Return", - "src": "6888:44:8" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", - "id": 9514, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9500, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9514, - "src": "6824:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9499, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6824:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9502, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9514, - "src": "6835:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9501, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6835:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6823:22:8" - }, - "returnParameters": { - "id": 9506, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9505, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9514, - "src": "6869:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9504, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6869:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6868:9:8" - }, - "scope": 9538, - "src": "6811:128:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9536, - "nodeType": "Block", - "src": "7538:68:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9526, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9518, - "src": "7556:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7561:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7556:6:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 9529, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9520, - "src": "7564:12:8", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 9525, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "7548:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7548:29:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9531, - "nodeType": "ExpressionStatement", - "src": "7548:29:8" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9532, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9516, - "src": "7594:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 9533, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9518, - "src": "7598:1:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7594:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 9524, - "id": 9535, - "nodeType": "Return", - "src": "7587:12:8" - } - ] - }, - "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", - "id": 9537, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9521, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9516, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7456:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9515, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7456:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9518, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7467:9:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7467:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9520, - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7478:26:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 9519, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7478:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7455:50:8" - }, - "returnParameters": { - "id": 9524, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9523, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9537, - "src": "7529:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9522, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7529:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7528:9:8" - }, - "scope": 9538, - "src": "7443:163:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "2900:4708:8" - }, - { - "id": 9539, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "7660:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 9564, - "linearizedBaseContracts": [ - 9564 - ], - "name": "Context", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9542, - "nodeType": "Block", - "src": "8386:3:8", - "statements": [] - }, - "documentation": null, - "id": 9543, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9540, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:2:8" - }, - "returnParameters": { - "id": 9541, - "nodeType": "ParameterList", - "parameters": [], - "src": "8386:0:8" - }, - "scope": 9564, - "src": "8362:27:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9551, - "nodeType": "Block", - "src": "8510:34:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9548, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8527:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8527:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 9547, - "id": 9550, - "nodeType": "Return", - "src": "8520:17:8" - } - ] - }, - "documentation": null, - "id": 9552, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9544, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:2:8" - }, - "returnParameters": { - "id": 9547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9546, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9552, - "src": "8493:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 9545, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8493:15:8", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8492:17:8" - }, - "scope": 9564, - "src": "8448:96:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9562, - "nodeType": "Block", - "src": "8607:165:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9557, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19417, - "src": "8617:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$9564", - "typeString": "contract Context" - } - }, - "id": 9558, - "nodeType": "ExpressionStatement", - "src": "8617:4:8" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9559, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "8757:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 9560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8757:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 9556, - "id": 9561, - "nodeType": "Return", - "src": "8750:15:8" - } - ] - }, - "documentation": null, - "id": 9563, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9553, - "nodeType": "ParameterList", - "parameters": [], - "src": "8567:2:8" - }, - "returnParameters": { - "id": 9556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9555, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9563, - "src": "8593:12:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 9554, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8593:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8592:14:8" - }, - "scope": 9564, - "src": "8550:222:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "8185:589:8" - }, - { - "id": 9565, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "8832:23:8" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 9566, - "name": "Context", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9564, - "src": "9238:7:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Context_$9564", - "typeString": "contract Context" - } - }, - "id": 9567, - "nodeType": "InheritanceSpecifier", - "src": "9238:7:8" - } - ], - "contractDependencies": [ - 9564 - ], - "contractKind": "contract", - "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", - "fullyImplemented": true, - "id": 9676, - "linearizedBaseContracts": [ - 9676, - 9564 - ], - "name": "Ownable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 9569, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 9676, - "src": "9252:22:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9568, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9252:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 9575, - "name": "OwnershipTransferred", - "nodeType": "EventDefinition", - "parameters": { - "id": 9574, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9571, - "indexed": true, - "name": "previousOwner", - "nodeType": "VariableDeclaration", - "scope": 9575, - "src": "9308:29:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9570, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9308:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9573, - "indexed": true, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 9575, - "src": "9339:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9572, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9339:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9307:57:8" - }, - "src": "9281:84:8" - }, - { - "body": { - "id": 9590, - "nodeType": "Block", - "src": "9491:93:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9578, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "9501:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9579, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9552, - "src": "9510:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 9580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9510:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9501:21:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9582, - "nodeType": "ExpressionStatement", - "src": "9501:21:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9585, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9566:1:8", - "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": 9584, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9558:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9558:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 9587, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "9570:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9583, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9575, - "src": "9537:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 9588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9537:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9589, - "nodeType": "EmitStatement", - "src": "9532:45:8" - } - ] - }, - "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", - "id": 9591, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9576, - "nodeType": "ParameterList", - "parameters": [], - "src": "9479:2:8" - }, - "returnParameters": { - "id": 9577, - "nodeType": "ParameterList", - "parameters": [], - "src": "9491:0:8" - }, - "scope": 9676, - "src": "9467:117:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9598, - "nodeType": "Block", - "src": "9707:30:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 9596, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "9724:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 9595, - "id": 9597, - "nodeType": "Return", - "src": "9717:13:8" - } - ] - }, - "documentation": "@dev Returns the address of the current owner.", - "id": 9599, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "owner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9592, - "nodeType": "ParameterList", - "parameters": [], - "src": "9674:2:8" - }, - "returnParameters": { - "id": 9595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9594, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9599, - "src": "9698:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9593, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9698:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9697:9:8" - }, - "scope": 9676, - "src": "9660:77:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9608, - "nodeType": "Block", - "src": "9846:82:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9602, - "name": "isOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9620, - "src": "9864:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 9603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9864:9:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", - "id": 9604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9875:34:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - }, - "value": "Ownable: caller is not the owner" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", - "typeString": "literal_string \"Ownable: caller is not the owner\"" - } - ], - "id": 9601, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "9856:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9856:54:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9606, - "nodeType": "ExpressionStatement", - "src": "9856:54:8" - }, - { - "id": 9607, - "nodeType": "PlaceholderStatement", - "src": "9920:1:8" - } - ] - }, - "documentation": "@dev Throws if called by any account other than the owner.", - "id": 9609, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 9600, - "nodeType": "ParameterList", - "parameters": [], - "src": "9843:2:8" - }, - "src": "9825:103:8", - "visibility": "internal" - }, - { - "body": { - "id": 9619, - "nodeType": "Block", - "src": "10057:46:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 9617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 9614, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9552, - "src": "10074:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 9615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10074:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 9616, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "10090:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10074:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 9613, - "id": 9618, - "nodeType": "Return", - "src": "10067:29:8" - } - ] - }, - "documentation": "@dev Returns true if the caller is the current owner.", - "id": 9620, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9610, - "nodeType": "ParameterList", - "parameters": [], - "src": "10027:2:8" - }, - "returnParameters": { - "id": 9613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9612, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9620, - "src": "10051:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9611, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10051:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10050:6:8" - }, - "scope": 9676, - "src": "10011:92:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9638, - "nodeType": "Block", - "src": "10491:91:8", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9626, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "10527:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9628, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10543:1:8", - "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": 9627, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10535:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9629, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10535:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 9625, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9575, - "src": "10506:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 9630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10506:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9631, - "nodeType": "EmitStatement", - "src": "10501:45:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9632, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "10556:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10573:1:8", - "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": 9633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10565:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9635, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10565:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10556:19:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9637, - "nodeType": "ExpressionStatement", - "src": "10556:19:8" - } - ] - }, - "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", - "id": 9639, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 9623, - "modifierName": { - "argumentTypes": null, - "id": 9622, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9609, - "src": "10481:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10481:9:8" - } - ], - "name": "renounceOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9621, - "nodeType": "ParameterList", - "parameters": [], - "src": "10471:2:8" - }, - "returnParameters": { - "id": 9624, - "nodeType": "ParameterList", - "parameters": [], - "src": "10491:0:8" - }, - "scope": 9676, - "src": "10445:137:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9650, - "nodeType": "Block", - "src": "10793:45:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9647, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9641, - "src": "10822:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9646, - "name": "_transferOwnership", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9675, - "src": "10803:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 9648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10803:28:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9649, - "nodeType": "ExpressionStatement", - "src": "10803:28:8" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", - "id": 9651, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 9644, - "modifierName": { - "argumentTypes": null, - "id": 9643, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9609, - "src": "10783:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10783:9:8" - } - ], - "name": "transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9642, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9641, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 9651, - "src": "10758:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9640, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10758:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10757:18:8" - }, - "returnParameters": { - "id": 9645, - "nodeType": "ParameterList", - "parameters": [], - "src": "10793:0:8" - }, - "scope": 9676, - "src": "10731:107:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 9674, - "nodeType": "Block", - "src": "10994:170:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 9661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9657, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9653, - "src": "11012:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 9659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11032:1:8", - "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": 9658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11024:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11024:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11012:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", - "id": 9662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11036:40:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - }, - "value": "Ownable: new owner is the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", - "typeString": "literal_string \"Ownable: new owner is the zero address\"" - } - ], - "id": 9656, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "11004:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11004:73:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9664, - "nodeType": "ExpressionStatement", - "src": "11004:73:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9666, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "11113:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9667, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9653, - "src": "11121:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9665, - "name": "OwnershipTransferred", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9575, - "src": "11092:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 9668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11092:38:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9669, - "nodeType": "EmitStatement", - "src": "11087:43:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 9672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 9670, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9569, - "src": "11140:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 9671, - "name": "newOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9653, - "src": "11149:8:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11140:17:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9673, - "nodeType": "ExpressionStatement", - "src": "11140:17:8" - } - ] - }, - "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", - "id": 9675, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferOwnership", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9654, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9653, - "name": "newOwner", - "nodeType": "VariableDeclaration", - "scope": 9675, - "src": "10967:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9652, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10967:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10966:18:8" - }, - "returnParameters": { - "id": 9655, - "nodeType": "ParameterList", - "parameters": [], - "src": "10994:0:8" - }, - "scope": 9676, - "src": "10939:225:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "9218:1948:8" - }, - { - "id": 9677, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "11225:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", - "fullyImplemented": false, - "id": 9744, - "linearizedBaseContracts": [ - 9744 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@dev Returns the amount of tokens in existence.", - "id": 9682, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9678, - "nodeType": "ParameterList", - "parameters": [], - "src": "11515:2:8" - }, - "returnParameters": { - "id": 9681, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9680, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9682, - "src": "11541:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9679, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11541:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11540:9:8" - }, - "scope": 9744, - "src": "11495:55:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the amount of tokens owned by `account`.", - "id": 9689, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9684, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9689, - "src": "11652:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9683, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11651:17:8" - }, - "returnParameters": { - "id": 9688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9687, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9689, - "src": "11692:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11692:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11691:9:8" - }, - "scope": 9744, - "src": "11633:68:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 9698, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9694, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9691, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 9698, - "src": "11939:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9690, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11939:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9693, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9698, - "src": "11958:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9692, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11958:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11938:35:8" - }, - "returnParameters": { - "id": 9697, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9696, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9698, - "src": "11992:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9695, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11992:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11991:6:8" - }, - "scope": 9744, - "src": "11921:77:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", - "id": 9707, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9703, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9700, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 9707, - "src": "12292:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9699, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12292:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9702, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9707, - "src": "12307:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9701, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12307:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12291:32:8" - }, - "returnParameters": { - "id": 9706, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9705, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9707, - "src": "12347:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9704, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12347:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12346:9:8" - }, - "scope": 9744, - "src": "12273:83:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", - "id": 9716, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9712, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9709, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9716, - "src": "13026:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9708, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13026:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9711, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9716, - "src": "13043:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13025:33:8" - }, - "returnParameters": { - "id": 9715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9714, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9716, - "src": "13077:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9713, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13077:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13076:6:8" - }, - "scope": 9744, - "src": "13009:74:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": null, - "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", - "id": 9727, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9723, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9718, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13412:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13412:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9720, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13428:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13428:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9722, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13447:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9721, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13447:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13411:51:8" - }, - "returnParameters": { - "id": 9726, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9725, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9727, - "src": "13481:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9724, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13481:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13480:6:8" - }, - "scope": 9744, - "src": "13390:97:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", - "id": 9735, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 9734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9729, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 9735, - "src": "13671:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9728, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13671:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9731, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 9735, - "src": "13693:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9730, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13693:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9733, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9735, - "src": "13713:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9732, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13713:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13670:57:8" - }, - "src": "13656:72:8" - }, - { - "anonymous": false, - "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", - "id": 9743, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 9742, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9737, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 9743, - "src": "13902:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13902:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9739, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9743, - "src": "13925:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9738, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13925:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9741, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9743, - "src": "13950:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9740, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13950:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13901:63:8" - }, - "src": "13887:78:8" - } - ], - "scope": 10605, - "src": "11401:2566:8" - }, - { - "id": 9745, - "literals": [ - "solidity", - "^", - "0.5", - ".5" - ], - "nodeType": "PragmaDirective", - "src": "14021:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@dev Collection of functions related to the address type", - "fullyImplemented": true, - "id": 9818, - "linearizedBaseContracts": [ - 9818 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 9769, - "nodeType": "Block", - "src": "14644:731:8", - "statements": [ - { - "assignments": [ - 9753 - ], - "declarations": [ - { - "constant": false, - "id": 9753, - "name": "codehash", - "nodeType": "VariableDeclaration", - "scope": 9769, - "src": "15083:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 9752, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15083:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9754, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15083:16:8" - }, - { - "assignments": [ - 9756 - ], - "declarations": [ - { - "constant": false, - "id": 9756, - "name": "accountHash", - "nodeType": "VariableDeclaration", - "scope": 9769, - "src": "15109:19:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 9755, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15109:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9758, - "initialValue": { - "argumentTypes": null, - "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", - "id": 9757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15131:66:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", - "typeString": "int_const 8947...(69 digits omitted)...1552" - }, - "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15109:88:8" - }, - { - "externalReferences": [ - { - "codehash": { - "declaration": 9753, - "isOffset": false, - "isSlot": false, - "src": "15274:8:8", - "valueSize": 1 - } - }, - { - "account": { - "declaration": 9747, - "isOffset": false, - "isSlot": false, - "src": "15298:7:8", - "valueSize": 1 - } - } - ], - "id": 9759, - "nodeType": "InlineAssembly", - "operations": "{\n codehash := extcodehash(account)\n}", - "src": "15263:45:8" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 9766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 9762, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9760, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9753, - "src": "15325:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 9761, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15337:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "15325:15:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 9765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9763, - "name": "codehash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9753, - "src": "15344:8:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 9764, - "name": "accountHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9756, - "src": "15356:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "15344:23:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15325:42:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 9767, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15324:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 9751, - "id": 9768, - "nodeType": "Return", - "src": "15317:51:8" - } - ] - }, - "documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * IMPORTANT: It is unsafe to assume that an address for which this\nfunction returns false is an externally-owned account (EOA) and not a\ncontract.", - "id": 9770, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9748, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9747, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9770, - "src": "14598:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9746, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14598:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14597:17:8" - }, - "returnParameters": { - "id": 9751, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9750, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9770, - "src": "14638:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9749, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14638:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14637:6:8" - }, - "scope": 9818, - "src": "14578:797:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9783, - "nodeType": "Block", - "src": "15660:49:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9779, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9772, - "src": "15693:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 9778, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15685:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 9780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15685:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 9777, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15677:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15677:25:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 9776, - "id": 9782, - "nodeType": "Return", - "src": "15670:32:8" - } - ] - }, - "documentation": "@dev Converts an `address` into `address payable`. Note that this is\nsimply a type cast: the actual underlying value is not changed.\n * _Available since v2.4.0._", - "id": 9784, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "toPayable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9773, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9772, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 9784, - "src": "15603:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9771, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15603:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15602:17:8" - }, - "returnParameters": { - "id": 9776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9775, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 9784, - "src": "15643:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 9774, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15643:15:8", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15642:17:8" - }, - "scope": 9818, - "src": "15584:125:8", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9816, - "nodeType": "Block", - "src": "16737:294:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9793, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19423, - "src": "16763:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$9818", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$9818", - "typeString": "library Address" - } - ], - "id": 9792, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16755:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16755:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9795, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16755:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 9796, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9788, - "src": "16780:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16755:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 9798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16788:31:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 9791, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16747:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16747:73:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9800, - "nodeType": "ExpressionStatement", - "src": "16747:73:8" - }, - { - "assignments": [ - 9802, - null - ], - "declarations": [ - { - "constant": false, - "id": 9802, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 9816, - "src": "16886:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 9801, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16886:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 9810, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 9808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16933:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "arguments": [ - { - "argumentTypes": null, - "id": 9806, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9788, - "src": "16925:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9803, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9786, - "src": "16904:9:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 9804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:14:8", - "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": 9805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16904:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value_$", - "typeString": "function (uint256) pure returns (function (bytes memory) payable returns (bool,bytes memory))" - } - }, - "id": 9807, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:28:8", - "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": 9809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16904:32:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16885:51:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9812, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9802, - "src": "16954:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 9813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16963:60:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 9811, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "16946:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16946:78:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9815, - "nodeType": "ExpressionStatement", - "src": "16946:78:8" - } - ] - }, - "documentation": "@dev Replacement for Solidity's `transfer`: sends `amount` wei to\n`recipient`, forwarding all available gas and reverting on errors.\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\nof certain opcodes, possibly making contracts go over the 2300 gas limit\nimposed by `transfer`, making them unable to receive funds via\n`transfer`. {sendValue} removes this limitation.\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n * IMPORTANT: because control is transferred to `recipient`, care must be\ntaken to not create reentrancy vulnerabilities. Consider using\n{ReentrancyGuard} or the\nhttps://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n * _Available since v2.4.0._", - "id": 9817, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9789, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9786, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 9817, - "src": "16685:25:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 9785, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16685:15:8", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9788, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 9817, - "src": "16712:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9787, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16712:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16684:43:8" - }, - "returnParameters": { - "id": 9790, - "nodeType": "ParameterList", - "parameters": [], - "src": "16737:0:8" - }, - "scope": 9818, - "src": "16666:365:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 10605, - "src": "14114:2919:8" - }, - { - "id": 9819, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "17095:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure (when the token\ncontract returns false). Tokens that return no value (and instead revert or\nthrow on failure) are also supported, non-reverting calls are assumed to be\nsuccessful.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", - "fullyImplemented": true, - "id": 10034, - "linearizedBaseContracts": [ - 10034 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 9822, - "libraryName": { - "contractScope": null, - "id": 9820, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9538, - "src": "17610:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$9538", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "17604:27:8", - "typeName": { - "id": 9821, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17623:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 9825, - "libraryName": { - "contractScope": null, - "id": 9823, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9818, - "src": "17642:7:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$9818", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "17636:26:8", - "typeName": { - "id": 9824, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17654:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 9846, - "nodeType": "Block", - "src": "17740:102:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9835, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9827, - "src": "17769:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9838, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9827, - "src": "17799:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9698, - "src": "17799:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17799:23:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9841, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9829, - "src": "17824:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9842, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9831, - "src": "17828:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9836, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17776:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17776:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17776:58:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9834, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "17750:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17750:85:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9845, - "nodeType": "ExpressionStatement", - "src": "17750:85:8" - } - ] - }, - "documentation": null, - "id": 9847, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9832, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9827, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9847, - "src": "17690:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9826, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "17690:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9829, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 9847, - "src": "17704:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9828, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17704:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9831, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9847, - "src": "17716:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17716:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17689:41:8" - }, - "returnParameters": { - "id": 9833, - "nodeType": "ParameterList", - "parameters": [], - "src": "17740:0:8" - }, - "scope": 10034, - "src": "17668:174:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9871, - "nodeType": "Block", - "src": "17938:112:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9859, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9849, - "src": "17967:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9862, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9849, - "src": "17997:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 9727, - "src": "17997:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 9864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17997:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9865, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9851, - "src": "18026:4:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9866, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9853, - "src": "18032:2:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9867, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9855, - "src": "18036:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9860, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "17974:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9861, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17974:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17974:68:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9858, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "17948:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17948:95:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9870, - "nodeType": "ExpressionStatement", - "src": "17948:95:8" - } - ] - }, - "documentation": null, - "id": 9872, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9856, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9849, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17874:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9848, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "17874:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9851, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17888:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9850, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17888:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9853, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17902:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9852, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17902:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9855, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9872, - "src": "17914:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9854, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17914:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17873:55:8" - }, - "returnParameters": { - "id": 9857, - "nodeType": "ParameterList", - "parameters": [], - "src": "17938:0:8" - }, - "scope": 10034, - "src": "17848:202:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9912, - "nodeType": "Block", - "src": "18132:536:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 9896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 9882, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9878, - "src": "18421:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18430:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18421:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 9885, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18420:12:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 9894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9889, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19425, - "src": "18461:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - ], - "id": 9888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18453:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18453:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9891, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9876, - "src": "18468:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 9886, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9874, - "src": "18437:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 9707, - "src": "18437:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 9892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18437:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 9893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18480:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "18437:44:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 9895, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "18436:46:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18420:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 9897, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18496:56:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 9881, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "18412:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18412:150:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9899, - "nodeType": "ExpressionStatement", - "src": "18412:150:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9901, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9874, - "src": "18591:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9904, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9874, - "src": "18621:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 9716, - "src": "18621:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18621:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9907, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9876, - "src": "18645:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9908, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9878, - "src": "18654:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9902, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18598:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18598:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18598:62:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9900, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "18572:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18572:89:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9911, - "nodeType": "ExpressionStatement", - "src": "18572:89:8" - } - ] - }, - "documentation": null, - "id": 9913, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9874, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9913, - "src": "18077:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9873, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "18077:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9876, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9913, - "src": "18091:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18091:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9878, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9913, - "src": "18108:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18108:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18076:46:8" - }, - "returnParameters": { - "id": 9880, - "nodeType": "ParameterList", - "parameters": [], - "src": "18132:0:8" - }, - "scope": 10034, - "src": "18056:612:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9947, - "nodeType": "Block", - "src": "18760:196:8", - "statements": [ - { - "assignments": [ - 9923 - ], - "declarations": [ - { - "constant": false, - "id": 9923, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 9947, - "src": "18770:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9922, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18770:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9934, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9932, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9919, - "src": "18837:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9927, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19425, - "src": "18817:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - ], - "id": 9926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "18809:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18809:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9929, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9917, - "src": "18824:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 9924, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9915, - "src": "18793:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 9707, - "src": "18793:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 9930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "18793:43:8", - "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": 9933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18793:50:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18770:73:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9936, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9915, - "src": "18872:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9939, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9915, - "src": "18902:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 9716, - "src": "18902:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18902:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9942, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9917, - "src": "18926:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9943, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9923, - "src": "18935:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9937, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "18879:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18879:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9944, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18879:69:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9935, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "18853:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18853:96:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9946, - "nodeType": "ExpressionStatement", - "src": "18853:96:8" - } - ] - }, - "documentation": null, - "id": 9948, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9920, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9915, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9948, - "src": "18705:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9914, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "18705:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9917, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9948, - "src": "18719:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9916, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18719:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9919, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9948, - "src": "18736:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9918, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18736:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18704:46:8" - }, - "returnParameters": { - "id": 9921, - "nodeType": "ParameterList", - "parameters": [], - "src": "18760:0:8" - }, - "scope": 10034, - "src": "18674:282:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 9983, - "nodeType": "Block", - "src": "19048:241:8", - "statements": [ - { - "assignments": [ - 9958 - ], - "declarations": [ - { - "constant": false, - "id": 9958, - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 9983, - "src": "19058:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9957, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19058:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 9970, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9967, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9954, - "src": "19125:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 9968, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19132:43:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9962, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19425, - "src": "19105:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - ], - "id": 9961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19097:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19097:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9964, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9952, - "src": "19112:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 9959, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9950, - "src": "19081:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9960, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 9707, - "src": "19081:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 9965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 9966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9421, - "src": "19081:43:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 9969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19081:95:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19058:118:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9972, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9950, - "src": "19205:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 9975, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9950, - "src": "19235:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 9976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 9716, - "src": "19235:13:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 9977, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19235:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 9978, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9952, - "src": "19259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 9979, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9958, - "src": "19268:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 9973, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "19212:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 9974, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19212:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 9980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19212:69:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9971, - "name": "callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10033, - "src": "19186:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 9981, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19186:96:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9982, - "nodeType": "ExpressionStatement", - "src": "19186:96:8" - } - ] - }, - "documentation": null, - "id": 9984, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9950, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 9984, - "src": "18993:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9949, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "18993:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9952, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 9984, - "src": "19007:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9951, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19007:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9954, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 9984, - "src": "19024:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9953, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "19024:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18992:46:8" - }, - "returnParameters": { - "id": 9956, - "nodeType": "ParameterList", - "parameters": [], - "src": "19048:0:8" - }, - "scope": 10034, - "src": "18962:327:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 10032, - "nodeType": "Block", - "src": "19741:1026:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 9993, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9986, - "src": "20275:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - ], - "id": 9992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20267:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 9994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:14:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 9995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 9770, - "src": "20267:25:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 9996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20267:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 9997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20296:33:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - }, - "value": "SafeERC20: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f6ce7bfd656f35145dec774d6f7e67f4cba158373d2dd7a0f8273e232f86148d", - "typeString": "literal_string \"SafeERC20: call to non-contract\"" - } - ], - "id": 9991, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20259:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 9998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20259:71:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 9999, - "nodeType": "ExpressionStatement", - "src": "20259:71:8" - }, - { - "assignments": [ - 10001, - 10003 - ], - "declarations": [ - { - "constant": false, - "id": 10001, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 10032, - "src": "20401:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 10000, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "20401:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10003, - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 10032, - "src": "20415:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 10002, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20415:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10010, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10008, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9988, - "src": "20462:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10005, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9986, - "src": "20450:5:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - ], - "id": 10004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20442:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:14:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20442:19:8", - "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": 10009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20442:25:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "20400:67:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10012, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10001, - "src": "20485:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 10013, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20494:34:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "id": 10011, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20477:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10014, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20477:52:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10015, - "nodeType": "ExpressionStatement", - "src": "20477:52:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10016, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10003, - "src": "20544:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 10017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20544:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10018, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20564:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "20544:21:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10031, - "nodeType": "IfStatement", - "src": "20540:221:8", - "trueBody": { - "id": 10030, - "nodeType": "Block", - "src": "20567:194:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10023, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10003, - "src": "20684:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 10024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "20697:4:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": "bool" - } - ], - "id": 10025, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20696:6:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "argumentTypes": null, - "id": 10021, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19230, - "src": "20673:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 10022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20673:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 10026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20673:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 10027, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20705:44:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 10020, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "20665:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20665:85:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10029, - "nodeType": "ExpressionStatement", - "src": "20665:85:8" - } - ] - } - } - ] - }, - "documentation": "@dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\non the return value: the return value is optional (but if data is returned, it must not be false).\n@param token The token targeted by the call.\n@param data The call data (encoded using abi.encode or one of its variants).", - "id": 10033, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 9989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 9986, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 10033, - "src": "19700:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 9985, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "19700:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9988, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 10033, - "src": "19714:17:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 9987, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "19714:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19699:33:8" - }, - "returnParameters": { - "id": 9990, - "nodeType": "ParameterList", - "parameters": [], - "src": "19741:0:8" - }, - "scope": 10034, - "src": "19672:1095:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 10605, - "src": "17580:3189:8" - }, - { - "id": 10035, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "20824:23:8" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 10036, - "name": "Ownable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9676, - "src": "20892:7:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Ownable_$9676", - "typeString": "contract Ownable" - } - }, - "id": 10037, - "nodeType": "InheritanceSpecifier", - "src": "20892:7:8" - } - ], - "contractDependencies": [ - 9564, - 9676 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 10069, - "linearizedBaseContracts": [ - 10069, - 9676, - 9564 - ], - "name": "IRewardDistributionRecipient", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 10039, - "name": "rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 10069, - "src": "20906:33:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20906:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 10044, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10042, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10041, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10044, - "src": "20974:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10040, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20974:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20973:16:8" - }, - "returnParameters": { - "id": 10043, - "nodeType": "ParameterList", - "parameters": [], - "src": "20998:0:8" - }, - "scope": 10069, - "src": "20946:53:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 10055, - "nodeType": "Block", - "src": "21039:108:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10047, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9552, - "src": "21057:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 10048, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21057:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 10049, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10039, - "src": "21073:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21057:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616c6c6572206973206e6f742072657761726420646973747269627574696f6e", - "id": 10051, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21093:35:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - }, - "value": "Caller is not reward distribution" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aaaffe5c21fa5c5738339a5c250428887dc295da86e97cc962477da488b4d856", - "typeString": "literal_string \"Caller is not reward distribution\"" - } - ], - "id": 10046, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "21049:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21049:80:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10053, - "nodeType": "ExpressionStatement", - "src": "21049:80:8" - }, - { - "id": 10054, - "nodeType": "PlaceholderStatement", - "src": "21139:1:8" - } - ] - }, - "documentation": null, - "id": 10056, - "name": "onlyRewardDistribution", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 10045, - "nodeType": "ParameterList", - "parameters": [], - "src": "21036:2:8" - }, - "src": "21005:142:8", - "visibility": "internal" - }, - { - "body": { - "id": 10067, - "nodeType": "Block", - "src": "21252:57:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10063, - "name": "rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10039, - "src": "21262:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10064, - "name": "_rewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10058, - "src": "21283:19:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21262:40:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10066, - "nodeType": "ExpressionStatement", - "src": "21262:40:8" - } - ] - }, - "documentation": null, - "id": 10068, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 10061, - "modifierName": { - "argumentTypes": null, - "id": 10060, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9609, - "src": "21238:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21238:9:8" - } - ], - "name": "setRewardDistribution", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10058, - "name": "_rewardDistribution", - "nodeType": "VariableDeclaration", - "scope": 10068, - "src": "21184:27:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21184:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21183:29:8" - }, - "returnParameters": { - "id": 10062, - "nodeType": "ParameterList", - "parameters": [], - "src": "21252:0:8" - }, - "scope": 10069, - "src": "21153:156:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 10605, - "src": "20851:460:8" - }, - { - "id": 10070, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "21350:23:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 10076, - "linearizedBaseContracts": [ - 10076 - ], - "name": "YAM", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 10075, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "yamsScalingFactor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10071, - "nodeType": "ParameterList", - "parameters": [], - "src": "21422:2:8" - }, - "returnParameters": { - "id": 10074, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10073, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10075, - "src": "21443:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10072, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21443:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21442:9:8" - }, - "scope": 10076, - "src": "21396:56:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 10605, - "src": "21376:78:8" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 10185, - "linearizedBaseContracts": [ - 10185 - ], - "name": "LPTokenWrapper", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 10079, - "libraryName": { - "contractScope": null, - "id": 10077, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9538, - "src": "21493:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$9538", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "21487:27:8", - "typeName": { - "id": 10078, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21506:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 10082, - "libraryName": { - "contractScope": null, - "id": 10080, - "name": "SafeERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10034, - "src": "21525:9:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$10034", - "typeString": "library SafeERC20" - } - }, - "nodeType": "UsingForDirective", - "src": "21519:27:8", - "typeName": { - "contractScope": null, - "id": 10081, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "21539:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "id": 10087, - "name": "yfi", - "nodeType": "VariableDeclaration", - "scope": 10185, - "src": "21552:70:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 10083, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "21552:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830626335323963303043363430316145463644323230424538433645613136363746364164393365", - "id": 10085, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21579:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10084, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9744, - "src": "21572:6:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$9744_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 10086, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21572:50:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10089, - "name": "_totalSupply", - "nodeType": "VariableDeclaration", - "scope": 10185, - "src": "21629:28:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10088, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21629:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 10093, - "name": "_balances", - "nodeType": "VariableDeclaration", - "scope": 10185, - "src": "21663:45:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 10092, - "keyType": { - "id": 10090, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21671:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "21663:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 10091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21682:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 10100, - "nodeType": "Block", - "src": "21768:36:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10098, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "21785:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10097, - "id": 10099, - "nodeType": "Return", - "src": "21778:19:8" - } - ] - }, - "documentation": null, - "id": 10101, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10094, - "nodeType": "ParameterList", - "parameters": [], - "src": "21735:2:8" - }, - "returnParameters": { - "id": 10097, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10096, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10101, - "src": "21759:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10095, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21759:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21758:9:8" - }, - "scope": 10185, - "src": "21715:89:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10112, - "nodeType": "Block", - "src": "21876:42:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10108, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "21893:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10110, - "indexExpression": { - "argumentTypes": null, - "id": 10109, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10103, - "src": "21903:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21893:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10107, - "id": 10111, - "nodeType": "Return", - "src": "21886:25:8" - } - ] - }, - "documentation": null, - "id": 10113, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10104, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10103, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 10113, - "src": "21829:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21829:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21828:17:8" - }, - "returnParameters": { - "id": 10107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10106, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10113, - "src": "21867:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21867:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21866:9:8" - }, - "scope": 10185, - "src": "21810:108:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10149, - "nodeType": "Block", - "src": "21962:188:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10118, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "21972:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10121, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10115, - "src": "22004:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10119, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "21987:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "21987:16:8", - "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": 10122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21987:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "21972:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10124, - "nodeType": "ExpressionStatement", - "src": "21972:39:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10125, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22021:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10128, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10126, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22031:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22031:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22021:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10134, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10115, - "src": "22071:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10129, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22045:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10132, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10130, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22055:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22055:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22045:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "22045:25:8", - "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": 10135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22045:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22021:57:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10137, - "nodeType": "ExpressionStatement", - "src": "22021:57:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10141, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22109:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22109:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10144, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19431, - "src": "22129:4:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$10185", - "typeString": "contract LPTokenWrapper" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_LPTokenWrapper_$10185", - "typeString": "contract LPTokenWrapper" - } - ], - "id": 10143, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "22121:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22121:13:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 10146, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10115, - "src": "22136:6:8", - "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, - "id": 10138, - "name": "yfi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10087, - "src": "22088:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 10140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 9872, - "src": "22088:20:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$9744_$", - "typeString": "function (contract IERC20,address,address,uint256)" - } - }, - "id": 10147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22088:55:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10148, - "nodeType": "ExpressionStatement", - "src": "22088:55:8" - } - ] - }, - "documentation": null, - "id": 10150, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10116, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10115, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10150, - "src": "21939:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10114, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21939:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21938:16:8" - }, - "returnParameters": { - "id": 10117, - "nodeType": "ParameterList", - "parameters": [], - "src": "21962:0:8" - }, - "scope": 10185, - "src": "21924:226:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10183, - "nodeType": "Block", - "src": "22197:169:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10155, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "22207:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10158, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10152, - "src": "22239:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10156, - "name": "_totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10089, - "src": "22222:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "22222:16:8", - "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": 10159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22222:24:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22207:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10161, - "nodeType": "ExpressionStatement", - "src": "22207:39:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10162, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22256:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10165, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10163, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22266:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22266:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "22256:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10171, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10152, - "src": "22306:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10166, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10093, - "src": "22280:9:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10169, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10167, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22290:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22290:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22280:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "22280:25:8", - "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": 10172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22280:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22256:57:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10174, - "nodeType": "ExpressionStatement", - "src": "22256:57:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10178, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "22340:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22340:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10180, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10152, - "src": "22352:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10175, - "name": "yfi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10087, - "src": "22323:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 10177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9847, - "src": "22323:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$9744_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 10181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22323:36:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10182, - "nodeType": "ExpressionStatement", - "src": "22323:36:8" - } - ] - }, - "documentation": null, - "id": 10184, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10152, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10184, - "src": "22174:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10151, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22174:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22173:16:8" - }, - "returnParameters": { - "id": 10154, - "nodeType": "ParameterList", - "parameters": [], - "src": "22197:0:8" - }, - "scope": 10185, - "src": "22156:210:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 10605, - "src": "21457:911:8" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 10186, - "name": "LPTokenWrapper", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10185, - "src": "22393:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_LPTokenWrapper_$10185", - "typeString": "contract LPTokenWrapper" - } - }, - "id": 10187, - "nodeType": "InheritanceSpecifier", - "src": "22393:14:8" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 10188, - "name": "IRewardDistributionRecipient", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10069, - "src": "22409:28:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IRewardDistributionRecipient_$10069", - "typeString": "contract IRewardDistributionRecipient" - } - }, - "id": 10189, - "nodeType": "InheritanceSpecifier", - "src": "22409:28:8" - } - ], - "contractDependencies": [ - 9564, - 9676, - 10069, - 10185 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 10604, - "linearizedBaseContracts": [ - 10604, - 10069, - 9676, - 9564, - 10185 - ], - "name": "YAMYFIPool", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 10194, - "name": "yam", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22444:70:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 10190, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9744, - "src": "22444:6:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307834424336363537323833663866323465323745416331443231443164654535363643353334413941", - "id": 10192, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22471:42:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "value": "0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10191, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9744, - "src": "22464:6:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$9744_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 10193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22464:50:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 10197, - "name": "DURATION", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22520:41:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10195, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22520:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "363235303030", - "id": 10196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22555:6:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_625000_by_1", - "typeString": "int_const 625000" - }, - "value": "625000" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10200, - "name": "starttime", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22583:37:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10198, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22583:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31353937393331323030", - "id": 10199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22610:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1597931200_by_1", - "typeString": "int_const 1597931200" - }, - "value": "1597931200" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10203, - "name": "periodFinish", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22664:31:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10201, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22664:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 10202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22694:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10206, - "name": "rewardRate", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22701:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10204, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22701:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30", - "id": 10205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22729:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": false, - "id": 10208, - "name": "lastUpdateTime", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22736:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10207, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22736:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10210, - "name": "rewardPerTokenStored", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22771:35:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22771:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10214, - "name": "userRewardPerTokenPaid", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22812:57:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 10213, - "keyType": { - "id": 10211, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22820:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22812:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 10212, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22831:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10218, - "name": "rewards", - "nodeType": "VariableDeclaration", - "scope": 10604, - "src": "22875:42:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 10217, - "keyType": { - "id": 10215, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22883:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "22875:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 10216, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22894:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 10222, - "name": "RewardAdded", - "nodeType": "EventDefinition", - "parameters": { - "id": 10221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10220, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10222, - "src": "22942:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10219, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22942:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22941:16:8" - }, - "src": "22924:34:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 10228, - "name": "Staked", - "nodeType": "EventDefinition", - "parameters": { - "id": 10227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10224, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 10228, - "src": "22976:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10223, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "22976:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10226, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10228, - "src": "22998:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10225, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "22998:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22975:38:8" - }, - "src": "22963:51:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 10234, - "name": "Withdrawn", - "nodeType": "EventDefinition", - "parameters": { - "id": 10233, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10230, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 10234, - "src": "23035:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10229, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23035:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10232, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10234, - "src": "23057:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10231, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23057:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23034:38:8" - }, - "src": "23019:54:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 10240, - "name": "RewardPaid", - "nodeType": "EventDefinition", - "parameters": { - "id": 10239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10236, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 10240, - "src": "23095:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10235, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23095:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 10238, - "indexed": false, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10240, - "src": "23117:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23117:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23094:38:8" - }, - "src": "23078:55:8" - }, - { - "body": { - "id": 10251, - "nodeType": "Block", - "src": "23160:77:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10243, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23178:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23178:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10245, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "23197:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23178:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6e6f74207374617274", - "id": 10247, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23207:11:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - }, - "value": "not start" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_05a61bf4ad0a2ecc872598ad9bcae2317a8f7dc93c1273ab3bb8547e34d56975", - "typeString": "literal_string \"not start\"" - } - ], - "id": 10242, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "23170:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23170:49:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10249, - "nodeType": "ExpressionStatement", - "src": "23170:49:8" - }, - { - "id": 10250, - "nodeType": "PlaceholderStatement", - "src": "23229:1:8" - } - ] - }, - "documentation": null, - "id": 10252, - "name": "checkStart", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 10241, - "nodeType": "ParameterList", - "parameters": [], - "src": "23158:2:8" - }, - "src": "23139:98:8", - "visibility": "internal" - }, - { - "body": { - "id": 10288, - "nodeType": "Block", - "src": "23282:283:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10256, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23292:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10257, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10335, - "src": "23315:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23315:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23292:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10260, - "nodeType": "ExpressionStatement", - "src": "23292:39:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10261, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "23341:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10262, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10302, - "src": "23358:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23358:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23341:43:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10265, - "nodeType": "ExpressionStatement", - "src": "23341:43:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 10270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10266, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23398:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 10268, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23417:1:8", - "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": 10267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "23409:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23409:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "23398:21:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10286, - "nodeType": "IfStatement", - "src": "23394:154:8", - "trueBody": { - "id": 10285, - "nodeType": "Block", - "src": "23421:127:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10271, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10218, - "src": "23435:7:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10273, - "indexExpression": { - "argumentTypes": null, - "id": 10272, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23443:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23435:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10275, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23461:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10274, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10364, - "src": "23454:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23454:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23435:34:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10278, - "nodeType": "ExpressionStatement", - "src": "23435:34:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10279, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10214, - "src": "23483:22:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10281, - "indexExpression": { - "argumentTypes": null, - "id": 10280, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10254, - "src": "23506:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "23483:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10282, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23517:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23483:54:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10284, - "nodeType": "ExpressionStatement", - "src": "23483:54:8" - } - ] - } - }, - { - "id": 10287, - "nodeType": "PlaceholderStatement", - "src": "23557:1:8" - } - ] - }, - "documentation": null, - "id": 10289, - "name": "updateReward", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 10255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10254, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 10289, - "src": "23265:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10253, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "23265:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23264:17:8" - }, - "src": "23243:322:8", - "visibility": "internal" - }, - { - "body": { - "id": 10301, - "nodeType": "Block", - "src": "23637:63:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10296, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "23663:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23663:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 10298, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "23680:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10294, - "name": "Math", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9352, - "src": "23654:4:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Math_$9352_$", - "typeString": "type(library Math)" - } - }, - "id": 10295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "min", - "nodeType": "MemberAccess", - "referencedDeclaration": 9319, - "src": "23654:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 10299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23654:39:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10293, - "id": 10300, - "nodeType": "Return", - "src": "23647:46:8" - } - ] - }, - "documentation": null, - "id": 10302, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lastTimeRewardApplicable", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10290, - "nodeType": "ParameterList", - "parameters": [], - "src": "23604:2:8" - }, - "returnParameters": { - "id": 10293, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10292, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10302, - "src": "23628:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10291, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23628:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23627:9:8" - }, - "scope": 10604, - "src": "23571:129:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10334, - "nodeType": "Block", - "src": "23762:352:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10307, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10101, - "src": "23776:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23776:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10309, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23793:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "23776:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10314, - "nodeType": "IfStatement", - "src": "23772:76:8", - "trueBody": { - "id": 10313, - "nodeType": "Block", - "src": "23796:52:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10311, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23817:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10306, - "id": 10312, - "nodeType": "Return", - "src": "23810:27:8" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10329, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10101, - "src": "24079:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24079:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 10326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24048:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10323, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "24011:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10320, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "23970:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10317, - "name": "lastTimeRewardApplicable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10302, - "src": "23918:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "23918:51:8", - "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": 10321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:67:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "23918:92:8", - "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": 10324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:104:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "23918:129:8", - "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": 10327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:135:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "23918:160:8", - "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": 10331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23918:175:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10315, - "name": "rewardPerTokenStored", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10210, - "src": "23876:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "23876:24:8", - "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": 10332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23876:231:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10306, - "id": 10333, - "nodeType": "Return", - "src": "23857:250:8" - } - ] - }, - "documentation": null, - "id": 10335, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "rewardPerToken", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10303, - "nodeType": "ParameterList", - "parameters": [], - "src": "23729:2:8" - }, - "returnParameters": { - "id": 10306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10305, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10335, - "src": "23753:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10304, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "23753:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "23752:9:8" - }, - "scope": 10604, - "src": "23706:408:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10363, - "nodeType": "Block", - "src": "24183:196:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10358, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10218, - "src": "24355:7:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10360, - "indexExpression": { - "argumentTypes": null, - "id": 10359, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10337, - "src": "24363:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24355:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31653138", - "id": 10355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24328:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "value": "1e18" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10349, - "name": "userRewardPerTokenPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10214, - "src": "24273:22:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10351, - "indexExpression": { - "argumentTypes": null, - "id": 10350, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10337, - "src": "24296:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24273:31:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10346, - "name": "rewardPerToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10335, - "src": "24252:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 10347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24252:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "24252:20:8", - "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": 10352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24252:53:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10343, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10337, - "src": "24222:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10342, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10113, - "src": "24212:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "24212:39:8", - "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": 10353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:94:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "24212:115:8", - "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": 10356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:121:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "24212:142:8", - "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": 10361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24212:160:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10341, - "id": 10362, - "nodeType": "Return", - "src": "24193:179:8" - } - ] - }, - "documentation": null, - "id": 10364, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "earned", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10338, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10337, - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 10364, - "src": "24136:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10336, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "24136:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24135:17:8" - }, - "returnParameters": { - "id": 10341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10340, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 10364, - "src": "24174:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10339, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24174:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24173:9:8" - }, - "scope": 10604, - "src": "24120:259:8", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10394, - "nodeType": "Block", - "src": "24541:124:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10376, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10366, - "src": "24559:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24568:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24559:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74207374616b652030", - "id": 10379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24571:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - }, - "value": "Cannot stake 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", - "typeString": "literal_string \"Cannot stake 0\"" - } - ], - "id": 10375, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24551:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24551:37:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10381, - "nodeType": "ExpressionStatement", - "src": "24551:37:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10385, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10366, - "src": "24610:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10382, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19434, - "src": "24598:5:8", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMYFIPool_$10604", - "typeString": "contract super YAMYFIPool" - } - }, - "id": 10384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "stake", - "nodeType": "MemberAccess", - "referencedDeclaration": 10150, - "src": "24598:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24598:19:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10387, - "nodeType": "ExpressionStatement", - "src": "24598:19:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10389, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24639:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24639:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10391, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10366, - "src": "24651:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10388, - "name": "Staked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10228, - "src": "24632:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 10392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24632:26:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10393, - "nodeType": "EmitStatement", - "src": "24627:31:8" - } - ] - }, - "documentation": null, - "id": 10395, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10369, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24518:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24518:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10371, - "modifierName": { - "argumentTypes": null, - "id": 10368, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "24505:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24505:24:8" - }, - { - "arguments": null, - "id": 10373, - "modifierName": { - "argumentTypes": null, - "id": 10372, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10252, - "src": "24530:10:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24530:10:8" - } - ], - "name": "stake", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10367, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10366, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10395, - "src": "24482:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24482:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24481:16:8" - }, - "returnParameters": { - "id": 10374, - "nodeType": "ParameterList", - "parameters": [], - "src": "24541:0:8" - }, - "scope": 10604, - "src": "24467:198:8", - "stateMutability": "nonpayable", - "superFunction": 10150, - "visibility": "public" - }, - { - "body": { - "id": 10425, - "nodeType": "Block", - "src": "24748:133:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10407, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10397, - "src": "24766:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24775:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24766:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f742077697468647261772030", - "id": 10410, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24778:19:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - }, - "value": "Cannot withdraw 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", - "typeString": "literal_string \"Cannot withdraw 0\"" - } - ], - "id": 10406, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 19246, - 19247 - ], - "referencedDeclaration": 19247, - "src": "24758:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 10411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24758:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10412, - "nodeType": "ExpressionStatement", - "src": "24758:40:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10416, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10397, - "src": "24823:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10413, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19434, - "src": "24808:5:8", - "typeDescriptions": { - "typeIdentifier": "t_super$_YAMYFIPool_$10604", - "typeString": "contract super YAMYFIPool" - } - }, - "id": 10415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "withdraw", - "nodeType": "MemberAccess", - "referencedDeclaration": 10184, - "src": "24808:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24808:22:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10418, - "nodeType": "ExpressionStatement", - "src": "24808:22:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10420, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24855:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24855:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10422, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10397, - "src": "24867:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10419, - "name": "Withdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10234, - "src": "24845:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 10423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24845:29:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10424, - "nodeType": "EmitStatement", - "src": "24840:34:8" - } - ] - }, - "documentation": null, - "id": 10426, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10400, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24725:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24725:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10402, - "modifierName": { - "argumentTypes": null, - "id": 10399, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "24712:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "24712:24:8" - }, - { - "arguments": null, - "id": 10404, - "modifierName": { - "argumentTypes": null, - "id": 10403, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10252, - "src": "24737:10:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "24737:10:8" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10398, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10397, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 10426, - "src": "24689:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "24689:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "24688:16:8" - }, - "returnParameters": { - "id": 10405, - "nodeType": "ParameterList", - "parameters": [], - "src": "24748:0:8" - }, - "scope": 10604, - "src": "24671:210:8", - "stateMutability": "nonpayable", - "superFunction": 10184, - "visibility": "public" - }, - { - "body": { - "id": 10439, - "nodeType": "Block", - "src": "24912:69:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10431, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "24941:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "24941:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10430, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10113, - "src": "24931:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24931:21:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10429, - "name": "withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 10426 - ], - "referencedDeclaration": 10426, - "src": "24922:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24922:31:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10435, - "nodeType": "ExpressionStatement", - "src": "24922:31:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 10436, - "name": "getReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10505, - "src": "24963:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 10437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24963:11:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10438, - "nodeType": "ExpressionStatement", - "src": "24963:11:8" - } - ] - }, - "documentation": null, - "id": 10440, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10427, - "nodeType": "ParameterList", - "parameters": [], - "src": "24900:2:8" - }, - "returnParameters": { - "id": 10428, - "nodeType": "ParameterList", - "parameters": [], - "src": "24912:0:8" - }, - "scope": 10604, - "src": "24887:94:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 10504, - "nodeType": "Block", - "src": "25051:379:8", - "statements": [ - { - "assignments": [ - 10450 - ], - "declarations": [ - { - "constant": false, - "id": 10450, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10504, - "src": "25061:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10449, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25061:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10455, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10452, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25085:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25085:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 10451, - "name": "earned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10364, - "src": "25078:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 10454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25078:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25061:35:8" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 10456, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10450, - "src": "25110:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 10457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25119:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25110:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 10503, - "nodeType": "IfStatement", - "src": "25106:318:8", - "trueBody": { - "id": 10502, - "nodeType": "Block", - "src": "25122:302:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 10459, - "name": "rewards", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10218, - "src": "25136:7:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 10462, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10460, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25144:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25144:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "25136:19:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 10463, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25158:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "25136:23:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10465, - "nodeType": "ExpressionStatement", - "src": "25136:23:8" - }, - { - "assignments": [ - 10467 - ], - "declarations": [ - { - "constant": false, - "id": 10467, - "name": "scalingFactor", - "nodeType": "VariableDeclaration", - "scope": 10502, - "src": "25173:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10466, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25173:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10475, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10470, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10194, - "src": "25209:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - ], - "id": 10469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25201:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25201:12:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 10468, - "name": "YAM", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10076, - "src": "25197:3:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_YAM_$10076_$", - "typeString": "type(contract YAM)" - } - }, - "id": 10472, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25197:17:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_YAM_$10076", - "typeString": "contract YAM" - } - }, - "id": 10473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "yamsScalingFactor", - "nodeType": "MemberAccess", - "referencedDeclaration": 10075, - "src": "25197:35:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", - "typeString": "function () external returns (uint256)" - } - }, - "id": 10474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25197:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25173:61:8" - }, - { - "assignments": [ - 10477 - ], - "declarations": [ - { - "constant": false, - "id": 10477, - "name": "trueReward", - "nodeType": "VariableDeclaration", - "scope": 10502, - "src": "25248:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25248:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10487, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - }, - "id": 10485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 10483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25299:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3138", - "id": 10484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25303:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "src": "25299:6:8", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1000000000000000000_by_1", - "typeString": "int_const 1000000000000000000" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10480, - "name": "scalingFactor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10467, - "src": "25280:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10478, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10450, - "src": "25269:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "25269:10:8", - "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": 10481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25269:25:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "25269:29:8", - "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": 10486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25269:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25248:58:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10491, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25337:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25337:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10493, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10477, - "src": "25349:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10488, - "name": "yam", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10194, - "src": "25320:3:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$9744", - "typeString": "contract IERC20" - } - }, - "id": 10490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9847, - "src": "25320:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$9744_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$9744_$", - "typeString": "function (contract IERC20,address,uint256)" - } - }, - "id": 10494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25320:40:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10495, - "nodeType": "ExpressionStatement", - "src": "25320:40:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10497, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25390:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25390:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 10499, - "name": "trueReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10477, - "src": "25402:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10496, - "name": "RewardPaid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10240, - "src": "25379:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 10500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25379:34:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10501, - "nodeType": "EmitStatement", - "src": "25374:39:8" - } - ] - } - } - ] - }, - "documentation": null, - "id": 10505, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10443, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19243, - "src": "25028:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 10444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25028:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10445, - "modifierName": { - "argumentTypes": null, - "id": 10442, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "25015:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25015:24:8" - }, - { - "arguments": null, - "id": 10447, - "modifierName": { - "argumentTypes": null, - "id": 10446, - "name": "checkStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10252, - "src": "25040:10:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25040:10:8" - } - ], - "name": "getReward", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10441, - "nodeType": "ParameterList", - "parameters": [], - "src": "25005:2:8" - }, - "returnParameters": { - "id": 10448, - "nodeType": "ParameterList", - "parameters": [], - "src": "25051:0:8" - }, - "scope": 10604, - "src": "24987:443:8", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 10602, - "nodeType": "Block", - "src": "25565:703:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10517, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25579:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25579:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 10519, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "25597:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25579:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 10600, - "nodeType": "Block", - "src": "26082:180:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10578, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "26094:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10581, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "26118:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10579, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "26107:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "26107:10:8", - "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": 10582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26107:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26094:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10584, - "nodeType": "ExpressionStatement", - "src": "26094:33:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10585, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "26139:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 10586, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "26156:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26139:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10588, - "nodeType": "ExpressionStatement", - "src": "26139:26:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10589, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "26177:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10592, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "26206:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10590, - "name": "starttime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10200, - "src": "26192:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "26192:13:8", - "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": 10593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26192:23:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "26177:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10595, - "nodeType": "ExpressionStatement", - "src": "26177:38:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10597, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "26244:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10596, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10222, - "src": "26232:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26232:19:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10599, - "nodeType": "EmitStatement", - "src": "26227:24:8" - } - ] - }, - "id": 10601, - "nodeType": "IfStatement", - "src": "25575:687:8", - "trueBody": { - "id": 10577, - "nodeType": "Block", - "src": "25608:468:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 10524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10521, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25624:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25624:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 10523, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "25643:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25624:31:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 10558, - "nodeType": "Block", - "src": "25725:205:8", - "statements": [ - { - "assignments": [ - 10534 - ], - "declarations": [ - { - "constant": false, - "id": 10534, - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 10558, - "src": "25741:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10533, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25741:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10540, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10537, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25778:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25778:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10535, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "25761:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 9394, - "src": "25761:16:8", - "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": 10539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25761:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25741:53:8" - }, - { - "assignments": [ - 10542 - ], - "declarations": [ - { - "constant": false, - "id": 10542, - "name": "leftover", - "nodeType": "VariableDeclaration", - "scope": 10558, - "src": "25810:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10541, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25810:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 10547, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10545, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "25843:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10543, - "name": "remaining", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10534, - "src": "25829:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mul", - "nodeType": "MemberAccess", - "referencedDeclaration": 9455, - "src": "25829:13:8", - "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": 10546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25829:25:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "25810:44:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10548, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "25870:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10554, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "25908:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10551, - "name": "leftover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10542, - "src": "25894:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10549, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "25883:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "25883:10:8", - "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": 10552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25883:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "25883:24:8", - "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": 10555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25883:34:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25870:47:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10557, - "nodeType": "ExpressionStatement", - "src": "25870:47:8" - } - ] - }, - "id": 10559, - "nodeType": "IfStatement", - "src": "25620:310:8", - "trueBody": { - "id": 10532, - "nodeType": "Block", - "src": "25657:62:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 10530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10525, - "name": "rewardRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10206, - "src": "25673:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10528, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "25697:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 10526, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "25686:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 9471, - "src": "25686:10:8", - "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": 10529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25686:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25673:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10531, - "nodeType": "ExpressionStatement", - "src": "25673:33:8" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 10563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10560, - "name": "lastUpdateTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10208, - "src": "25941:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10561, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "25958:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "25958:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25941:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10564, - "nodeType": "ExpressionStatement", - "src": "25941:32:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 10571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 10565, - "name": "periodFinish", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10203, - "src": "25985:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10569, - "name": "DURATION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10197, - "src": "26020:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 10566, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19233, - "src": "26000:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 10567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26000:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 9378, - "src": "26000:19:8", - "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": 10570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26000:29:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "25985:44:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 10572, - "nodeType": "ExpressionStatement", - "src": "25985:44:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 10574, - "name": "reward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10507, - "src": "26058:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 10573, - "name": "RewardAdded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10222, - "src": "26046:11:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 10575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26046:19:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 10576, - "nodeType": "EmitStatement", - "src": "26041:24:8" - } - ] - } - } - ] - }, - "documentation": null, - "id": 10603, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 10510, - "modifierName": { - "argumentTypes": null, - "id": 10509, - "name": "onlyRewardDistribution", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10056, - "src": "25505:22:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "25505:22:8" - }, - { - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 10513, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25557:1:8", - "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": 10512, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "25549:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 10514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25549:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "id": 10515, - "modifierName": { - "argumentTypes": null, - "id": 10511, - "name": "updateReward", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10289, - "src": "25536:12:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "25536:24:8" - } - ], - "name": "notifyRewardAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 10508, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10507, - "name": "reward", - "nodeType": "VariableDeclaration", - "scope": 10603, - "src": "25464:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10506, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "25464:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "25463:16:8" - }, - "returnParameters": { - "id": 10516, - "nodeType": "ParameterList", - "parameters": [], - "src": "25565:0:8" - }, - "scope": 10604, - "src": "25436:832:8", - "stateMutability": "nonpayable", - "superFunction": 10044, - "visibility": "external" - } - ], - "scope": 10605, - "src": "22370:3900:8" - } - ], - "src": "1490:24781:8" - }, - "compiler": { - "name": "solc", - "version": "0.5.17+commit.d19bba13.Linux.g++" - }, - "networks": { - "1001": { - "events": { - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event", - "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" - }, - "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardAdded", - "type": "event", - "signature": "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d" - }, - "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reward", - "type": "uint256" - } - ], - "name": "RewardPaid", - "type": "event", - "signature": "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486" - }, - "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event", - "signature": "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d" - }, - "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event", - "signature": "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5" - } - }, - "links": {}, - "address": "0xeb93eB72947C74a251e90B3cd609A97543a134Ee", - "transactionHash": "0x95487d566fe819db76ca5a23e7752fc14fdaa103cf4236605222d949a300ab4c" - } - }, - "schemaVersion": "3.0.16", - "updatedAt": "2020-08-10T03:31:59.593Z", - "devdoc": { - "methods": { - "isOwner()": { - "details": "Returns true if the caller is the current owner." - }, - "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." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/clean_build/contracts/Address.json b/clean_build/contracts/Address.json deleted file mode 100644 index b8257c3..0000000 --- a/clean_build/contracts/Address.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/Babylonian.json b/clean_build/contracts/Babylonian.json deleted file mode 100644 index b8257c3..0000000 --- a/clean_build/contracts/Babylonian.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/Context.json b/clean_build/contracts/Context.json deleted file mode 100644 index d19515b..0000000 --- a/clean_build/contracts/Context.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/FixedPoint.json b/clean_build/contracts/FixedPoint.json deleted file mode 100644 index b8257c3..0000000 --- a/clean_build/contracts/FixedPoint.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/GovernorAlpha.json b/clean_build/contracts/GovernorAlpha.json deleted file mode 100644 index 9552004..0000000 --- a/clean_build/contracts/GovernorAlpha.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [{"internalType": "address", "name": "timelock_", "type": "address"}, {"internalType": "address", "name": "yam_", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "id", "type": "uint256"}], "name": "ProposalCanceled", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "id", "type": "uint256"}, {"indexed": false, "internalType": "address", "name": "proposer", "type": "address"}, {"indexed": false, "internalType": "address[]", "name": "targets", "type": "address[]"}, {"indexed": false, "internalType": "uint256[]", "name": "values", "type": "uint256[]"}, {"indexed": false, "internalType": "string[]", "name": "signatures", "type": "string[]"}, {"indexed": false, "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]"}, {"indexed": false, "internalType": "uint256", "name": "startBlock", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "endBlock", "type": "uint256"}, {"indexed": false, "internalType": "string", "name": "description", "type": "string"}], "name": "ProposalCreated", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "id", "type": "uint256"}], "name": "ProposalExecuted", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "id", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "ProposalQueued", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "voter", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "proposalId", "type": "uint256"}, {"indexed": false, "internalType": "bool", "name": "support", "type": "bool"}, {"indexed": false, "internalType": "uint256", "name": "votes", "type": "uint256"}], "name": "VoteCast", "type": "event"}, {"constant": true, "inputs": [], "name": "BALLOT_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "guardian", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "latestProposalIds", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "proposalCount", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "name": "proposals", "outputs": [{"internalType": "uint256", "name": "id", "type": "uint256"}, {"internalType": "address", "name": "proposer", "type": "address"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}, {"internalType": "uint256", "name": "startBlock", "type": "uint256"}, {"internalType": "uint256", "name": "endBlock", "type": "uint256"}, {"internalType": "uint256", "name": "forVotes", "type": "uint256"}, {"internalType": "uint256", "name": "againstVotes", "type": "uint256"}, {"internalType": "bool", "name": "canceled", "type": "bool"}, {"internalType": "bool", "name": "executed", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "timelock", "outputs": [{"internalType": "contract TimelockInterface", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract YAMInterface", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "quorumVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "proposalThreshold", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "proposalMaxOperations", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "votingDelay", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "votingPeriod", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address[]", "name": "targets", "type": "address[]"}, {"internalType": "uint256[]", "name": "values", "type": "uint256[]"}, {"internalType": "string[]", "name": "signatures", "type": "string[]"}, {"internalType": "bytes[]", "name": "calldatas", "type": "bytes[]"}, {"internalType": "string", "name": "description", "type": "string"}], "name": "propose", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}], "name": "queue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}], "name": "execute", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}], "name": "cancel", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}], "name": "getActions", "outputs": [{"internalType": "address[]", "name": "targets", "type": "address[]"}, {"internalType": "uint256[]", "name": "values", "type": "uint256[]"}, {"internalType": "string[]", "name": "signatures", "type": "string[]"}, {"internalType": "bytes[]", "name": "calldatas", "type": "bytes[]"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}, {"internalType": "address", "name": "voter", "type": "address"}], "name": "getReceipt", "outputs": [{"components": [{"internalType": "bool", "name": "hasVoted", "type": "bool"}, {"internalType": "bool", "name": "support", "type": "bool"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "internalType": "struct GovernorAlpha.Receipt", "name": "", "type": "tuple"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}], "name": "state", "outputs": [{"internalType": "enum GovernorAlpha.ProposalState", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}, {"internalType": "bool", "name": "support", "type": "bool"}], "name": "castVote", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}, {"internalType": "bool", "name": "support", "type": "bool"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "castVoteBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "__acceptAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "__abdicate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newPendingAdmin", "type": "address"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "__queueSetTimelockPendingAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newPendingAdmin", "type": "address"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "__executeSetTimelockPendingAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x6abA376e3331E3090456495e8292ecdFA1ab4920", "transactionHash": "0x011000c3e667ea157b2945fa0d04bc33f97e52f659a33c3b8626fa881f96533c"}, "1001": {"links": [{}], "address": "0x6abA376e3331E3090456495e8292ecdFA1ab4920", "transactionHash": "0x05034105df926c2286b44e2fda7696778eb9047db95f173671e19fafeadca1c2"}}} \ No newline at end of file diff --git a/clean_build/contracts/IERC20.json b/clean_build/contracts/IERC20.json deleted file mode 100644 index 28f61cd..0000000 --- a/clean_build/contracts/IERC20.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "recipient", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "sender", "type": "address"}, {"internalType": "address", "name": "recipient", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/IRewardDistributionRecipient.json b/clean_build/contracts/IRewardDistributionRecipient.json deleted file mode 100644 index e8588e7..0000000 --- a/clean_build/contracts/IRewardDistributionRecipient.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "previousOwner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/LPTokenWrapper.json b/clean_build/contracts/LPTokenWrapper.json deleted file mode 100644 index 316c3c0..0000000 --- a/clean_build/contracts/LPTokenWrapper.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"constant": true, "inputs": [], "name": "uni_lp", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/Math.json b/clean_build/contracts/Math.json deleted file mode 100644 index b8257c3..0000000 --- a/clean_build/contracts/Math.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/Migrations.json b/clean_build/contracts/Migrations.json deleted file mode 100644 index 9a1de2b..0000000 --- a/clean_build/contracts/Migrations.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"constant": true, "inputs": [], "name": "last_completed_migration", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "completed", "type": "uint256"}], "name": "setCompleted", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x327ab530B53e78B55068609028c55Ab843FfdDc7", "transactionHash": "0x6f621f6d34b73165847cda0213f08349a89da2b55e81b028f6ed28e39e3927e8"}, "1001": {"links": [{}], "address": "0x327ab530B53e78B55068609028c55Ab843FfdDc7", "transactionHash": "0x5abb855fc5bc355213ca245e6f9a201b0970f88389fdd063d623b75a90b4fb12"}}} \ No newline at end of file diff --git a/clean_build/contracts/Ownable.json b/clean_build/contracts/Ownable.json deleted file mode 100644 index eb4b2f9..0000000 --- a/clean_build/contracts/Ownable.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [], "payable": false, "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"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/Rebaser.json b/clean_build/contracts/Rebaser.json deleted file mode 100644 index 392cb8f..0000000 --- a/clean_build/contracts/Rebaser.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [{"internalType": "address", "name": "yamAddress_", "type": "address"}, {"internalType": "address", "name": "reserveToken_", "type": "address"}, {"internalType": "address", "name": "uniswap_factory", "type": "address"}, {"internalType": "address", "name": "reservesContract_", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "oldDeviationThreshold", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newDeviationThreshold", "type": "uint256"}], "name": "NewDeviationThreshold", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "oldSlippageFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newSlippageFactor", "type": "uint256"}], "name": "NewMaxSlippageFactor", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "oldRebaseMintPerc", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newRebaseMintPerc", "type": "uint256"}], "name": "NewRebaseMintPercent", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldReserveContract", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newReserveContract", "type": "address"}], "name": "NewReserveContract", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "destination", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "index", "type": "uint256"}, {"indexed": false, "internalType": "bytes", "name": "data", "type": "bytes"}], "name": "TransactionFailed", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "reservesAdded", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "yamsSold", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "yamsFromReserves", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "yamsToReserves", "type": "uint256"}], "name": "TreasuryIncreased", "type": "event"}, {"constant": true, "inputs": [], "name": "deviationThreshold", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "epoch", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken0", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastRebaseTimestampSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "maxSlippageFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minRebaseTimeIntervalSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "priceCumulativeLast", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseDelay", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseLag", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseMintPerc", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseWindowLengthSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseWindowOffsetSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebasingActive", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "reserveToken", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "reservesContract", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "targetRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "timeOfTWAPInit", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "name": "transactions", "outputs": [{"internalType": "bool", "name": "enabled", "type": "bool"}, {"internalType": "address", "name": "destination", "type": "address"}, {"internalType": "bytes", "name": "data", "type": "bytes"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "uniswap_pair", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamAddress", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "maxSlippageFactor_", "type": "uint256"}], "name": "setMaxSlippageFactor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "rebaseMintPerc_", "type": "uint256"}], "name": "setRebaseMintPerc", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "reservesContract_", "type": "address"}], "name": "setReserveContract", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "init_twap", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "activate_rebasing", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "rebase", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "sender", "type": "address"}, {"internalType": "uint256", "name": "amount0", "type": "uint256"}, {"internalType": "uint256", "name": "amount1", "type": "uint256"}, {"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "uniswapV2Call", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "deviationThreshold_", "type": "uint256"}], "name": "setDeviationThreshold", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "rebaseLag_", "type": "uint256"}], "name": "setRebaseLag", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "targetRate_", "type": "uint256"}], "name": "setTargetRate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "minRebaseTimeIntervalSec_", "type": "uint256"}, {"internalType": "uint256", "name": "rebaseWindowOffsetSec_", "type": "uint256"}, {"internalType": "uint256", "name": "rebaseWindowLengthSec_", "type": "uint256"}], "name": "setRebaseTimingParameters", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "inRebaseWindow", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "destination", "type": "address"}, {"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "addTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}], "name": "removeTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "bool", "name": "enabled", "type": "bool"}], "name": "setTransactionEnabled", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/SafeERC20.json b/clean_build/contracts/SafeERC20.json deleted file mode 100644 index b8257c3..0000000 --- a/clean_build/contracts/SafeERC20.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/SafeMath.json b/clean_build/contracts/SafeMath.json deleted file mode 100644 index b8257c3..0000000 --- a/clean_build/contracts/SafeMath.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/Timelock.json b/clean_build/contracts/Timelock.json deleted file mode 100644 index 3fd75aa..0000000 --- a/clean_build/contracts/Timelock.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "bytes32", "name": "txHash", "type": "bytes32"}, {"indexed": true, "internalType": "address", "name": "target", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}, {"indexed": false, "internalType": "string", "name": "signature", "type": "string"}, {"indexed": false, "internalType": "bytes", "name": "data", "type": "bytes"}, {"indexed": false, "internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "CancelTransaction", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "bytes32", "name": "txHash", "type": "bytes32"}, {"indexed": true, "internalType": "address", "name": "target", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}, {"indexed": false, "internalType": "string", "name": "signature", "type": "string"}, {"indexed": false, "internalType": "bytes", "name": "data", "type": "bytes"}, {"indexed": false, "internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "ExecuteTransaction", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "newAdmin", "type": "address"}], "name": "NewAdmin", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "uint256", "name": "newDelay", "type": "uint256"}], "name": "NewDelay", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "newPendingAdmin", "type": "address"}], "name": "NewPendingAdmin", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "bytes32", "name": "txHash", "type": "bytes32"}, {"indexed": true, "internalType": "address", "name": "target", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}, {"indexed": false, "internalType": "string", "name": "signature", "type": "string"}, {"indexed": false, "internalType": "bytes", "name": "data", "type": "bytes"}, {"indexed": false, "internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "QueueTransaction", "type": "event"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"constant": true, "inputs": [], "name": "GRACE_PERIOD", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MAXIMUM_DELAY", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "MINIMUM_DELAY", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "admin", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "admin_initialized", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "delay", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingAdmin", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "name": "queuedTransactions", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "delay_", "type": "uint256"}], "name": "setDelay", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "acceptAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingAdmin_", "type": "address"}], "name": "setPendingAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "target", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}, {"internalType": "string", "name": "signature", "type": "string"}, {"internalType": "bytes", "name": "data", "type": "bytes"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "queueTransaction", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "target", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}, {"internalType": "string", "name": "signature", "type": "string"}, {"internalType": "bytes", "name": "data", "type": "bytes"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "cancelTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "target", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}, {"internalType": "string", "name": "signature", "type": "string"}, {"internalType": "bytes", "name": "data", "type": "bytes"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "executeTransaction", "outputs": [{"internalType": "bytes", "name": "", "type": "bytes"}], "payable": true, "stateMutability": "payable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0xaE99fF8fe2236AF5083Ea979Ecf1DbAA0EFD07E3", "transactionHash": "0x4bcf49093099d0fa6ce6006e5d27977b3b93f92ab3bb6e70d1558258f304e41a"}, "1001": {"links": [{}], "address": "0xaE99fF8fe2236AF5083Ea979Ecf1DbAA0EFD07E3", "transactionHash": "0x901268e77cd1326892b2670935b286417436ccdeb907e23ece72f91c80ae24dc"}}} \ No newline at end of file diff --git a/clean_build/contracts/TimelockInterface.json b/clean_build/contracts/TimelockInterface.json deleted file mode 100644 index 7e1b706..0000000 --- a/clean_build/contracts/TimelockInterface.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"constant": true, "inputs": [], "name": "delay", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "GRACE_PERIOD", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "acceptAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "bytes32", "name": "hash", "type": "bytes32"}], "name": "queuedTransactions", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "target", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}, {"internalType": "string", "name": "signature", "type": "string"}, {"internalType": "bytes", "name": "data", "type": "bytes"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "queueTransaction", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "target", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}, {"internalType": "string", "name": "signature", "type": "string"}, {"internalType": "bytes", "name": "data", "type": "bytes"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "cancelTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "target", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}, {"internalType": "string", "name": "signature", "type": "string"}, {"internalType": "bytes", "name": "data", "type": "bytes"}, {"internalType": "uint256", "name": "eta", "type": "uint256"}], "name": "executeTransaction", "outputs": [{"internalType": "bytes", "name": "", "type": "bytes"}], "payable": true, "stateMutability": "payable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/UniswapPair.json b/clean_build/contracts/UniswapPair.json deleted file mode 100644 index e546582..0000000 --- a/clean_build/contracts/UniswapPair.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "sender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount0", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "amount1", "type": "uint256"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}], "name": "Burn", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "sender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount0", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "amount1", "type": "uint256"}], "name": "Mint", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "sender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount0In", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "amount1In", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "amount0Out", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "amount1Out", "type": "uint256"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}], "name": "Swap", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint112", "name": "reserve0", "type": "uint112"}, {"indexed": false, "internalType": "uint112", "name": "reserve1", "type": "uint112"}], "name": "Sync", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "from", "type": "address"}, {"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_SEPARATOR", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "PERMIT_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}, {"internalType": "uint256", "name": "deadline", "type": "uint256"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "permit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "MINIMUM_LIQUIDITY", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "pure", "type": "function"}, {"constant": true, "inputs": [], "name": "factory", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token0", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "token1", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "getReserves", "outputs": [{"internalType": "uint112", "name": "reserve0", "type": "uint112"}, {"internalType": "uint112", "name": "reserve1", "type": "uint112"}, {"internalType": "uint32", "name": "blockTimestampLast", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "price0CumulativeLast", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "price1CumulativeLast", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "kLast", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}], "name": "mint", "outputs": [{"internalType": "uint256", "name": "liquidity", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}], "name": "burn", "outputs": [{"internalType": "uint256", "name": "amount0", "type": "uint256"}, {"internalType": "uint256", "name": "amount1", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount0Out", "type": "uint256"}, {"internalType": "uint256", "name": "amount1Out", "type": "uint256"}, {"internalType": "address", "name": "to", "type": "address"}, {"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "swap", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}], "name": "skim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "sync", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "address", "name": "", "type": "address"}], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/UniswapV2OracleLibrary.json b/clean_build/contracts/UniswapV2OracleLibrary.json deleted file mode 100644 index b8257c3..0000000 --- a/clean_build/contracts/UniswapV2OracleLibrary.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAM.json b/clean_build/contracts/YAM.json deleted file mode 100644 index 279bcef..0000000 --- a/clean_build/contracts/YAM.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegator", "type": "address"}, {"indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address"}, {"indexed": true, "internalType": "address", "name": "toDelegate", "type": "address"}], "name": "DelegateChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegate", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256"}], "name": "DelegateVotesChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Mint", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldIncentivizer", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newIncentivizer", "type": "address"}], "name": "NewIncentivizer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "epoch", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "prevYamsScalingFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newYamsScalingFactor", "type": "uint256"}], "name": "Rebase", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"constant": true, "inputs": [], "name": "BASE", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "incentivizer_", "type": "address"}], "name": "_setIncentivizer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner_", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOfUnderlying", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint32", "name": "", "type": "uint32"}], "name": "checkpoints", "outputs": [{"internalType": "uint32", "name": "fromBlock", "type": "uint32"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "subtractedValue", "type": "uint256"}], "name": "decreaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}], "name": "delegate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}, {"internalType": "uint256", "name": "nonce", "type": "uint256"}, {"internalType": "uint256", "name": "expiry", "type": "uint256"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "delegator", "type": "address"}], "name": "delegates", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "getCurrentVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}, {"internalType": "uint256", "name": "blockNumber", "type": "uint256"}], "name": "getPriorVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "incentivizer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "addedValue", "type": "uint256"}], "name": "increaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "internalDecimals", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "maxScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "mint", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "numCheckpoints", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "epoch", "type": "uint256"}, {"internalType": "uint256", "name": "indexDelta", "type": "uint256"}, {"internalType": "bool", "name": "positive", "type": "bool"}], "name": "rebase", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "from", "type": "address"}, {"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "yamsScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "string", "name": "name_", "type": "string"}, {"internalType": "string", "name": "symbol_", "type": "string"}, {"internalType": "uint8", "name": "decimals_", "type": "uint8"}], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "string", "name": "name_", "type": "string"}, {"internalType": "string", "name": "symbol_", "type": "string"}, {"internalType": "uint8", "name": "decimals_", "type": "uint8"}, {"internalType": "address", "name": "initial_owner", "type": "address"}, {"internalType": "uint256", "name": "initSupply_", "type": "uint256"}], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMAMPLPool.json b/clean_build/contracts/YAMAMPLPool.json deleted file mode 100644 index da0f44f..0000000 --- a/clean_build/contracts/YAMAMPLPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "ampl_eth_uni_lp", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x9EbB67687FEE2d265D7b824714DF13622D90E663", "transactionHash": "0x3fb803c97abead93e176d3f9cdbf1d9c42a71fe03876b33fe0733b07dd6d6504"}, "1001": {"links": [{}], "address": "0xf20907be37b6818F5bbd633CC22Af27a903B371E", "transactionHash": "0x1f56f94094c4ba7e604e7bee9608d39d3886aece057fb53a4e447388c5cd63eb"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMCOMPPool.json b/clean_build/contracts/YAMCOMPPool.json deleted file mode 100644 index 14a275b..0000000 --- a/clean_build/contracts/YAMCOMPPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "comp", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x8538E5910c6F80419CD3170c26073Ff238048c9E", "transactionHash": "0x7adaffa1b6dd803e53df18c53df911c7c8caf37347d9f398439f082ff1d9c2be"}, "1001": {"links": [{}], "address": "0x9EbB67687FEE2d265D7b824714DF13622D90E663", "transactionHash": "0xc90fb00b39d4686a36902889c0492054ca27360efd35c24b0a2c472e34c4f7b9"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMDelegate.json b/clean_build/contracts/YAMDelegate.json deleted file mode 100644 index d9548ed..0000000 --- a/clean_build/contracts/YAMDelegate.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegator", "type": "address"}, {"indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address"}, {"indexed": true, "internalType": "address", "name": "toDelegate", "type": "address"}], "name": "DelegateChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegate", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256"}], "name": "DelegateVotesChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Mint", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldIncentivizer", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newIncentivizer", "type": "address"}], "name": "NewIncentivizer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "epoch", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "prevYamsScalingFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newYamsScalingFactor", "type": "uint256"}], "name": "Rebase", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"constant": true, "inputs": [], "name": "BASE", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "incentivizer_", "type": "address"}], "name": "_setIncentivizer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner_", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOfUnderlying", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint32", "name": "", "type": "uint32"}], "name": "checkpoints", "outputs": [{"internalType": "uint32", "name": "fromBlock", "type": "uint32"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "subtractedValue", "type": "uint256"}], "name": "decreaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}], "name": "delegate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}, {"internalType": "uint256", "name": "nonce", "type": "uint256"}, {"internalType": "uint256", "name": "expiry", "type": "uint256"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "delegator", "type": "address"}], "name": "delegates", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "getCurrentVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}, {"internalType": "uint256", "name": "blockNumber", "type": "uint256"}], "name": "getPriorVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "implementation", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "incentivizer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "addedValue", "type": "uint256"}], "name": "increaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "string", "name": "name_", "type": "string"}, {"internalType": "string", "name": "symbol_", "type": "string"}, {"internalType": "uint8", "name": "decimals_", "type": "uint8"}], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "string", "name": "name_", "type": "string"}, {"internalType": "string", "name": "symbol_", "type": "string"}, {"internalType": "uint8", "name": "decimals_", "type": "uint8"}, {"internalType": "address", "name": "initial_owner", "type": "address"}, {"internalType": "uint256", "name": "initSupply_", "type": "uint256"}], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "internalDecimals", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "maxScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "mint", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "numCheckpoints", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "epoch", "type": "uint256"}, {"internalType": "uint256", "name": "indexDelta", "type": "uint256"}, {"internalType": "bool", "name": "positive", "type": "bool"}], "name": "rebase", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "from", "type": "address"}, {"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "yamsScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "_becomeImplementation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_resignImplementation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0xa923aF6D05993495257a872ec69DBbf01501Eb0E", "transactionHash": "0x0d2001f0c685171fd41f54ed2a4f8b4d5bd5e189d4f84e867ad3eb4275f093ef"}, "1001": {"links": [{}], "address": "0xa923aF6D05993495257a872ec69DBbf01501Eb0E", "transactionHash": "0x9d00ef462bc1a92fbcd8f7ce66c482e761c6197c66228c35acd5b77004aa02d7"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMDelegateInterface.json b/clean_build/contracts/YAMDelegateInterface.json deleted file mode 100644 index bdabc09..0000000 --- a/clean_build/contracts/YAMDelegateInterface.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"constant": true, "inputs": [], "name": "implementation", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "_becomeImplementation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_resignImplementation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMDelegationStorage.json b/clean_build/contracts/YAMDelegationStorage.json deleted file mode 100644 index 2066333..0000000 --- a/clean_build/contracts/YAMDelegationStorage.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"constant": true, "inputs": [], "name": "implementation", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMDelegator.json b/clean_build/contracts/YAMDelegator.json deleted file mode 100644 index 5e4db08..0000000 --- a/clean_build/contracts/YAMDelegator.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [{"internalType": "string", "name": "name_", "type": "string"}, {"internalType": "string", "name": "symbol_", "type": "string"}, {"internalType": "uint8", "name": "decimals_", "type": "uint8"}, {"internalType": "uint256", "name": "initSupply_", "type": "uint256"}, {"internalType": "address", "name": "implementation_", "type": "address"}, {"internalType": "bytes", "name": "becomeImplementationData", "type": "bytes"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegator", "type": "address"}, {"indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address"}, {"indexed": true, "internalType": "address", "name": "toDelegate", "type": "address"}], "name": "DelegateChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegate", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256"}], "name": "DelegateVotesChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Mint", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldImplementation", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newImplementation", "type": "address"}], "name": "NewImplementation", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldIncentivizer", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newIncentivizer", "type": "address"}], "name": "NewIncentivizer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "epoch", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "prevYamsScalingFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newYamsScalingFactor", "type": "uint256"}], "name": "Rebase", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"constant": true, "inputs": [], "name": "BASE", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint32", "name": "", "type": "uint32"}], "name": "checkpoints", "outputs": [{"internalType": "uint32", "name": "fromBlock", "type": "uint32"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "implementation", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "incentivizer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "internalDecimals", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "numCheckpoints", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamsScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "implementation_", "type": "address"}, {"internalType": "bool", "name": "allowResign", "type": "bool"}, {"internalType": "bytes", "name": "becomeImplementationData", "type": "bytes"}], "name": "_setImplementation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "mintAmount", "type": "uint256"}], "name": "mint", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "dst", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "src", "type": "address"}, {"internalType": "address", "name": "dst", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "addedValue", "type": "uint256"}], "name": "increaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maxScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "epoch", "type": "uint256"}, {"internalType": "uint256", "name": "indexDelta", "type": "uint256"}, {"internalType": "bool", "name": "positive", "type": "bool"}], "name": "rebase", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "subtractedValue", "type": "uint256"}], "name": "decreaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "delegator", "type": "address"}], "name": "delegates", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner", "type": "address"}], "name": "balanceOfUnderlying", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "incentivizer_", "type": "address"}], "name": "_setIncentivizer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}, {"internalType": "uint256", "name": "blockNumber", "type": "uint256"}], "name": "getPriorVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}, {"internalType": "uint256", "name": "nonce", "type": "uint256"}, {"internalType": "uint256", "name": "expiry", "type": "uint256"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}], "name": "delegate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "getCurrentVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "delegateToImplementation", "outputs": [{"internalType": "bytes", "name": "", "type": "bytes"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "delegateToViewImplementation", "outputs": [{"internalType": "bytes", "name": "", "type": "bytes"}], "payable": false, "stateMutability": "view", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16", "transactionHash": "0x1b96008716c88a7bda17a1ba479af2725dc5ae81a590835402d081a74132e35c"}, "1001": {"links": [{}], "address": "0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16", "transactionHash": "0x8cad1f654081b9f8e4977f7dbdfd2a90bbdf4319d1d884ae54fcbb28202c4500"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMDelegatorInterface.json b/clean_build/contracts/YAMDelegatorInterface.json deleted file mode 100644 index 86aca4b..0000000 --- a/clean_build/contracts/YAMDelegatorInterface.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldImplementation", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newImplementation", "type": "address"}], "name": "NewImplementation", "type": "event"}, {"constant": true, "inputs": [], "name": "implementation", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "implementation_", "type": "address"}, {"internalType": "bool", "name": "allowResign", "type": "bool"}, {"internalType": "bytes", "name": "becomeImplementationData", "type": "bytes"}], "name": "_setImplementation", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMETHPool.json b/clean_build/contracts/YAMETHPool.json deleted file mode 100644 index ef0a144..0000000 --- a/clean_build/contracts/YAMETHPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "weth", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x587A07cE5c265A38Dd6d42def1566BA73eeb06F5", "transactionHash": "0xe821b2f8ca9a4a7667f3cec5aaac4de35066391cf959c630459697c2d62b8912"}, "1001": {"links": [{}], "address": "0xc78a54CBDe918a1e88F4300E1c73A6CAF03cb09B", "transactionHash": "0x75763562686f816cd0355b8637579e9cd8d828f57f9cfcf968946456d2e81f69"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMGovernanceStorage.json b/clean_build/contracts/YAMGovernanceStorage.json deleted file mode 100644 index cd1d62f..0000000 --- a/clean_build/contracts/YAMGovernanceStorage.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint32", "name": "", "type": "uint32"}], "name": "checkpoints", "outputs": [{"internalType": "uint32", "name": "fromBlock", "type": "uint32"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "numCheckpoints", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMGovernanceToken.json b/clean_build/contracts/YAMGovernanceToken.json deleted file mode 100644 index 216990f..0000000 --- a/clean_build/contracts/YAMGovernanceToken.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegator", "type": "address"}, {"indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address"}, {"indexed": true, "internalType": "address", "name": "toDelegate", "type": "address"}], "name": "DelegateChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegate", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256"}], "name": "DelegateVotesChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Mint", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldIncentivizer", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newIncentivizer", "type": "address"}], "name": "NewIncentivizer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "epoch", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "prevYamsScalingFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newYamsScalingFactor", "type": "uint256"}], "name": "Rebase", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"constant": true, "inputs": [], "name": "BASE", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "incentivizer_", "type": "address"}], "name": "_setIncentivizer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner_", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOfUnderlying", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint32", "name": "", "type": "uint32"}], "name": "checkpoints", "outputs": [{"internalType": "uint32", "name": "fromBlock", "type": "uint32"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "subtractedValue", "type": "uint256"}], "name": "decreaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "incentivizer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "addedValue", "type": "uint256"}], "name": "increaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "internalDecimals", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "maxScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "mint", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "numCheckpoints", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "epoch", "type": "uint256"}, {"internalType": "uint256", "name": "indexDelta", "type": "uint256"}, {"internalType": "bool", "name": "positive", "type": "bool"}], "name": "rebase", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "from", "type": "address"}, {"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "yamsScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "delegator", "type": "address"}], "name": "delegates", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}], "name": "delegate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}, {"internalType": "uint256", "name": "nonce", "type": "uint256"}, {"internalType": "uint256", "name": "expiry", "type": "uint256"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "getCurrentVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}, {"internalType": "uint256", "name": "blockNumber", "type": "uint256"}], "name": "getPriorVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMIncentives.json b/clean_build/contracts/YAMIncentives.json deleted file mode 100644 index 091fe2e..0000000 --- a/clean_build/contracts/YAMIncentives.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "initreward", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "uni_lp", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMIncentivizer.json b/clean_build/contracts/YAMIncentivizer.json deleted file mode 100644 index cdd0846..0000000 --- a/clean_build/contracts/YAMIncentivizer.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "initreward", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "uni_lp", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "contract IERC20", "name": "_token", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}, {"internalType": "address", "name": "to", "type": "address"}], "name": "governanceRecoverUnsupported", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0xADDBCd6A68BFeb6E312e82B30cE1EB4a54497F4c", "transactionHash": "0x1b4de14ac2088facb48d1a0faa6cb5ebfcd6a2bd156b090643b50ec19c2b9103"}, "1001": {"links": [{}], "address": "0x960F7f93F60F84E41F84Fcfa62c745Bb614bC99F", "transactionHash": "0x9b4c603919069d360afc6845eb5324d431d70f261f1eca1096fd27c35f1ca0ca"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMInterface.json b/clean_build/contracts/YAMInterface.json deleted file mode 100644 index 8e72df7..0000000 --- a/clean_build/contracts/YAMInterface.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}, {"internalType": "uint256", "name": "blockNumber", "type": "uint256"}], "name": "getPriorVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMLENDPool.json b/clean_build/contracts/YAMLENDPool.json deleted file mode 100644 index 48b0165..0000000 --- a/clean_build/contracts/YAMLENDPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lend", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x6009A344C7F993B16EBa2c673fefd2e07f9be5FD", "transactionHash": "0x12fbcdcee21b4f9f84660995576f0b4ba7243c907e6748055757e46aef9811f0"}, "1001": {"links": [{}], "address": "0x587A07cE5c265A38Dd6d42def1566BA73eeb06F5", "transactionHash": "0x16939f09342ad51901330d5938e48189a732ef8efb87ff2553cad02fe1ae6dd5"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMLINKPool.json b/clean_build/contracts/YAMLINKPool.json deleted file mode 100644 index de37091..0000000 --- a/clean_build/contracts/YAMLINKPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "link", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0xFDC28897A1E32B595f1f4f1D3aE0Df93B1eee452", "transactionHash": "0x8ebc5f410b9b2ea16c107131434154b1abf78c580c8dc364da006889309e6c02"}, "1001": {"links": [{}], "address": "0xf32f72AC09cB6C002d0954318BB548321FfD4E34", "transactionHash": "0x57156c7f4c9ad3e29e2139f74a69064bb5ade66af8f202981179ff096fc5d2cc"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMMKRPool.json b/clean_build/contracts/YAMMKRPool.json deleted file mode 100644 index ecfed9a..0000000 --- a/clean_build/contracts/YAMMKRPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "mkr", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0xcFe1E539AcB2D489a651cA011a6eB93d32f97E23", "transactionHash": "0xa509530fe862ba42bf84f4c05fb4231dd57b244771d9fb3a8687ec34d13ffbaa"}, "1001": {"links": [{}], "address": "0x9a0846911E2c6EDb06BEa20E6FEf9bBbf37e4119", "transactionHash": "0x566295fff11a52448b3ce0820dbefbd6b479d2e7b15e918a7572136a7cf61fec"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMRebaser.json b/clean_build/contracts/YAMRebaser.json deleted file mode 100644 index 8a3a3bd..0000000 --- a/clean_build/contracts/YAMRebaser.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [{"internalType": "address", "name": "yamAddress_", "type": "address"}, {"internalType": "address", "name": "reserveToken_", "type": "address"}, {"internalType": "address", "name": "uniswap_factory", "type": "address"}, {"internalType": "address", "name": "reservesContract_", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "oldDeviationThreshold", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newDeviationThreshold", "type": "uint256"}], "name": "NewDeviationThreshold", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "oldSlippageFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newSlippageFactor", "type": "uint256"}], "name": "NewMaxSlippageFactor", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "oldRebaseMintPerc", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newRebaseMintPerc", "type": "uint256"}], "name": "NewRebaseMintPercent", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldReserveContract", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newReserveContract", "type": "address"}], "name": "NewReserveContract", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "destination", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "index", "type": "uint256"}, {"indexed": false, "internalType": "bytes", "name": "data", "type": "bytes"}], "name": "TransactionFailed", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "reservesAdded", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "yamsSold", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "yamsFromReserves", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "yamsToReserves", "type": "uint256"}], "name": "TreasuryIncreased", "type": "event"}, {"constant": true, "inputs": [], "name": "blockTimestampLast", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "deviationThreshold", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "epoch", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isToken0", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastRebaseTimestampSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "maxSlippageFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "minRebaseTimeIntervalSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "priceCumulativeLast", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseDelay", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseLag", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseMintPerc", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseWindowLengthSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaseWindowOffsetSec", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebasingActive", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "reserveToken", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "reservesContract", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "targetRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "timeOfTWAPInit", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "name": "transactions", "outputs": [{"internalType": "bool", "name": "enabled", "type": "bool"}, {"internalType": "address", "name": "destination", "type": "address"}, {"internalType": "bytes", "name": "data", "type": "bytes"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "uniswap_pair", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamAddress", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "maxSlippageFactor_", "type": "uint256"}], "name": "setMaxSlippageFactor", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "rebaseMintPerc_", "type": "uint256"}], "name": "setRebaseMintPerc", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "reservesContract_", "type": "address"}], "name": "setReserveContract", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "init_twap", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "activate_rebasing", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "rebase", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "sender", "type": "address"}, {"internalType": "uint256", "name": "amount0", "type": "uint256"}, {"internalType": "uint256", "name": "amount1", "type": "uint256"}, {"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "uniswapV2Call", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getCurrentTWAP", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "deviationThreshold_", "type": "uint256"}], "name": "setDeviationThreshold", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "rebaseLag_", "type": "uint256"}], "name": "setRebaseLag", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "targetRate_", "type": "uint256"}], "name": "setTargetRate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "minRebaseTimeIntervalSec_", "type": "uint256"}, {"internalType": "uint256", "name": "rebaseWindowOffsetSec_", "type": "uint256"}, {"internalType": "uint256", "name": "rebaseWindowLengthSec_", "type": "uint256"}], "name": "setRebaseTimingParameters", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "inRebaseWindow", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "destination", "type": "address"}, {"internalType": "bytes", "name": "data", "type": "bytes"}], "name": "addTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}], "name": "removeTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "index", "type": "uint256"}, {"internalType": "bool", "name": "enabled", "type": "bool"}], "name": "setTransactionEnabled", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x649714BC2ffFcB1e65c689B49A10216d4960833D", "transactionHash": "0x1c8c59af83b8122b8c46e32e2b30c9cbccaae188cb686b530416b88ba2fcac06"}, "1001": {"links": [{}], "address": "0x649714BC2ffFcB1e65c689B49A10216d4960833D", "transactionHash": "0x9eb1405753518d0470904fc8fa8768f1845366ce909fbe9d51c94b97b62ae250"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMReserve.json b/clean_build/contracts/YAMReserve.json deleted file mode 100644 index d817ad9..0000000 --- a/clean_build/contracts/YAMReserve.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [{"internalType": "address", "name": "reserveToken_", "type": "address"}, {"internalType": "address", "name": "yamAddress_", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "reserveToken", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamAddress", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newReserve", "type": "address"}, {"internalType": "address[]", "name": "tokens", "type": "address[]"}], "name": "migrateReserves", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "reserves", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMReserves.json b/clean_build/contracts/YAMReserves.json deleted file mode 100644 index 229462b..0000000 --- a/clean_build/contracts/YAMReserves.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"inputs": [{"internalType": "address", "name": "reserveToken_", "type": "address"}, {"internalType": "address", "name": "yamAddress_", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "reserveToken", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamAddress", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newReserve", "type": "address"}, {"internalType": "address[]", "name": "tokens", "type": "address[]"}], "name": "migrateReserves", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "reserves", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0xC53195Bbad57105cc9a4DF752121AfD9C15FBd8f", "transactionHash": "0xa3dbd5e6c77ac936dc3e6b4565470c58a551d8b345dfe55e58d48e79fcd7baa3"}, "1001": {"links": [{}], "address": "0xC53195Bbad57105cc9a4DF752121AfD9C15FBd8f", "transactionHash": "0xd141f96d54a86c3bd63cfbed5728e4a81362dfaf173c949ed69b3d6a6d17a679"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMSNXPool.json b/clean_build/contracts/YAMSNXPool.json deleted file mode 100644 index 6d53871..0000000 --- a/clean_build/contracts/YAMSNXPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "snx", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0x6c3FC1FFDb14D92394f40eeC91D9Ce8B807f132D", "transactionHash": "0x710a688eee59aa30ed2aa012b6dcca2c341b7371798e20bf6655e0513f87401a"}, "1001": {"links": [{}], "address": "0xc5B6488c7D5BeD173B76Bd5DCA712f45fB9EaEaB", "transactionHash": "0x5cf5d551009ba0754de17dd412ce2c49edfd382c6a7068b56316ff6b04cc58bd"}}} \ No newline at end of file diff --git a/clean_build/contracts/YAMToken.json b/clean_build/contracts/YAMToken.json deleted file mode 100644 index dcb081f..0000000 --- a/clean_build/contracts/YAMToken.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegator", "type": "address"}, {"indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address"}, {"indexed": true, "internalType": "address", "name": "toDelegate", "type": "address"}], "name": "DelegateChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegate", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256"}], "name": "DelegateVotesChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Mint", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldIncentivizer", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newIncentivizer", "type": "address"}], "name": "NewIncentivizer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "epoch", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "prevYamsScalingFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newYamsScalingFactor", "type": "uint256"}], "name": "Rebase", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"constant": true, "inputs": [], "name": "BASE", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint32", "name": "", "type": "uint32"}], "name": "checkpoints", "outputs": [{"internalType": "uint32", "name": "fromBlock", "type": "uint32"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}], "name": "delegate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}, {"internalType": "uint256", "name": "nonce", "type": "uint256"}, {"internalType": "uint256", "name": "expiry", "type": "uint256"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "delegator", "type": "address"}], "name": "delegates", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "getCurrentVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}, {"internalType": "uint256", "name": "blockNumber", "type": "uint256"}], "name": "getPriorVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "incentivizer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "internalDecimals", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "numCheckpoints", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamsScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "string", "name": "name_", "type": "string"}, {"internalType": "string", "name": "symbol_", "type": "string"}, {"internalType": "uint8", "name": "decimals_", "type": "uint8"}], "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maxScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "mint", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "from", "type": "address"}, {"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOfUnderlying", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner_", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "addedValue", "type": "uint256"}], "name": "increaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "subtractedValue", "type": "uint256"}], "name": "decreaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "incentivizer_", "type": "address"}], "name": "_setIncentivizer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "epoch", "type": "uint256"}, {"internalType": "uint256", "name": "indexDelta", "type": "uint256"}, {"internalType": "bool", "name": "positive", "type": "bool"}], "name": "rebase", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMTokenInterface.json b/clean_build/contracts/YAMTokenInterface.json deleted file mode 100644 index b9f6106..0000000 --- a/clean_build/contracts/YAMTokenInterface.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "owner", "type": "address"}, {"indexed": true, "internalType": "address", "name": "spender", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Approval", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegator", "type": "address"}, {"indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address"}, {"indexed": true, "internalType": "address", "name": "toDelegate", "type": "address"}], "name": "DelegateChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "delegate", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256"}], "name": "DelegateVotesChanged", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Mint", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newGov", "type": "address"}], "name": "NewGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldIncentivizer", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newIncentivizer", "type": "address"}], "name": "NewIncentivizer", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldPendingGov", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newPendingGov", "type": "address"}], "name": "NewPendingGov", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "address", "name": "oldRebaser", "type": "address"}, {"indexed": false, "internalType": "address", "name": "newRebaser", "type": "address"}], "name": "NewRebaser", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": false, "internalType": "uint256", "name": "epoch", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "prevYamsScalingFactor", "type": "uint256"}, {"indexed": false, "internalType": "uint256", "name": "newYamsScalingFactor", "type": "uint256"}], "name": "Rebase", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "from", "type": "address"}, {"indexed": true, "internalType": "address", "name": "to", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Transfer", "type": "event"}, {"constant": true, "inputs": [], "name": "BASE", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}, {"internalType": "uint32", "name": "", "type": "uint32"}], "name": "checkpoints", "outputs": [{"internalType": "uint32", "name": "fromBlock", "type": "uint32"}, {"internalType": "uint256", "name": "votes", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "incentivizer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "internalDecimals", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "nonces", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "numCheckpoints", "outputs": [{"internalType": "uint32", "name": "", "type": "uint32"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamsScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transfer", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "from", "type": "address"}, {"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "transferFrom", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "who", "type": "address"}], "name": "balanceOfUnderlying", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "owner_", "type": "address"}, {"internalType": "address", "name": "spender", "type": "address"}], "name": "allowance", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "value", "type": "uint256"}], "name": "approve", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "addedValue", "type": "uint256"}], "name": "increaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "spender", "type": "address"}, {"internalType": "uint256", "name": "subtractedValue", "type": "uint256"}], "name": "decreaseAllowance", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "maxScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}, {"internalType": "uint256", "name": "blockNumber", "type": "uint256"}], "name": "getPriorVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}, {"internalType": "uint256", "name": "nonce", "type": "uint256"}, {"internalType": "uint256", "name": "expiry", "type": "uint256"}, {"internalType": "uint8", "name": "v", "type": "uint8"}, {"internalType": "bytes32", "name": "r", "type": "bytes32"}, {"internalType": "bytes32", "name": "s", "type": "bytes32"}], "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "delegatee", "type": "address"}], "name": "delegate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "delegator", "type": "address"}], "name": "delegates", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "getCurrentVotes", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "to", "type": "address"}, {"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "mint", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "epoch", "type": "uint256"}, {"internalType": "uint256", "name": "indexDelta", "type": "uint256"}, {"internalType": "bool", "name": "positive", "type": "bool"}], "name": "rebase", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "rebaser_", "type": "address"}], "name": "_setRebaser", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "incentivizer_", "type": "address"}], "name": "_setIncentivizer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "pendingGov_", "type": "address"}], "name": "_setPendingGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "_acceptGov", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMTokenStorage.json b/clean_build/contracts/YAMTokenStorage.json deleted file mode 100644 index 5f5a29c..0000000 --- a/clean_build/contracts/YAMTokenStorage.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"constant": true, "inputs": [], "name": "BASE", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "decimals", "outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "gov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "incentivizer", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "initSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "internalDecimals", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "name", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "pendingGov", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rebaser", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "symbol", "outputs": [{"internalType": "string", "name": "", "type": "string"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yamsScalingFactor", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}], "networks": {}} \ No newline at end of file diff --git a/clean_build/contracts/YAMYFIPool.json b/clean_build/contracts/YAMYFIPool.json deleted file mode 100644 index f8db3db..0000000 --- a/clean_build/contracts/YAMYFIPool.json +++ /dev/null @@ -1 +0,0 @@ -{"abi": [{"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": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardAdded", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "RewardPaid", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Staked", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "internalType": "address", "name": "user", "type": "address"}, {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "Withdrawn", "type": "event"}, {"constant": true, "inputs": [], "name": "DURATION", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "balanceOf", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "periodFinish", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardDistribution", "outputs": [{"internalType": "address", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardRate", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "rewards", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "_rewardDistribution", "type": "address"}], "name": "setRewardDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "starttime", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "totalSupply", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "", "type": "address"}], "name": "userRewardPerTokenPaid", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yam", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "yfi", "outputs": [{"internalType": "contract IERC20", "name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [{"internalType": "address", "name": "account", "type": "address"}], "name": "earned", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "amount", "type": "uint256"}], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"internalType": "uint256", "name": "reward", "type": "uint256"}], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}], "networks": {"1": {"links": [{}], "address": "0xc5B6488c7D5BeD173B76Bd5DCA712f45fB9EaEaB", "transactionHash": "0xe50e34e710602cb8f78247bf2b66efb61c8ca33b9911e59229457067e3c29554"}, "1001": {"links": [{}], "address": "0x86aD8caa66c407d7485b05584B9Ac9A7e2371275", "transactionHash": "0x2beff36d157dfdcf66c59a739893055e30c8d41d09bc8ce90989aaf85d893973"}}} \ No newline at end of file diff --git a/contracts/distribution/YAMAMPLPool.sol b/contracts/distribution/HAMAMPLPool.sol similarity index 98% rename from contracts/distribution/YAMAMPLPool.sol rename to contracts/distribution/HAMAMPLPool.sol index ca9ff75..8f69fa0 100644 --- a/contracts/distribution/YAMAMPLPool.sol +++ b/contracts/distribution/HAMAMPLPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -593,8 +593,8 @@ pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -628,8 +628,8 @@ contract LPTokenWrapper { } } -contract YAMAMPLPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMAMPLPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -708,9 +708,9 @@ contract YAMAMPLPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/distribution/YAMCOMPPool.sol b/contracts/distribution/HAMCOMPPool.sol similarity index 98% rename from contracts/distribution/YAMCOMPPool.sol rename to contracts/distribution/HAMCOMPPool.sol index 60f8900..05b74e4 100644 --- a/contracts/distribution/YAMCOMPPool.sol +++ b/contracts/distribution/HAMCOMPPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -592,8 +592,8 @@ contract IRewardDistributionRecipient is Ownable { pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -628,8 +628,8 @@ contract LPTokenWrapper { } } -contract YAMCOMPPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMCOMPPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -708,9 +708,9 @@ contract YAMCOMPPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/distribution/YAMETHPool.sol b/contracts/distribution/HAMETHPool.sol similarity index 98% rename from contracts/distribution/YAMETHPool.sol rename to contracts/distribution/HAMETHPool.sol index 571cfa1..4792af0 100644 --- a/contracts/distribution/YAMETHPool.sol +++ b/contracts/distribution/HAMETHPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -592,8 +592,8 @@ contract IRewardDistributionRecipient is Ownable { pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -628,8 +628,8 @@ contract LPTokenWrapper { } } -contract YAMETHPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMETHPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -708,9 +708,9 @@ contract YAMETHPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/distribution/YAMLENDPool.sol b/contracts/distribution/HAMLENDPool.sol similarity index 98% rename from contracts/distribution/YAMLENDPool.sol rename to contracts/distribution/HAMLENDPool.sol index 72e9143..8227433 100644 --- a/contracts/distribution/YAMLENDPool.sol +++ b/contracts/distribution/HAMLENDPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -592,8 +592,8 @@ contract IRewardDistributionRecipient is Ownable { pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -628,8 +628,8 @@ contract LPTokenWrapper { } } -contract YAMLENDPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMLENDPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -708,9 +708,9 @@ contract YAMLENDPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/distribution/YAMLINKPool.sol b/contracts/distribution/HAMLINKPool.sol similarity index 98% rename from contracts/distribution/YAMLINKPool.sol rename to contracts/distribution/HAMLINKPool.sol index 73b5b5a..688ae1a 100644 --- a/contracts/distribution/YAMLINKPool.sol +++ b/contracts/distribution/HAMLINKPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -592,8 +592,8 @@ contract IRewardDistributionRecipient is Ownable { pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -628,8 +628,8 @@ contract LPTokenWrapper { } } -contract YAMLINKPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMLINKPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -708,9 +708,9 @@ contract YAMLINKPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/distribution/YAMMKRPool.sol b/contracts/distribution/HAMMKRPool.sol similarity index 98% rename from contracts/distribution/YAMMKRPool.sol rename to contracts/distribution/HAMMKRPool.sol index 1a5ec79..9075797 100644 --- a/contracts/distribution/YAMMKRPool.sol +++ b/contracts/distribution/HAMMKRPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -592,8 +592,8 @@ contract IRewardDistributionRecipient is Ownable { pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -628,8 +628,8 @@ contract LPTokenWrapper { } } -contract YAMMKRPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMMKRPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -708,9 +708,9 @@ contract YAMMKRPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/distribution/YAMSNXPool.sol b/contracts/distribution/HAMSNXPool.sol similarity index 98% rename from contracts/distribution/YAMSNXPool.sol rename to contracts/distribution/HAMSNXPool.sol index 8cac4a7..ce38855 100644 --- a/contracts/distribution/YAMSNXPool.sol +++ b/contracts/distribution/HAMSNXPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -592,8 +592,8 @@ contract IRewardDistributionRecipient is Ownable { pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -628,8 +628,8 @@ contract LPTokenWrapper { } } -contract YAMSNXPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMSNXPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -708,9 +708,9 @@ contract YAMSNXPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/distribution/YAMYFIPool.sol b/contracts/distribution/HAMYFIPool.sol similarity index 98% rename from contracts/distribution/YAMYFIPool.sol rename to contracts/distribution/HAMYFIPool.sol index 2951d7a..1c551a7 100644 --- a/contracts/distribution/YAMYFIPool.sol +++ b/contracts/distribution/HAMYFIPool.sol @@ -9,7 +9,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMRewards.sol +* Synthetix: HAMRewards.sol * * Docs: https://docs.synthetix.io/ * @@ -592,8 +592,8 @@ contract IRewardDistributionRecipient is Ownable { pragma solidity ^0.5.0; -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); } @@ -627,8 +627,8 @@ contract LPTokenWrapper { } } -contract YAMYFIPool is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMYFIPool is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; // ~7 1/4 days uint256 public starttime = 1597172400; // 2020-08-11 19:00:00 (UTC UTC +00:00) @@ -707,9 +707,9 @@ contract YAMYFIPool is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } diff --git a/contracts/governance/YAMGovernorAlpha.sol b/contracts/governance/HAMGovernorAlpha.sol similarity index 95% rename from contracts/governance/YAMGovernorAlpha.sol rename to contracts/governance/HAMGovernorAlpha.sol index b75cb35..6b5ab9c 100644 --- a/contracts/governance/YAMGovernorAlpha.sol +++ b/contracts/governance/HAMGovernorAlpha.sol @@ -2,9 +2,9 @@ pragma solidity ^0.5.17; pragma experimental ABIEncoderV2; // Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol -// Modified to work in the YAM system +// Modified to work in the HAM system -// all votes work on underlying _yamBalances[address], not balanceOf(address) +// all votes work on underlying _hamBalances[address], not balanceOf(address) // Original audit: https://blog.openzeppelin.com/compound-alpha-governance-system-audit/ // Overview: @@ -17,23 +17,23 @@ pragma experimental ABIEncoderV2; // Queued proposal with repeated actions cannot be executed // Fixed by explicitly disallow proposals with repeated actions to be queued in the Timelock contract. // -// Changes made by YAM after audit: +// Changes made by HAM after audit: // Formatting, naming, & uint256 instead of uint -// Since YAM supply changes, updated quorum & proposal requirements -// If any uint96, changed to uint256 to match YAM as opposed to comp +// Since HAM supply changes, updated quorum & proposal requirements +// If any uint96, changed to uint256 to match HAM as opposed to comp import "../lib/SafeMath.sol"; contract GovernorAlpha { /// @notice The name of this contract - string public constant name = "YAM Governor Alpha"; + string public constant name = "HAM Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed - function quorumVotes() public view returns (uint256) { return SafeMath.div(SafeMath.mul(yam.initSupply(), 4), 100); } // 4% of YAM + function quorumVotes() public view returns (uint256) { return SafeMath.div(SafeMath.mul(ham.initSupply(), 4), 100); } // 4% of HAM /// @notice The number of votes required in order for a voter to become a proposer - function proposalThreshold() public view returns (uint256) { return SafeMath.div(yam.initSupply(), 100); } // 1% of YAM + function proposalThreshold() public view returns (uint256) { return SafeMath.div(ham.initSupply(), 100); } // 1% of HAM /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint256) { return 10; } // 10 actions @@ -48,7 +48,7 @@ contract GovernorAlpha { TimelockInterface public timelock; /// @notice The address of the Compound governance token - YAMInterface public yam; + HAMInterface public ham; /// @notice The address of the Governor Guardian address public guardian; @@ -151,9 +151,9 @@ contract GovernorAlpha { /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint256 id); - constructor(address timelock_, address yam_) public { + constructor(address timelock_, address ham_) public { timelock = TimelockInterface(timelock_); - yam = YAMInterface(yam_); + ham = HAMInterface(ham_); guardian = msg.sender; } @@ -167,7 +167,7 @@ contract GovernorAlpha { public returns (uint256) { - require(yam.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), "GovernorAlpha::propose: proposer votes below proposal threshold"); + require(ham.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), "GovernorAlpha::propose: proposer votes below proposal threshold"); require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorAlpha::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions"); @@ -281,7 +281,7 @@ contract GovernorAlpha { require(state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal"); Proposal storage proposal = proposals[proposalId]; - require(msg.sender == guardian || yam.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), "GovernorAlpha::cancel: proposer above threshold"); + require(msg.sender == guardian || ham.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), "GovernorAlpha::cancel: proposer above threshold"); proposal.canceled = true; for (uint256 i = 0; i < proposal.targets.length; i++) { @@ -395,7 +395,7 @@ contract GovernorAlpha { Proposal storage proposal = proposals[proposalId]; Receipt storage receipt = proposal.receipts[voter]; require(receipt.hasVoted == false, "GovernorAlpha::_castVote: voter already voted"); - uint256 votes = yam.getPriorVotes(voter, proposal.startBlock); + uint256 votes = ham.getPriorVotes(voter, proposal.startBlock); if (support) { proposal.forVotes = add256(proposal.forVotes, votes); @@ -472,7 +472,7 @@ interface TimelockInterface { function executeTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external payable returns (bytes memory); } -interface YAMInterface { +interface HAMInterface { function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256); function initSupply() external view returns (uint256); function _acceptGov() external; diff --git a/contracts/governance/TimeLock.sol b/contracts/governance/TimeLock.sol index 4e86c4f..58c46a9 100644 --- a/contracts/governance/TimeLock.sol +++ b/contracts/governance/TimeLock.sol @@ -8,7 +8,7 @@ pragma solidity ^0.5.17; // No Critical // No High // -// Changes made by YAM after audit: +// Changes made by HAM after audit: // Formatting, naming, & uint256 instead of uint import "../lib/SafeMath.sol"; diff --git a/contracts/incentivizers/YAMIncentives.sol b/contracts/incentivizers/YAMIncentives.sol index 4baebcd..4c53759 100644 --- a/contracts/incentivizers/YAMIncentives.sol +++ b/contracts/incentivizers/YAMIncentives.sol @@ -17,7 +17,7 @@ /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ -* Synthetix: YAMIncentives.sol +* Synthetix: HAMIncentives.sol * * Docs: https://docs.synthetix.io/ * @@ -636,13 +636,13 @@ contract LPTokenWrapper { } } -interface YAM { - function yamsScalingFactor() external returns (uint256); +interface HAM { + function hamsScalingFactor() external returns (uint256); function mint(address to, uint256 amount) external; } -contract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient { - IERC20 public yam = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); +contract HAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient { + IERC20 public ham = IERC20(0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16); uint256 public constant DURATION = 625000; uint256 public initreward = 15 * 10**5 * 10**18; // 1.5m @@ -718,9 +718,9 @@ contract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient { uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 trueReward = reward.mul(scalingFactor).div(10**18); - yam.safeTransfer(msg.sender, trueReward); + ham.safeTransfer(msg.sender, trueReward); emit RewardPaid(msg.sender, trueReward); } } @@ -728,9 +728,9 @@ contract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient { modifier checkhalve() { if (block.timestamp >= periodFinish) { initreward = initreward.mul(50).div(100); - uint256 scalingFactor = YAM(address(yam)).yamsScalingFactor(); + uint256 scalingFactor = HAM(address(ham)).hamsScalingFactor(); uint256 newRewards = initreward.mul(scalingFactor).div(10**18); - yam.mint(address(this), newRewards); + ham.mint(address(this), newRewards); rewardRate = initreward.div(DURATION); periodFinish = block.timestamp.add(DURATION); @@ -762,8 +762,8 @@ contract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient { periodFinish = block.timestamp.add(DURATION); emit RewardAdded(reward); } else { - require(yam.balanceOf(address(this)) == 0, "already initialized"); - yam.mint(address(this), initreward); + require(ham.balanceOf(address(this)) == 0, "already initialized"); + ham.mint(address(this), initreward); rewardRate = initreward.div(DURATION); lastUpdateTime = starttime; periodFinish = starttime.add(DURATION); @@ -785,7 +785,7 @@ contract YAMIncentivizer is LPTokenWrapper, IRewardDistributionRecipient { // cant take staked asset require(_token != uni_lp, "uni_lp"); // cant take reward asset - require(_token != yam, "yam"); + require(_token != ham, "ham"); // transfer to _token.safeTransfer(to, amount); diff --git a/contracts/rebaser/YAMRebaser.sol b/contracts/rebaser/HAMRebaser.sol similarity index 93% rename from contracts/rebaser/YAMRebaser.sol rename to contracts/rebaser/HAMRebaser.sol index 1925efd..dc019fa 100644 --- a/contracts/rebaser/YAMRebaser.sol +++ b/contracts/rebaser/HAMRebaser.sol @@ -5,10 +5,10 @@ import "../lib/SafeERC20.sol"; import "../lib/SafeMath.sol"; import '../lib/IUniswapV2Pair.sol'; import "../lib/UniswapV2OracleLibrary.sol"; -import "../token/YAMTokenInterface.sol"; +import "../token/HAMTokenInterface.sol"; -contract YAMRebaser { +contract HAMRebaser { using SafeMath for uint256; @@ -24,7 +24,7 @@ contract YAMRebaser { } struct UniVars { - uint256 yamsToUni; + uint256 hamsToUni; uint256 amountFromReserves; uint256 mintToReserves; } @@ -52,7 +52,7 @@ contract YAMRebaser { /** * @notice Sets the reserve contract */ - event TreasuryIncreased(uint256 reservesAdded, uint256 yamsSold, uint256 yamsFromReserves, uint256 yamsToReserves); + event TreasuryIncreased(uint256 reservesAdded, uint256 hamsSold, uint256 hamsFromReserves, uint256 hamsToReserves); /** @@ -116,8 +116,8 @@ contract YAMRebaser { /// @notice Time of TWAP initialization uint256 public timeOfTWAPInit; - /// @notice YAM token address - address public yamAddress; + /// @notice HAM token address + address public hamAddress; /// @notice reserve token address public reserveToken; @@ -125,7 +125,7 @@ contract YAMRebaser { /// @notice Reserves vault contract address public reservesContract; - /// @notice pair for reserveToken <> YAM + /// @notice pair for reserveToken <> HAM address public uniswap_pair; /// @notice last TWAP update time @@ -141,11 +141,11 @@ contract YAMRebaser { /// @notice the maximum slippage factor when buying reserve token uint256 public maxSlippageFactor; - /// @notice Whether or not this token is first in uniswap YAM<>Reserve pair + /// @notice Whether or not this token is first in uniswap HAM<>Reserve pair bool public isToken0; constructor( - address yamAddress_, + address hamAddress_, address reserveToken_, address uniswap_factory, address reservesContract_ @@ -155,15 +155,15 @@ contract YAMRebaser { minRebaseTimeIntervalSec = 12 hours; rebaseWindowOffsetSec = 28800; // 8am/8pm UTC rebases reservesContract = reservesContract_; - (address token0, address token1) = sortTokens(yamAddress_, reserveToken_); + (address token0, address token1) = sortTokens(hamAddress_, reserveToken_); // used for interacting with uniswap - if (token0 == yamAddress_) { + if (token0 == hamAddress_) { isToken0 = true; } else { isToken0 = false; } - // uniswap YAM<>Reserve pair + // uniswap HAM<>Reserve pair uniswap_pair = pairFor(uniswap_factory, token0, token1); // Reserves contract is mutable @@ -172,7 +172,7 @@ contract YAMRebaser { // Reserve token is not mutable. Must deploy a new rebaser to update it reserveToken = reserveToken_; - yamAddress = yamAddress_; + hamAddress = hamAddress_; // target 10% slippage // 5.4% @@ -330,14 +330,14 @@ contract YAMRebaser { // Apply the Dampening factor. indexDelta = indexDelta.div(rebaseLag); - YAMTokenInterface yam = YAMTokenInterface(yamAddress); + HAMTokenInterface ham = HAMTokenInterface(hamAddress); if (positive) { - require(yam.yamsScalingFactor().mul(uint256(10**18).add(indexDelta)).div(10**18) < yam.maxScalingFactor(), "new scaling factor will be too big"); + require(ham.hamsScalingFactor().mul(uint256(10**18).add(indexDelta)).div(10**18) < ham.maxScalingFactor(), "new scaling factor will be too big"); } - uint256 currSupply = yam.totalSupply(); + uint256 currSupply = ham.totalSupply(); uint256 mintAmount; // reduce indexDelta to account for minting @@ -348,8 +348,8 @@ contract YAMRebaser { } // rebase - uint256 supplyAfterRebase = yam.rebase(epoch, indexDelta, positive); - assert(yam.yamsScalingFactor() <= yam.maxScalingFactor()); + uint256 supplyAfterRebase = ham.rebase(epoch, indexDelta, positive); + assert(ham.hamsScalingFactor() <= ham.maxScalingFactor()); // perform actions after rebase afterRebase(mintAmount, offPegPerc); @@ -370,33 +370,33 @@ contract YAMRebaser { require(sender == address(this), "bad origin"); (UniVars memory uniVars) = abi.decode(data, (UniVars)); - YAMTokenInterface yam = YAMTokenInterface(yamAddress); + HAMTokenInterface ham = HAMTokenInterface(hamAddress); if (uniVars.amountFromReserves > 0) { // transfer from reserves and mint to uniswap - yam.transferFrom(reservesContract, uniswap_pair, uniVars.amountFromReserves); - if (uniVars.amountFromReserves < uniVars.yamsToUni) { - // if the amount from reserves > yamsToUni, we have fully paid for the yCRV tokens + ham.transferFrom(reservesContract, uniswap_pair, uniVars.amountFromReserves); + if (uniVars.amountFromReserves < uniVars.hamsToUni) { + // if the amount from reserves > hamsToUni, we have fully paid for the yCRV tokens // thus this number would be 0 so no need to mint - yam.mint(uniswap_pair, uniVars.yamsToUni.sub(uniVars.amountFromReserves)); + ham.mint(uniswap_pair, uniVars.hamsToUni.sub(uniVars.amountFromReserves)); } } else { // mint to uniswap - yam.mint(uniswap_pair, uniVars.yamsToUni); + ham.mint(uniswap_pair, uniVars.hamsToUni); } // mint unsold to mintAmount if (uniVars.mintToReserves > 0) { - yam.mint(reservesContract, uniVars.mintToReserves); + ham.mint(reservesContract, uniVars.mintToReserves); } // transfer reserve token to reserves if (isToken0) { SafeERC20.safeTransfer(IERC20(reserveToken), reservesContract, amount1); - emit TreasuryIncreased(amount1, uniVars.yamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves); + emit TreasuryIncreased(amount1, uniVars.hamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves); } else { SafeERC20.safeTransfer(IERC20(reserveToken), reservesContract, amount0); - emit TreasuryIncreased(amount0, uniVars.yamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves); + emit TreasuryIncreased(amount0, uniVars.hamsToUni, uniVars.amountFromReserves, uniVars.mintToReserves); } } @@ -408,21 +408,21 @@ contract YAMRebaser { { UniswapPair pair = UniswapPair(uniswap_pair); - YAMTokenInterface yam = YAMTokenInterface(yamAddress); + HAMTokenInterface ham = HAMTokenInterface(hamAddress); // get reserves (uint256 token0Reserves, uint256 token1Reserves, ) = pair.getReserves(); - // check if protocol has excess yam in the reserve - uint256 excess = yam.balanceOf(reservesContract); + // check if protocol has excess ham in the reserve + uint256 excess = ham.balanceOf(reservesContract); uint256 tokens_to_max_slippage = uniswapMaxSlippage(token0Reserves, token1Reserves, offPegPerc); UniVars memory uniVars = UniVars({ - yamsToUni: tokens_to_max_slippage, // how many yams uniswap needs - amountFromReserves: excess, // how much of yamsToUni comes from reserves - mintToReserves: 0 // how much yams protocol mints to reserves + hamsToUni: tokens_to_max_slippage, // how many hams uniswap needs + amountFromReserves: excess, // how much of hamsToUni comes from reserves + mintToReserves: 0 // how much hams protocol mints to reserves }); // tries to sell all mint + excess @@ -436,7 +436,7 @@ contract YAMRebaser { // can handle selling all of reserves and mint uint256 buyTokens = getAmountOut(mintAmount + excess, token0Reserves, token1Reserves); - uniVars.yamsToUni = mintAmount + excess; + uniVars.hamsToUni = mintAmount + excess; uniVars.amountFromReserves = excess; // call swap using entire mint amount and excess; mint 0 to reserves pair.swap(0, buyTokens, address(this), abi.encode(uniVars)); @@ -445,7 +445,7 @@ contract YAMRebaser { // uniswap can handle entire reserves uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token0Reserves, token1Reserves); - // swap up to slippage limit, taking entire yam reserves, and minting part of total + // swap up to slippage limit, taking entire ham reserves, and minting part of total uniVars.mintToReserves = mintAmount.sub((tokens_to_max_slippage - excess)); pair.swap(0, buyTokens, address(this), abi.encode(uniVars)); } else { @@ -462,7 +462,7 @@ contract YAMRebaser { if (tokens_to_max_slippage > mintAmount.add(excess)) { // can handle all of reserves and mint uint256 buyTokens = getAmountOut(mintAmount + excess, token1Reserves, token0Reserves); - uniVars.yamsToUni = mintAmount + excess; + uniVars.hamsToUni = mintAmount + excess; uniVars.amountFromReserves = excess; // call swap using entire mint amount and excess; mint 0 to reserves pair.swap(buyTokens, 0, address(this), abi.encode(uniVars)); @@ -471,9 +471,9 @@ contract YAMRebaser { // uniswap can handle entire reserves uint256 buyTokens = getAmountOut(tokens_to_max_slippage, token1Reserves, token0Reserves); - // swap up to slippage limit, taking entire yam reserves, and minting part of total + // swap up to slippage limit, taking entire ham reserves, and minting part of total uniVars.mintToReserves = mintAmount.sub( (tokens_to_max_slippage - excess)); - // swap up to slippage limit, taking entire yam reserves, and minting part of total + // swap up to slippage limit, taking entire ham reserves, and minting part of total pair.swap(buyTokens, 0, address(this), abi.encode(uniVars)); } else { // uniswap cant handle all of excess diff --git a/contracts/reserves/YAMReserves.sol b/contracts/reserves/HAMReserves.sol similarity index 87% rename from contracts/reserves/YAMReserves.sol rename to contracts/reserves/HAMReserves.sol index 04a9c8a..e79ae0a 100644 --- a/contracts/reserves/YAMReserves.sol +++ b/contracts/reserves/HAMReserves.sol @@ -2,11 +2,11 @@ pragma solidity 0.5.17; import "../lib/IERC20.sol"; import "../lib/SafeERC20.sol"; -import "../token/YAMTokenInterface.sol"; +import "../token/HAMTokenInterface.sol"; -contract YAMReserves { +contract HAMReserves { - // Token that serves as a reserve for YAM + // Token that serves as a reserve for HAM address public reserveToken; address public gov; @@ -15,7 +15,7 @@ contract YAMReserves { address public rebaser; - address public yamAddress; + address public hamAddress; /*** Gov Events ***/ @@ -42,12 +42,12 @@ contract YAMReserves { constructor( address reserveToken_, - address yamAddress_ + address hamAddress_ ) public { reserveToken = reserveToken_; - yamAddress = yamAddress_; + hamAddress = hamAddress_; gov = msg.sender; } @@ -56,9 +56,9 @@ contract YAMReserves { onlyGov { address oldRebaser = rebaser; - YAMTokenInterface(yamAddress).decreaseAllowance(oldRebaser, uint256(-1)); + HAMTokenInterface(hamAddress).decreaseAllowance(oldRebaser, uint256(-1)); rebaser = rebaser_; - YAMTokenInterface(yamAddress).approve(rebaser_, uint256(-1)); + HAMTokenInterface(hamAddress).approve(rebaser_, uint256(-1)); emit NewRebaser(oldRebaser, rebaser_); } diff --git a/contracts/token/YAM.sol b/contracts/token/HAM.sol similarity index 83% rename from contracts/token/YAM.sol rename to contracts/token/HAM.sol index c1db7f6..7f638ca 100644 --- a/contracts/token/YAM.sol +++ b/contracts/token/HAM.sol @@ -1,9 +1,9 @@ pragma solidity 0.5.17; -/* import "./YAMTokenInterface.sol"; */ -import "./YAMGovernance.sol"; +/* import "./HAMTokenInterface.sol"; */ +import "./HAMGovernance.sol"; -contract YAMToken is YAMGovernanceToken { +contract HAMToken is HAMGovernanceToken { // Modifiers modifier onlyGov() { require(msg.sender == gov); @@ -33,7 +33,7 @@ contract YAMToken is YAMGovernanceToken { ) public { - require(yamsScalingFactor == 0, "already initialized"); + require(hamsScalingFactor == 0, "already initialized"); name = name_; symbol = symbol_; decimals = decimals_; @@ -56,8 +56,8 @@ contract YAMToken is YAMGovernanceToken { view returns (uint256) { - // scaling factor can only go up to 2**256-1 = initSupply * yamsScalingFactor - // this is used to check if yamsScalingFactor will be too high to compute balances when rebasing. + // scaling factor can only go up to 2**256-1 = initSupply * hamsScalingFactor + // this is used to check if hamsScalingFactor will be too high to compute balances when rebasing. return uint256(-1) / initSupply; } @@ -81,19 +81,19 @@ contract YAMToken is YAMGovernanceToken { totalSupply = totalSupply.add(amount); // get underlying value - uint256 yamValue = amount.mul(internalDecimals).div(yamsScalingFactor); + uint256 hamValue = amount.mul(internalDecimals).div(hamsScalingFactor); // increase initSupply - initSupply = initSupply.add(yamValue); + initSupply = initSupply.add(hamValue); // make sure the mint didnt push maxScalingFactor too low - require(yamsScalingFactor <= _maxScalingFactor(), "max scaling factor too low"); + require(hamsScalingFactor <= _maxScalingFactor(), "max scaling factor too low"); // add balance - _yamBalances[to] = _yamBalances[to].add(yamValue); + _hamBalances[to] = _hamBalances[to].add(hamValue); // add delegates to the minter - _moveDelegates(address(0), _delegates[to], yamValue); + _moveDelegates(address(0), _delegates[to], hamValue); emit Mint(to, amount); } @@ -110,22 +110,22 @@ contract YAMToken is YAMGovernanceToken { validRecipient(to) returns (bool) { - // underlying balance is stored in yams, so divide by current scaling factor + // underlying balance is stored in hams, so divide by current scaling factor // note, this means as scaling factor grows, dust will be untransferrable. - // minimum transfer value == yamsScalingFactor / 1e24; + // minimum transfer value == hamsScalingFactor / 1e24; // get amount in underlying - uint256 yamValue = value.mul(internalDecimals).div(yamsScalingFactor); + uint256 hamValue = value.mul(internalDecimals).div(hamsScalingFactor); // sub from balance of sender - _yamBalances[msg.sender] = _yamBalances[msg.sender].sub(yamValue); + _hamBalances[msg.sender] = _hamBalances[msg.sender].sub(hamValue); // add to balance of receiver - _yamBalances[to] = _yamBalances[to].add(yamValue); + _hamBalances[to] = _hamBalances[to].add(hamValue); emit Transfer(msg.sender, to, value); - _moveDelegates(_delegates[msg.sender], _delegates[to], yamValue); + _moveDelegates(_delegates[msg.sender], _delegates[to], hamValue); return true; } @@ -143,15 +143,15 @@ contract YAMToken is YAMGovernanceToken { // decrease allowance _allowedFragments[from][msg.sender] = _allowedFragments[from][msg.sender].sub(value); - // get value in yams - uint256 yamValue = value.mul(internalDecimals).div(yamsScalingFactor); + // get value in hams + uint256 hamValue = value.mul(internalDecimals).div(hamsScalingFactor); // sub from from - _yamBalances[from] = _yamBalances[from].sub(yamValue); - _yamBalances[to] = _yamBalances[to].add(yamValue); + _hamBalances[from] = _hamBalances[from].sub(hamValue); + _hamBalances[to] = _hamBalances[to].add(hamValue); emit Transfer(from, to, value); - _moveDelegates(_delegates[from], _delegates[to], yamValue); + _moveDelegates(_delegates[from], _delegates[to], hamValue); return true; } @@ -164,7 +164,7 @@ contract YAMToken is YAMGovernanceToken { view returns (uint256) { - return _yamBalances[who].mul(yamsScalingFactor).div(internalDecimals); + return _hamBalances[who].mul(hamsScalingFactor).div(internalDecimals); } /** @notice Currently returns the internal storage amount @@ -176,7 +176,7 @@ contract YAMToken is YAMGovernanceToken { view returns (uint256) { - return _yamBalances[who]; + return _hamBalances[who]; } /** @@ -320,30 +320,30 @@ contract YAMToken is YAMGovernanceToken { returns (uint256) { if (indexDelta == 0) { - emit Rebase(epoch, yamsScalingFactor, yamsScalingFactor); + emit Rebase(epoch, hamsScalingFactor, hamsScalingFactor); return totalSupply; } - uint256 prevYamsScalingFactor = yamsScalingFactor; + uint256 prevHamsScalingFactor = hamsScalingFactor; if (!positive) { - yamsScalingFactor = yamsScalingFactor.mul(BASE.sub(indexDelta)).div(BASE); + hamsScalingFactor = hamsScalingFactor.mul(BASE.sub(indexDelta)).div(BASE); } else { - uint256 newScalingFactor = yamsScalingFactor.mul(BASE.add(indexDelta)).div(BASE); + uint256 newScalingFactor = hamsScalingFactor.mul(BASE.add(indexDelta)).div(BASE); if (newScalingFactor < _maxScalingFactor()) { - yamsScalingFactor = newScalingFactor; + hamsScalingFactor = newScalingFactor; } else { - yamsScalingFactor = _maxScalingFactor(); + hamsScalingFactor = _maxScalingFactor(); } } - totalSupply = initSupply.mul(yamsScalingFactor); - emit Rebase(epoch, prevYamsScalingFactor, yamsScalingFactor); + totalSupply = initSupply.mul(hamsScalingFactor); + emit Rebase(epoch, prevHamsScalingFactor, hamsScalingFactor); return totalSupply; } } -contract YAM is YAMToken { +contract HAM is HAMToken { /** * @notice Initialize the new money market * @param name_ ERC-20 name of this token @@ -365,8 +365,8 @@ contract YAM is YAMToken { initSupply = initSupply_.mul(10**24/ (BASE)); totalSupply = initSupply_; - yamsScalingFactor = BASE; - _yamBalances[initial_owner] = initSupply_.mul(10**24 / (BASE)); + hamsScalingFactor = BASE; + _hamBalances[initial_owner] = initSupply_.mul(10**24 / (BASE)); // owner renounces ownership after deployment as they need to set // rebaser and incentivizer diff --git a/contracts/token/YAMDelegate.sol b/contracts/token/HAMDelegate.sol similarity index 91% rename from contracts/token/YAMDelegate.sol rename to contracts/token/HAMDelegate.sol index d627d37..c3493ee 100644 --- a/contracts/token/YAMDelegate.sol +++ b/contracts/token/HAMDelegate.sol @@ -1,15 +1,15 @@ pragma solidity 0.5.17; -import "./YAM.sol"; +import "./HAM.sol"; -contract YAMDelegationStorage { +contract HAMDelegationStorage { /** * @notice Implementation address for this contract */ address public implementation; } -contract YAMDelegatorInterface is YAMDelegationStorage { +contract HAMDelegatorInterface is HAMDelegationStorage { /** * @notice Emitted when implementation is changed */ @@ -24,7 +24,7 @@ contract YAMDelegatorInterface is YAMDelegationStorage { function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public; } -contract YAMDelegateInterface is YAMDelegationStorage { +contract HAMDelegateInterface is HAMDelegationStorage { /** * @notice Called by the delegator on a delegate to initialize it for duty * @dev Should revert if any issues arise which make it unfit for delegation @@ -39,7 +39,7 @@ contract YAMDelegateInterface is YAMDelegationStorage { } -contract YAMDelegate is YAM, YAMDelegateInterface { +contract HAMDelegate is HAM, HAMDelegateInterface { /** * @notice Construct an empty delegate */ diff --git a/contracts/token/YAMDelegator.sol b/contracts/token/HAMDelegator.sol similarity index 97% rename from contracts/token/YAMDelegator.sol rename to contracts/token/HAMDelegator.sol index acbdb07..df87749 100644 --- a/contracts/token/YAMDelegator.sol +++ b/contracts/token/HAMDelegator.sol @@ -1,11 +1,11 @@ pragma solidity 0.5.17; -import "./YAMTokenInterface.sol"; -import "./YAMDelegate.sol"; +import "./HAMTokenInterface.sol"; +import "./HAMDelegate.sol"; -contract YAMDelegator is YAMTokenInterface, YAMDelegatorInterface { +contract HAMDelegator is HAMTokenInterface, HAMDelegatorInterface { /** - * @notice Construct a new YAM + * @notice Construct a new HAM * @param name_ ERC-20 name of this token * @param symbol_ ERC-20 symbol of this token * @param decimals_ ERC-20 decimal precision of this token @@ -53,7 +53,7 @@ contract YAMDelegator is YAMTokenInterface, YAMDelegatorInterface { * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public { - require(msg.sender == gov, "YAMDelegator::_setImplementation: Caller must be gov"); + require(msg.sender == gov, "HAMDelegator::_setImplementation: Caller must be gov"); if (allowResign) { delegateToImplementation(abi.encodeWithSignature("_resignImplementation()")); @@ -404,7 +404,7 @@ contract YAMDelegator is YAMTokenInterface, YAMDelegatorInterface { * @dev It returns to the external caller whatever the implementation returns or forwards reverts */ function () external payable { - require(msg.value == 0,"YAMDelegator:fallback: cannot send value to fallback"); + require(msg.value == 0,"HAMDelegator:fallback: cannot send value to fallback"); // delegate all other functions to current implementation delegateAndReturn(); diff --git a/contracts/token/YAMGovernance.sol b/contracts/token/HAMGovernance.sol similarity index 92% rename from contracts/token/YAMGovernance.sol rename to contracts/token/HAMGovernance.sol index 5aca884..574c4ba 100644 --- a/contracts/token/YAMGovernance.sol +++ b/contracts/token/HAMGovernance.sol @@ -1,10 +1,10 @@ pragma solidity 0.5.17; pragma experimental ABIEncoderV2; -import "./YAMGovernanceStorage.sol"; -import "./YAMTokenInterface.sol"; +import "./HAMGovernanceStorage.sol"; +import "./HAMTokenInterface.sol"; -contract YAMGovernanceToken is YAMTokenInterface { +contract HAMGovernanceToken is HAMTokenInterface { /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); @@ -78,9 +78,9 @@ contract YAMGovernanceToken is YAMTokenInterface { ); address signatory = ecrecover(digest, v, r, s); - require(signatory != address(0), "YAM::delegateBySig: invalid signature"); - require(nonce == nonces[signatory]++, "YAM::delegateBySig: invalid nonce"); - require(now <= expiry, "YAM::delegateBySig: signature expired"); + require(signatory != address(0), "HAM::delegateBySig: invalid signature"); + require(nonce == nonces[signatory]++, "HAM::delegateBySig: invalid nonce"); + require(now <= expiry, "HAM::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } @@ -110,7 +110,7 @@ contract YAMGovernanceToken is YAMTokenInterface { view returns (uint256) { - require(blockNumber < block.number, "YAM::getPriorVotes: not yet determined"); + require(blockNumber < block.number, "HAM::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { @@ -147,7 +147,7 @@ contract YAMGovernanceToken is YAMTokenInterface { internal { address currentDelegate = _delegates[delegator]; - uint256 delegatorBalance = _yamBalances[delegator]; // balance of underlying YAMs (not scaled); + uint256 delegatorBalance = _hamBalances[delegator]; // balance of underlying HAMs (not scaled); _delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); @@ -183,7 +183,7 @@ contract YAMGovernanceToken is YAMTokenInterface { ) internal { - uint32 blockNumber = safe32(block.number, "YAM::_writeCheckpoint: block number exceeds 32 bits"); + uint32 blockNumber = safe32(block.number, "HAM::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; diff --git a/contracts/token/YAMGovernanceStorage.sol b/contracts/token/HAMGovernanceStorage.sol similarity index 97% rename from contracts/token/YAMGovernanceStorage.sol rename to contracts/token/HAMGovernanceStorage.sol index ae74ae4..730bfa5 100644 --- a/contracts/token/YAMGovernanceStorage.sol +++ b/contracts/token/HAMGovernanceStorage.sol @@ -1,7 +1,7 @@ pragma solidity 0.5.17; pragma experimental ABIEncoderV2; -contract YAMGovernanceStorage { +contract HAMGovernanceStorage { /// @notice A record of each accounts delegate mapping (address => address) internal _delegates; diff --git a/contracts/token/YAMTokenInterface.sol b/contracts/token/HAMTokenInterface.sol similarity index 93% rename from contracts/token/YAMTokenInterface.sol rename to contracts/token/HAMTokenInterface.sol index 88473b7..74bb74f 100644 --- a/contracts/token/YAMTokenInterface.sol +++ b/contracts/token/HAMTokenInterface.sol @@ -1,9 +1,9 @@ pragma solidity 0.5.17; -import "./YAMTokenStorage.sol"; -import "./YAMGovernanceStorage.sol"; +import "./HAMTokenStorage.sol"; +import "./HAMGovernanceStorage.sol"; -contract YAMTokenInterface is YAMTokenStorage, YAMGovernanceStorage { +contract HAMTokenInterface is HAMTokenStorage, HAMGovernanceStorage { /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); @@ -14,7 +14,7 @@ contract YAMTokenInterface is YAMTokenStorage, YAMGovernanceStorage { /** * @notice Event emitted when tokens are rebased */ - event Rebase(uint256 epoch, uint256 prevYamsScalingFactor, uint256 newYamsScalingFactor); + event Rebase(uint256 epoch, uint256 prevHamsScalingFactor, uint256 newHamsScalingFactor); /*** Gov Events ***/ diff --git a/contracts/token/YAMTokenStorage.sol b/contracts/token/HAMTokenStorage.sol similarity index 84% rename from contracts/token/YAMTokenStorage.sol rename to contracts/token/HAMTokenStorage.sol index 6335eca..87b60e4 100644 --- a/contracts/token/YAMTokenStorage.sol +++ b/contracts/token/HAMTokenStorage.sol @@ -2,8 +2,8 @@ pragma solidity 0.5.17; import "../lib/SafeMath.sol"; -// Storage for a YAM token -contract YAMTokenStorage { +// Storage for a HAM token +contract HAMTokenStorage { using SafeMath for uint256; @@ -43,12 +43,12 @@ contract YAMTokenStorage { address public rebaser; /** - * @notice Reserve address of YAM protocol + * @notice Reserve address of HAM protocol */ address public incentivizer; /** - * @notice Total supply of YAMs + * @notice Total supply of HAMs */ uint256 public totalSupply; @@ -65,9 +65,9 @@ contract YAMTokenStorage { /** * @notice Scaling factor that adjusts everyone's balances */ - uint256 public yamsScalingFactor; + uint256 public hamsScalingFactor; - mapping (address => uint256) internal _yamBalances; + mapping (address => uint256) internal _hamBalances; mapping (address => mapping (address => uint256)) internal _allowedFragments; diff --git a/yam-www/.gitignore b/ham-www/.gitignore similarity index 100% rename from yam-www/.gitignore rename to ham-www/.gitignore diff --git a/yam-www/README.md b/ham-www/README.md similarity index 100% rename from yam-www/README.md rename to ham-www/README.md diff --git a/yam-www/package.json b/ham-www/package.json similarity index 98% rename from yam-www/package.json rename to ham-www/package.json index 2bb4679..47f0932 100644 --- a/yam-www/package.json +++ b/ham-www/package.json @@ -1,5 +1,5 @@ { - "name": "yam", + "name": "ham", "version": "0.1.0", "private": true, "dependencies": { diff --git a/yam-www/public/_redirects b/ham-www/public/_redirects similarity index 100% rename from yam-www/public/_redirects rename to ham-www/public/_redirects diff --git a/yam-www/public/favicon.ico b/ham-www/public/favicon.ico similarity index 100% rename from yam-www/public/favicon.ico rename to ham-www/public/favicon.ico diff --git a/yam-www/public/hero.png b/ham-www/public/hero.png similarity index 100% rename from yam-www/public/hero.png rename to ham-www/public/hero.png diff --git a/yam-www/public/index.html b/ham-www/public/index.html similarity index 90% rename from yam-www/public/index.html rename to ham-www/public/index.html index fa65453..9c0ae2c 100644 --- a/yam-www/public/index.html +++ b/ham-www/public/index.html @@ -7,7 +7,7 @@ - YAM Farmer + HAM Farmer diff --git a/yam-www/public/logo192.png b/ham-www/public/logo192.png similarity index 100% rename from yam-www/public/logo192.png rename to ham-www/public/logo192.png diff --git a/yam-www/public/logo512.png b/ham-www/public/logo512.png similarity index 100% rename from yam-www/public/logo512.png rename to ham-www/public/logo512.png diff --git a/yam-www/public/manifest.json b/ham-www/public/manifest.json similarity index 100% rename from yam-www/public/manifest.json rename to ham-www/public/manifest.json diff --git a/yam-www/public/robots.txt b/ham-www/public/robots.txt similarity index 100% rename from yam-www/public/robots.txt rename to ham-www/public/robots.txt diff --git a/yam-www/src/App.tsx b/ham-www/src/App.tsx similarity index 92% rename from yam-www/src/App.tsx rename to ham-www/src/App.tsx index 4da085e..8f6348f 100644 --- a/yam-www/src/App.tsx +++ b/ham-www/src/App.tsx @@ -9,7 +9,7 @@ import { UseWalletProvider } from 'use-wallet' import FarmsProvider from './contexts/Farms' import ModalsProvider from './contexts/Modals' -import YamProvider from './contexts/YamProvider' +import HamProvider from './contexts/HamProvider' import TransactionProvider from './contexts/Transactions' import Farms from './views/Farms' @@ -38,7 +38,7 @@ const Providers: React.FC = ({ children }) => { return ( - + @@ -46,7 +46,7 @@ const Providers: React.FC = ({ children }) => { - + ) diff --git a/yam-www/src/assets/img/farmer.png b/ham-www/src/assets/img/farmer.png similarity index 100% rename from yam-www/src/assets/img/farmer.png rename to ham-www/src/assets/img/farmer.png diff --git a/yam-www/src/components/Button/Button.tsx b/ham-www/src/components/Button/Button.tsx similarity index 100% rename from yam-www/src/components/Button/Button.tsx rename to ham-www/src/components/Button/Button.tsx diff --git a/yam-www/src/components/Button/index.ts b/ham-www/src/components/Button/index.ts similarity index 100% rename from yam-www/src/components/Button/index.ts rename to ham-www/src/components/Button/index.ts diff --git a/yam-www/src/components/Card/Card.tsx b/ham-www/src/components/Card/Card.tsx similarity index 100% rename from yam-www/src/components/Card/Card.tsx rename to ham-www/src/components/Card/Card.tsx diff --git a/yam-www/src/components/Card/index.ts b/ham-www/src/components/Card/index.ts similarity index 100% rename from yam-www/src/components/Card/index.ts rename to ham-www/src/components/Card/index.ts diff --git a/yam-www/src/components/CardContent/CardContent.tsx b/ham-www/src/components/CardContent/CardContent.tsx similarity index 100% rename from yam-www/src/components/CardContent/CardContent.tsx rename to ham-www/src/components/CardContent/CardContent.tsx diff --git a/yam-www/src/components/CardContent/index.ts b/ham-www/src/components/CardContent/index.ts similarity index 100% rename from yam-www/src/components/CardContent/index.ts rename to ham-www/src/components/CardContent/index.ts diff --git a/yam-www/src/components/CardIcon/CardIcon.tsx b/ham-www/src/components/CardIcon/CardIcon.tsx similarity index 100% rename from yam-www/src/components/CardIcon/CardIcon.tsx rename to ham-www/src/components/CardIcon/CardIcon.tsx diff --git a/yam-www/src/components/CardIcon/index.ts b/ham-www/src/components/CardIcon/index.ts similarity index 100% rename from yam-www/src/components/CardIcon/index.ts rename to ham-www/src/components/CardIcon/index.ts diff --git a/yam-www/src/components/Container/Container.tsx b/ham-www/src/components/Container/Container.tsx similarity index 100% rename from yam-www/src/components/Container/Container.tsx rename to ham-www/src/components/Container/Container.tsx diff --git a/yam-www/src/components/Container/index.ts b/ham-www/src/components/Container/index.ts similarity index 100% rename from yam-www/src/components/Container/index.ts rename to ham-www/src/components/Container/index.ts diff --git a/yam-www/src/components/Dial/Dial.tsx b/ham-www/src/components/Dial/Dial.tsx similarity index 100% rename from yam-www/src/components/Dial/Dial.tsx rename to ham-www/src/components/Dial/Dial.tsx diff --git a/yam-www/src/components/Dial/index.ts b/ham-www/src/components/Dial/index.ts similarity index 100% rename from yam-www/src/components/Dial/index.ts rename to ham-www/src/components/Dial/index.ts diff --git a/yam-www/src/components/Footer/Footer.tsx b/ham-www/src/components/Footer/Footer.tsx similarity index 100% rename from yam-www/src/components/Footer/Footer.tsx rename to ham-www/src/components/Footer/Footer.tsx diff --git a/yam-www/src/components/Footer/components/Nav.tsx b/ham-www/src/components/Footer/components/Nav.tsx similarity index 81% rename from yam-www/src/components/Footer/components/Nav.tsx rename to ham-www/src/components/Footer/components/Nav.tsx index e7982f2..2e61cff 100644 --- a/yam-www/src/components/Footer/components/Nav.tsx +++ b/ham-www/src/components/Footer/components/Nav.tsx @@ -4,8 +4,8 @@ import styled from 'styled-components' const Nav: React.FC = () => { return ( - Github - Twitter + Github + Twitter ) } diff --git a/yam-www/src/components/Footer/index.ts b/ham-www/src/components/Footer/index.ts similarity index 100% rename from yam-www/src/components/Footer/index.ts rename to ham-www/src/components/Footer/index.ts diff --git a/yam-www/src/components/Icon/Icon.tsx b/ham-www/src/components/Icon/Icon.tsx similarity index 100% rename from yam-www/src/components/Icon/Icon.tsx rename to ham-www/src/components/Icon/Icon.tsx diff --git a/yam-www/src/components/Icon/index.ts b/ham-www/src/components/Icon/index.ts similarity index 100% rename from yam-www/src/components/Icon/index.ts rename to ham-www/src/components/Icon/index.ts diff --git a/yam-www/src/components/IconButton/IconButton.tsx b/ham-www/src/components/IconButton/IconButton.tsx similarity index 100% rename from yam-www/src/components/IconButton/IconButton.tsx rename to ham-www/src/components/IconButton/IconButton.tsx diff --git a/yam-www/src/components/IconButton/index.ts b/ham-www/src/components/IconButton/index.ts similarity index 100% rename from yam-www/src/components/IconButton/index.ts rename to ham-www/src/components/IconButton/index.ts diff --git a/yam-www/src/components/Input/Input.tsx b/ham-www/src/components/Input/Input.tsx similarity index 100% rename from yam-www/src/components/Input/Input.tsx rename to ham-www/src/components/Input/Input.tsx diff --git a/yam-www/src/components/Input/index.ts b/ham-www/src/components/Input/index.ts similarity index 100% rename from yam-www/src/components/Input/index.ts rename to ham-www/src/components/Input/index.ts diff --git a/yam-www/src/components/Label/Label.tsx b/ham-www/src/components/Label/Label.tsx similarity index 100% rename from yam-www/src/components/Label/Label.tsx rename to ham-www/src/components/Label/Label.tsx diff --git a/yam-www/src/components/Label/index.ts b/ham-www/src/components/Label/index.ts similarity index 100% rename from yam-www/src/components/Label/index.ts rename to ham-www/src/components/Label/index.ts diff --git a/yam-www/src/components/Loader/Loader.tsx b/ham-www/src/components/Loader/Loader.tsx similarity index 92% rename from yam-www/src/components/Loader/Loader.tsx rename to ham-www/src/components/Loader/Loader.tsx index 057586c..35fa78d 100644 --- a/yam-www/src/components/Loader/Loader.tsx +++ b/ham-www/src/components/Loader/Loader.tsx @@ -11,7 +11,7 @@ const Loader: React.FC = ({ text }) => { return ( - 🍠 + 🍠 {!!text && {text}} @@ -34,7 +34,7 @@ const StyledLoader = styled.div` justify-content: center; ` -const StyledYam = styled.div` +const StyledHam = styled.div` font-size: 32px; position: relative; animation: 1s ${spin} infinite; diff --git a/yam-www/src/components/Loader/index.ts b/ham-www/src/components/Loader/index.ts similarity index 100% rename from yam-www/src/components/Loader/index.ts rename to ham-www/src/components/Loader/index.ts diff --git a/yam-www/src/components/Logo/Logo.tsx b/ham-www/src/components/Logo/Logo.tsx similarity index 92% rename from yam-www/src/components/Logo/Logo.tsx rename to ham-www/src/components/Logo/Logo.tsx index cee0a8a..accb712 100644 --- a/yam-www/src/components/Logo/Logo.tsx +++ b/ham-www/src/components/Logo/Logo.tsx @@ -7,7 +7,7 @@ const Logo: React.FC = () => { return ( - YAM Farmer + HAM Farmer ) } diff --git a/yam-www/src/components/Logo/index.ts b/ham-www/src/components/Logo/index.ts similarity index 100% rename from yam-www/src/components/Logo/index.ts rename to ham-www/src/components/Logo/index.ts diff --git a/yam-www/src/components/Modal/Modal.tsx b/ham-www/src/components/Modal/Modal.tsx similarity index 100% rename from yam-www/src/components/Modal/Modal.tsx rename to ham-www/src/components/Modal/Modal.tsx diff --git a/yam-www/src/components/Modal/index.ts b/ham-www/src/components/Modal/index.ts similarity index 100% rename from yam-www/src/components/Modal/index.ts rename to ham-www/src/components/Modal/index.ts diff --git a/yam-www/src/components/ModalActions/ModalActions.tsx b/ham-www/src/components/ModalActions/ModalActions.tsx similarity index 100% rename from yam-www/src/components/ModalActions/ModalActions.tsx rename to ham-www/src/components/ModalActions/ModalActions.tsx diff --git a/yam-www/src/components/ModalActions/index.ts b/ham-www/src/components/ModalActions/index.ts similarity index 100% rename from yam-www/src/components/ModalActions/index.ts rename to ham-www/src/components/ModalActions/index.ts diff --git a/yam-www/src/components/ModalTitle/ModalTitle.tsx b/ham-www/src/components/ModalTitle/ModalTitle.tsx similarity index 100% rename from yam-www/src/components/ModalTitle/ModalTitle.tsx rename to ham-www/src/components/ModalTitle/ModalTitle.tsx diff --git a/yam-www/src/components/ModalTitle/index.ts b/ham-www/src/components/ModalTitle/index.ts similarity index 100% rename from yam-www/src/components/ModalTitle/index.ts rename to ham-www/src/components/ModalTitle/index.ts diff --git a/yam-www/src/components/Page/Page.tsx b/ham-www/src/components/Page/Page.tsx similarity index 100% rename from yam-www/src/components/Page/Page.tsx rename to ham-www/src/components/Page/Page.tsx diff --git a/yam-www/src/components/Page/index.ts b/ham-www/src/components/Page/index.ts similarity index 100% rename from yam-www/src/components/Page/index.ts rename to ham-www/src/components/Page/index.ts diff --git a/yam-www/src/components/PageHeader/PageHeader.tsx b/ham-www/src/components/PageHeader/PageHeader.tsx similarity index 100% rename from yam-www/src/components/PageHeader/PageHeader.tsx rename to ham-www/src/components/PageHeader/PageHeader.tsx diff --git a/yam-www/src/components/PageHeader/index.ts b/ham-www/src/components/PageHeader/index.ts similarity index 100% rename from yam-www/src/components/PageHeader/index.ts rename to ham-www/src/components/PageHeader/index.ts diff --git a/yam-www/src/components/Spacer/Spacer.tsx b/ham-www/src/components/Spacer/Spacer.tsx similarity index 100% rename from yam-www/src/components/Spacer/Spacer.tsx rename to ham-www/src/components/Spacer/Spacer.tsx diff --git a/yam-www/src/components/Spacer/index.ts b/ham-www/src/components/Spacer/index.ts similarity index 100% rename from yam-www/src/components/Spacer/index.ts rename to ham-www/src/components/Spacer/index.ts diff --git a/yam-www/src/components/TokenInput/TokenInput.tsx b/ham-www/src/components/TokenInput/TokenInput.tsx similarity index 100% rename from yam-www/src/components/TokenInput/TokenInput.tsx rename to ham-www/src/components/TokenInput/TokenInput.tsx diff --git a/yam-www/src/components/TokenInput/index.ts b/ham-www/src/components/TokenInput/index.ts similarity index 100% rename from yam-www/src/components/TokenInput/index.ts rename to ham-www/src/components/TokenInput/index.ts diff --git a/yam-www/src/components/TopBar/TopBar.tsx b/ham-www/src/components/TopBar/TopBar.tsx similarity index 100% rename from yam-www/src/components/TopBar/TopBar.tsx rename to ham-www/src/components/TopBar/TopBar.tsx diff --git a/yam-www/src/components/TopBar/components/AccountButton.tsx b/ham-www/src/components/TopBar/components/AccountButton.tsx similarity index 100% rename from yam-www/src/components/TopBar/components/AccountButton.tsx rename to ham-www/src/components/TopBar/components/AccountButton.tsx diff --git a/yam-www/src/components/TopBar/components/AccountModal.tsx b/ham-www/src/components/TopBar/components/AccountModal.tsx similarity index 91% rename from yam-www/src/components/TopBar/components/AccountModal.tsx rename to ham-www/src/components/TopBar/components/AccountModal.tsx index f0a0e3e..8326089 100644 --- a/yam-www/src/components/TopBar/components/AccountModal.tsx +++ b/ham-www/src/components/TopBar/components/AccountModal.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useMemo } from 'react' import styled from 'styled-components' -import { yam as yamAddress } from '../../../constants/tokenAddresses' +import { ham as hamAddress } from '../../../constants/tokenAddresses' import useTokenBalance from '../../../hooks/useTokenBalance' import { getDisplayBalance } from '../../../utils/formatBalance' @@ -19,10 +19,10 @@ const AccountModal: React.FC = ({ onDismiss }) => { onDismiss!() }, [onDismiss]) - const yamBalance = useTokenBalance(yamAddress) + const hamBalance = useTokenBalance(hamAddress) const displayBalance = useMemo(() => { - return getDisplayBalance(yamBalance) - }, [yamBalance]) + return getDisplayBalance(hamBalance) + }, [hamBalance]) return ( @@ -32,7 +32,7 @@ const AccountModal: React.FC = ({ onDismiss }) => { 🍠 {displayBalance} - diff --git a/yam-www/src/components/TopBar/components/Nav.tsx b/ham-www/src/components/TopBar/components/Nav.tsx similarity index 100% rename from yam-www/src/components/TopBar/components/Nav.tsx rename to ham-www/src/components/TopBar/components/Nav.tsx diff --git a/yam-www/src/components/TopBar/components/TxButton.tsx b/ham-www/src/components/TopBar/components/TxButton.tsx similarity index 100% rename from yam-www/src/components/TopBar/components/TxButton.tsx rename to ham-www/src/components/TopBar/components/TxButton.tsx diff --git a/yam-www/src/components/TopBar/index.ts b/ham-www/src/components/TopBar/index.ts similarity index 100% rename from yam-www/src/components/TopBar/index.ts rename to ham-www/src/components/TopBar/index.ts diff --git a/yam-www/src/components/Value/Value.tsx b/ham-www/src/components/Value/Value.tsx similarity index 100% rename from yam-www/src/components/Value/Value.tsx rename to ham-www/src/components/Value/Value.tsx diff --git a/yam-www/src/components/Value/index.ts b/ham-www/src/components/Value/index.ts similarity index 100% rename from yam-www/src/components/Value/index.ts rename to ham-www/src/components/Value/index.ts diff --git a/yam-www/src/components/icons/AddIcon.tsx b/ham-www/src/components/icons/AddIcon.tsx similarity index 100% rename from yam-www/src/components/icons/AddIcon.tsx rename to ham-www/src/components/icons/AddIcon.tsx diff --git a/yam-www/src/components/icons/RemoveIcon.tsx b/ham-www/src/components/icons/RemoveIcon.tsx similarity index 100% rename from yam-www/src/components/icons/RemoveIcon.tsx rename to ham-www/src/components/icons/RemoveIcon.tsx diff --git a/yam-www/src/components/icons/index.ts b/ham-www/src/components/icons/index.ts similarity index 100% rename from yam-www/src/components/icons/index.ts rename to ham-www/src/components/icons/index.ts diff --git a/yam-www/src/constants/abi/ERC20.json b/ham-www/src/constants/abi/ERC20.json similarity index 100% rename from yam-www/src/constants/abi/ERC20.json rename to ham-www/src/constants/abi/ERC20.json diff --git a/ham-www/src/constants/tokenAddresses.ts b/ham-www/src/constants/tokenAddresses.ts new file mode 100644 index 0000000..58de734 --- /dev/null +++ b/ham-www/src/constants/tokenAddresses.ts @@ -0,0 +1 @@ +export const ham = '0x0e2298e3b3390e3b945a5456fbf59ecc3f55da16' \ No newline at end of file diff --git a/yam-www/src/contexts/Farms/Farms.tsx b/ham-www/src/contexts/Farms/Farms.tsx similarity index 86% rename from yam-www/src/contexts/Farms/Farms.tsx rename to ham-www/src/contexts/Farms/Farms.tsx index 06e95a6..44d65ed 100644 --- a/yam-www/src/contexts/Farms/Farms.tsx +++ b/ham-www/src/contexts/Farms/Farms.tsx @@ -2,9 +2,9 @@ import React, { useCallback, useEffect, useState } from 'react' import { Contract } from "web3-eth-contract" -import { yam as yamAddress } from '../../constants/tokenAddresses' -import useYam from '../../hooks/useYam' -import { getPoolContracts } from '../../yamUtils' +import { ham as hamAddress } from '../../constants/tokenAddresses' +import useHam from '../../hooks/useHam' +import { getPoolContracts } from '../../hamUtils' import Context from './context' import { Farm } from './types' @@ -36,10 +36,10 @@ const ICON_FOR_POOL: { [key: string]: string } = { const Farms: React.FC = ({ children }) => { const [farms, setFarms] = useState([]) - const yam = useYam() + const ham = useHam() const fetchPools = useCallback(async () => { - const pools: { [key: string]: Contract} = await getPoolContracts(yam) + const pools: { [key: string]: Contract} = await getPoolContracts(ham) const farmsArr: Farm[] = [] const poolKeys = Object.keys(pools) @@ -63,8 +63,8 @@ const Farms: React.FC = ({ children }) => { name: NAME_FOR_POOL[poolKey], depositToken: tokenKey, depositTokenAddress: tokenAddress, - earnToken: 'yam', - earnTokenAddress: yamAddress, + earnToken: 'ham', + earnTokenAddress: hamAddress, icon: ICON_FOR_POOL[poolKey], id: tokenKey }) @@ -74,13 +74,13 @@ const Farms: React.FC = ({ children }) => { } } setFarms(farmsArr) - }, [yam, setFarms]) + }, [ham, setFarms]) useEffect(() => { - if (yam) { + if (ham) { fetchPools() } - }, [yam, fetchPools]) + }, [ham, fetchPools]) return ( diff --git a/yam-www/src/contexts/Farms/context.ts b/ham-www/src/contexts/Farms/context.ts similarity index 100% rename from yam-www/src/contexts/Farms/context.ts rename to ham-www/src/contexts/Farms/context.ts diff --git a/yam-www/src/contexts/Farms/index.ts b/ham-www/src/contexts/Farms/index.ts similarity index 100% rename from yam-www/src/contexts/Farms/index.ts rename to ham-www/src/contexts/Farms/index.ts diff --git a/yam-www/src/contexts/Farms/types.ts b/ham-www/src/contexts/Farms/types.ts similarity index 100% rename from yam-www/src/contexts/Farms/types.ts rename to ham-www/src/contexts/Farms/types.ts diff --git a/yam-www/src/contexts/Modals/Modals.tsx b/ham-www/src/contexts/Modals/Modals.tsx similarity index 100% rename from yam-www/src/contexts/Modals/Modals.tsx rename to ham-www/src/contexts/Modals/Modals.tsx diff --git a/yam-www/src/contexts/Modals/index.ts b/ham-www/src/contexts/Modals/index.ts similarity index 100% rename from yam-www/src/contexts/Modals/index.ts rename to ham-www/src/contexts/Modals/index.ts diff --git a/yam-www/src/contexts/Transactions/TransactionsProvider.tsx b/ham-www/src/contexts/Transactions/TransactionsProvider.tsx similarity index 100% rename from yam-www/src/contexts/Transactions/TransactionsProvider.tsx rename to ham-www/src/contexts/Transactions/TransactionsProvider.tsx diff --git a/yam-www/src/contexts/Transactions/context.ts b/ham-www/src/contexts/Transactions/context.ts similarity index 100% rename from yam-www/src/contexts/Transactions/context.ts rename to ham-www/src/contexts/Transactions/context.ts diff --git a/yam-www/src/contexts/Transactions/index.ts b/ham-www/src/contexts/Transactions/index.ts similarity index 100% rename from yam-www/src/contexts/Transactions/index.ts rename to ham-www/src/contexts/Transactions/index.ts diff --git a/yam-www/src/contexts/Transactions/reducer.ts b/ham-www/src/contexts/Transactions/reducer.ts similarity index 100% rename from yam-www/src/contexts/Transactions/reducer.ts rename to ham-www/src/contexts/Transactions/reducer.ts diff --git a/yam-www/src/contexts/Transactions/types.ts b/ham-www/src/contexts/Transactions/types.ts similarity index 100% rename from yam-www/src/contexts/Transactions/types.ts rename to ham-www/src/contexts/Transactions/types.ts diff --git a/yam-www/src/contexts/YamProvider/YamProvider.tsx b/ham-www/src/contexts/YamProvider/YamProvider.tsx similarity index 61% rename from yam-www/src/contexts/YamProvider/YamProvider.tsx rename to ham-www/src/contexts/YamProvider/YamProvider.tsx index 5fbe13d..17e6db9 100644 --- a/yam-www/src/contexts/YamProvider/YamProvider.tsx +++ b/ham-www/src/contexts/YamProvider/YamProvider.tsx @@ -2,29 +2,29 @@ import React, { createContext, useEffect, useState } from 'react' import { useWallet } from 'use-wallet' -import { Yam } from '../../yam' +import { Ham } from '../../ham' -export interface YamContext { - yam?: typeof Yam +export interface HamContext { + ham?: typeof Ham } -export const Context = createContext({ - yam: undefined, +export const Context = createContext({ + ham: undefined, }) declare global { interface Window { - yamsauce: any + hamsauce: any } } -const YamProvider: React.FC = ({ children }) => { +const HamProvider: React.FC = ({ children }) => { const { ethereum } = useWallet() - const [yam, setYam] = useState() + const [ham, setHam] = useState() useEffect(() => { if (ethereum) { - const yamLib = new Yam( + const hamLib = new Ham( ethereum, "1", false, { @@ -38,16 +38,16 @@ const YamProvider: React.FC = ({ children }) => { ethereumNodeTimeout: 10000 } ) - setYam(yamLib) - window.yamsauce = yamLib + setHam(hamLib) + window.hamsauce = hamLib } }, [ethereum]) return ( - + {children} ) } -export default YamProvider +export default HamProvider diff --git a/ham-www/src/contexts/YamProvider/index.ts b/ham-www/src/contexts/YamProvider/index.ts new file mode 100644 index 0000000..4984356 --- /dev/null +++ b/ham-www/src/contexts/YamProvider/index.ts @@ -0,0 +1 @@ +export { default, Context } from './HamProvider' \ No newline at end of file diff --git a/yam-www/src/yam/Yam.js b/ham-www/src/ham/Yam.js similarity index 99% rename from yam-www/src/yam/Yam.js rename to ham-www/src/ham/Yam.js index e3e984e..53a5ecb 100644 --- a/yam-www/src/yam/Yam.js +++ b/ham-www/src/ham/Yam.js @@ -12,7 +12,7 @@ import { const oneEther = 1000000000000000000; -export class Yam { +export class Ham { constructor( provider, networkId, diff --git a/yam-www/src/yam/index.js b/ham-www/src/ham/index.js similarity index 84% rename from yam-www/src/yam/index.js rename to ham-www/src/ham/index.js index cf9af77..517bc4c 100644 --- a/yam-www/src/yam/index.js +++ b/ham-www/src/ham/index.js @@ -6,7 +6,7 @@ BigNumber.config({ DECIMAL_PLACES: 80, }); -export { Yam } from './Yam.js'; +export { Ham } from './Ham.js'; export { Web3, BigNumber, diff --git a/yam-www/src/yam/lib/BytesHelper.js b/ham-www/src/ham/lib/BytesHelper.js similarity index 100% rename from yam-www/src/yam/lib/BytesHelper.js rename to ham-www/src/ham/lib/BytesHelper.js diff --git a/yam-www/src/yam/lib/Expect.js b/ham-www/src/ham/lib/Expect.js similarity index 100% rename from yam-www/src/yam/lib/Expect.js rename to ham-www/src/ham/lib/Expect.js diff --git a/yam-www/src/yam/lib/Helpers.js b/ham-www/src/ham/lib/Helpers.js similarity index 100% rename from yam-www/src/yam/lib/Helpers.js rename to ham-www/src/ham/lib/Helpers.js diff --git a/yam-www/src/yam/lib/accounts.js b/ham-www/src/ham/lib/accounts.js similarity index 92% rename from yam-www/src/yam/lib/accounts.js rename to ham-www/src/ham/lib/accounts.js index 36d024a..a555dc8 100644 --- a/yam-www/src/yam/lib/accounts.js +++ b/ham-www/src/ham/lib/accounts.js @@ -15,8 +15,8 @@ export class Account { this.walletInfo = {}; } - async getYAMWalletBalance() { - this.walletInfo["DAI"] = await this.contracts.yam.methods.balanceOf(this.accountInfo).call(); + async getHAMWalletBalance() { + this.walletInfo["DAI"] = await this.contracts.ham.methods.balanceOf(this.accountInfo).call(); return this.walletInfo["DAI"] } diff --git a/yam-www/src/yam/lib/constants.js b/ham-www/src/ham/lib/constants.js similarity index 100% rename from yam-www/src/yam/lib/constants.js rename to ham-www/src/ham/lib/constants.js diff --git a/yam-www/src/yam/lib/contracts.js b/ham-www/src/ham/lib/contracts.js similarity index 86% rename from yam-www/src/yam/lib/contracts.js rename to ham-www/src/ham/lib/contracts.js index 2e55100..6b65c75 100644 --- a/yam-www/src/yam/lib/contracts.js +++ b/ham-www/src/ham/lib/contracts.js @@ -4,28 +4,28 @@ import * as Types from "./types.js"; import { SUBTRACT_GAS_LIMIT, addressMap } from './constants.js'; import ERC20Json from '../clean_build/contracts/IERC20.json'; -import YAMJson from '../clean_build/contracts/YAMDelegator.json'; -import YAMRebaserJson from '../clean_build/contracts/YAMRebaser.json'; -import YAMReservesJson from '../clean_build/contracts/YAMReserves.json'; -import YAMGovJson from '../clean_build/contracts/GovernorAlpha.json'; -import YAMTimelockJson from '../clean_build/contracts/Timelock.json'; +import HAMJson from '../clean_build/contracts/HAMDelegator.json'; +import HAMRebaserJson from '../clean_build/contracts/HAMRebaser.json'; +import HAMReservesJson from '../clean_build/contracts/HAMReserves.json'; +import HAMGovJson from '../clean_build/contracts/GovernorAlpha.json'; +import HAMTimelockJson from '../clean_build/contracts/Timelock.json'; import WETHJson from './weth.json'; import SNXJson from './snx.json'; import UNIFactJson from './unifact2.json'; import UNIPairJson from './uni2.json'; import UNIRouterJson from './uniR.json'; -import WETHPoolJson from '../clean_build/contracts/YAMETHPool.json'; -import AMPLPoolJson from '../clean_build/contracts/YAMAMPLPool.json'; -import YFIPoolJson from '../clean_build/contracts/YAMYFIPool.json'; +import WETHPoolJson from '../clean_build/contracts/HAMETHPool.json'; +import AMPLPoolJson from '../clean_build/contracts/HAMAMPLPool.json'; +import YFIPoolJson from '../clean_build/contracts/HAMYFIPool.json'; -import MKRPoolJson from '../clean_build/contracts/YAMMKRPool.json'; -import LENDPoolJson from '../clean_build/contracts/YAMLENDPool.json'; -import COMPPoolJson from '../clean_build/contracts/YAMCOMPPool.json'; -import SNXPoolJson from '../clean_build/contracts/YAMSNXPool.json'; -import LINKPoolJson from '../clean_build/contracts/YAMLINKPool.json'; +import MKRPoolJson from '../clean_build/contracts/HAMMKRPool.json'; +import LENDPoolJson from '../clean_build/contracts/HAMLENDPool.json'; +import COMPPoolJson from '../clean_build/contracts/HAMCOMPPool.json'; +import SNXPoolJson from '../clean_build/contracts/HAMSNXPool.json'; +import LINKPoolJson from '../clean_build/contracts/HAMLINKPool.json'; -import IncJson from '../clean_build/contracts/YAMIncentivizer.json'; +import IncJson from '../clean_build/contracts/HAMIncentivizer.json'; export class Contracts { constructor( @@ -47,7 +47,7 @@ export class Contracts { this.yfi = new this.web3.eth.Contract(ERC20Json.abi); this.UNIAmpl = new this.web3.eth.Contract(ERC20Json.abi); this.ycrv = new this.web3.eth.Contract(ERC20Json.abi); - this.yam = new this.web3.eth.Contract(YAMJson.abi); + this.ham = new this.web3.eth.Contract(HAMJson.abi); this.yfi_pool = new this.web3.eth.Contract(YFIPoolJson.abi); this.eth_pool = new this.web3.eth.Contract(WETHPoolJson.abi); @@ -71,10 +71,10 @@ export class Contracts { - this.rebaser = new this.web3.eth.Contract(YAMRebaserJson.abi); - this.reserves = new this.web3.eth.Contract(YAMReservesJson.abi); - this.gov = new this.web3.eth.Contract(YAMGovJson.abi); - this.timelock = new this.web3.eth.Contract(YAMTimelockJson.abi); + this.rebaser = new this.web3.eth.Contract(HAMRebaserJson.abi); + this.reserves = new this.web3.eth.Contract(HAMReservesJson.abi); + this.gov = new this.web3.eth.Contract(HAMGovJson.abi); + this.timelock = new this.web3.eth.Contract(HAMTimelockJson.abi); this.weth = new this.web3.eth.Contract(WETHJson); this.setProvider(provider, networkId); this.setDefaultAccount(this.web3.eth.defaultAccount); @@ -85,17 +85,17 @@ export class Contracts { provider, networkId ) { - this.yam.setProvider(provider); + this.ham.setProvider(provider); this.rebaser.setProvider(provider); this.reserves.setProvider(provider); this.gov.setProvider(provider); this.timelock.setProvider(provider); const contracts = [ - { contract: this.yam, json: YAMJson }, - { contract: this.rebaser, json: YAMRebaserJson }, - { contract: this.reserves, json: YAMReservesJson }, - { contract: this.gov, json: YAMGovJson }, - { contract: this.timelock, json: YAMTimelockJson }, + { contract: this.ham, json: HAMJson }, + { contract: this.rebaser, json: HAMRebaserJson }, + { contract: this.reserves, json: HAMReservesJson }, + { contract: this.gov, json: HAMGovJson }, + { contract: this.timelock, json: HAMTimelockJson }, { contract: this.ycrv_pool, json: IncJson }, { contract: this.eth_pool, json: WETHPoolJson }, { contract: this.yfi_pool, json: YFIPoolJson }, @@ -144,7 +144,7 @@ export class Contracts { ) { this.yfi.options.from = account; this.ycrv.options.from = account; - this.yam.options.from = account; + this.ham.options.from = account; this.weth.options.from = account; } diff --git a/yam-www/src/yam/lib/evm.js b/ham-www/src/ham/lib/evm.js similarity index 100% rename from yam-www/src/yam/lib/evm.js rename to ham-www/src/ham/lib/evm.js diff --git a/yam-www/src/yam/lib/snx.json b/ham-www/src/ham/lib/snx.json similarity index 100% rename from yam-www/src/yam/lib/snx.json rename to ham-www/src/ham/lib/snx.json diff --git a/yam-www/src/yam/lib/types.js b/ham-www/src/ham/lib/types.js similarity index 100% rename from yam-www/src/yam/lib/types.js rename to ham-www/src/ham/lib/types.js diff --git a/yam-www/src/yam/lib/uni.json b/ham-www/src/ham/lib/uni.json similarity index 100% rename from yam-www/src/yam/lib/uni.json rename to ham-www/src/ham/lib/uni.json diff --git a/yam-www/src/yam/lib/uni2.json b/ham-www/src/ham/lib/uni2.json similarity index 100% rename from yam-www/src/yam/lib/uni2.json rename to ham-www/src/ham/lib/uni2.json diff --git a/yam-www/src/yam/lib/uniR.json b/ham-www/src/ham/lib/uniR.json similarity index 100% rename from yam-www/src/yam/lib/uniR.json rename to ham-www/src/ham/lib/uniR.json diff --git a/yam-www/src/yam/lib/unifact2.json b/ham-www/src/ham/lib/unifact2.json similarity index 100% rename from yam-www/src/yam/lib/unifact2.json rename to ham-www/src/ham/lib/unifact2.json diff --git a/yam-www/src/yam/lib/weth.json b/ham-www/src/ham/lib/weth.json similarity index 100% rename from yam-www/src/yam/lib/weth.json rename to ham-www/src/ham/lib/weth.json diff --git a/yam-www/src/yam/lib/ycrv.json b/ham-www/src/ham/lib/ycrv.json similarity index 100% rename from yam-www/src/yam/lib/ycrv.json rename to ham-www/src/ham/lib/ycrv.json diff --git a/yam-www/src/yam/tests/EIP712.js b/ham-www/src/ham/tests/EIP712.js similarity index 100% rename from yam-www/src/yam/tests/EIP712.js rename to ham-www/src/ham/tests/EIP712.js diff --git a/ham-www/src/ham/tests/deployment.test.js b/ham-www/src/ham/tests/deployment.test.js new file mode 100644 index 0000000..8dbbda9 --- /dev/null +++ b/ham-www/src/ham/tests/deployment.test.js @@ -0,0 +1,157 @@ +import { + Ham +} from "../index.js"; +import * as Types from "../lib/types.js"; +import { + addressMap +} from "../lib/constants.js"; +import { + decimalToString, + stringToDecimal +} from "../lib/Helpers.js" + + +export const ham = new Ham( + "http://localhost:8545/", + // "http://127.0.0.1:9545/", + "1001", + true, { + defaultAccount: "", + defaultConfirmations: 1, + autoGasMultiplier: 1.5, + testing: false, + defaultGas: "6000000", + defaultGasPrice: "1000000000000", + accounts: [], + ethereumNodeTimeout: 10000 + } +) +const oneEther = 10 ** 18; + +describe("post-deployment", () => { + let snapshotId; + let user; + + beforeAll(async () => { + const accounts = await ham.web3.eth.getAccounts(); + ham.addAccount(accounts[0]); + user = accounts[0]; + snapshotId = await ham.testing.snapshot(); + }); + + beforeEach(async () => { + await ham.testing.resetEVM("0x2"); + }); + + describe("supply ownership", () => { + + test("owner balance", async () => { + let balance = await ham.contracts.ham.methods.balanceOf(user).call(); + expect(balance).toBe(ham.toBigN(7000000).times(ham.toBigN(10**18)).toString()) + }); + + test("pool balances", async () => { + let ycrv_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.ycrv_pool.options.address).call(); + + expect(ycrv_balance).toBe(ham.toBigN(1500000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let yfi_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.yfi_pool.options.address).call(); + + expect(yfi_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let ampl_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.ampl_pool.options.address).call(); + + expect(ampl_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let eth_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.eth_pool.options.address).call(); + + expect(eth_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let snx_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.snx_pool.options.address).call(); + + expect(snx_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let comp_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.comp_pool.options.address).call(); + + expect(comp_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let lend_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.lend_pool.options.address).call(); + + expect(lend_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let link_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.link_pool.options.address).call(); + + expect(link_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + let mkr_balance = await ham.contracts.ham.methods.balanceOf(ham.contracts.mkr_pool.options.address).call(); + + expect(mkr_balance).toBe(ham.toBigN(250000).times(ham.toBigN(10**18)).times(ham.toBigN(1)).toString()) + + }); + + test("total supply", async () => { + let ts = await ham.contracts.ham.methods.totalSupply().call(); + expect(ts).toBe("10500000000000000000000000") + }); + + test("init supply", async () => { + let init_s = await ham.contracts.ham.methods.initSupply().call(); + expect(init_s).toBe("10500000000000000000000000000000") + }); + }); + + describe("contract ownership", () => { + + test("ham gov", async () => { + let gov = await ham.contracts.ham.methods.gov().call(); + expect(gov).toBe(ham.contracts.timelock.options.address) + }); + + test("rebaser gov", async () => { + let gov = await ham.contracts.rebaser.methods.gov().call(); + expect(gov).toBe(ham.contracts.timelock.options.address) + }); + + test("reserves gov", async () => { + let gov = await ham.contracts.reserves.methods.gov().call(); + expect(gov).toBe(ham.contracts.timelock.options.address) + }); + + test("timelock admin", async () => { + let gov = await ham.contracts.timelock.methods.admin().call(); + expect(gov).toBe(ham.contracts.gov.options.address) + }); + + test("gov timelock", async () => { + let tl = await ham.contracts.gov.methods.timelock().call(); + expect(tl).toBe(ham.contracts.timelock.options.address) + }); + + test("gov guardian", async () => { + let grd = await ham.contracts.gov.methods.guardian().call(); + expect(grd).toBe("0x0000000000000000000000000000000000000000") + }); + + test("pool owner", async () => { + let owner = await ham.contracts.eth_pool.methods.owner().call(); + expect(owner).toBe(ham.contracts.timelock.options.address) + }); + + test("incentives owner", async () => { + let owner = await ham.contracts.ycrv_pool.methods.owner().call(); + expect(owner).toBe(ham.contracts.timelock.options.address) + }); + + test("pool rewarder", async () => { + let rewarder = await ham.contracts.eth_pool.methods.rewardDistribution().call(); + expect(rewarder).toBe(ham.contracts.timelock.options.address) + }); + }); + + describe("timelock delay initiated", () => { + test("timelock delay initiated", async () => { + let inited = await ham.contracts.timelock.methods.admin_initialized().call(); + expect(inited).toBe(true); + }) + }) +}) diff --git a/ham-www/src/ham/tests/distribution.test.js b/ham-www/src/ham/tests/distribution.test.js new file mode 100644 index 0000000..34a992b --- /dev/null +++ b/ham-www/src/ham/tests/distribution.test.js @@ -0,0 +1,1371 @@ +import { + Ham +} from "../index.js"; +import * as Types from "../lib/types.js"; +import { + addressMap +} from "../lib/constants.js"; +import { + decimalToString, + stringToDecimal +} from "../lib/Helpers.js" + + +export const ham = new Ham( + "http://localhost:8545/", + // "http://127.0.0.1:9545/", + "1001", + true, { + defaultAccount: "", + defaultConfirmations: 1, + autoGasMultiplier: 1.5, + testing: false, + defaultGas: "6000000", + defaultGasPrice: "1", + accounts: [], + ethereumNodeTimeout: 10000 + } +) +const oneEther = 10 ** 18; + +describe("Distribution", () => { + let snapshotId; + let user; + let user2; + let ycrv_account = "0x0eb4add4ba497357546da7f5d12d39587ca24606"; + let weth_account = "0xf9e11762d522ea29dd78178c9baf83b7b093aacc"; + let uni_ampl_account = "0x8c545be506a335e24145edd6e01d2754296ff018"; + let comp_account = "0xc89b6f0146642688bb254bf93c28fccf1e182c81"; + let lend_account = "0x3b08aa814bea604917418a9f0907e7fc430e742c"; + let link_account = "0xbe6977e08d4479c0a6777539ae0e8fa27be4e9d6"; + let mkr_account = "0xf37216a8ac034d08b4663108d7532dfcb44583ed"; + let snx_account = "0xb696d629cd0a00560151a434f6b4478ad6c228d7" + let yfi_account = "0x0eb4add4ba497357546da7f5d12d39587ca24606"; + beforeAll(async () => { + const accounts = await ham.web3.eth.getAccounts(); + ham.addAccount(accounts[0]); + user = accounts[0]; + ham.addAccount(accounts[1]); + user2 = accounts[1]; + snapshotId = await ham.testing.snapshot(); + }); + + beforeEach(async () => { + await ham.testing.resetEVM("0x2"); + }); + + describe("pool failures", () => { + test("cant join pool 1s early", async () => { + await ham.testing.resetEVM("0x2"); + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.eth_pool.methods.starttime().call(); + + expect(ham.toBigN(a["timestamp"]).toNumber()).toBeLessThan(ham.toBigN(starttime).toNumber()); + + //console.log("starttime", a["timestamp"], starttime); + await ham.contracts.weth.methods.approve(ham.contracts.eth_pool.options.address, -1).send({from: user}); + + await ham.testing.expectThrow( + ham.contracts.eth_pool.methods.stake( + ham.toBigN(200).times(ham.toBigN(10**18)).toString() + ).send({ + from: user, + gas: 300000 + }) + , "not start"); + + + a = await ham.web3.eth.getBlock('latest'); + + starttime = await ham.contracts.ampl_pool.methods.starttime().call(); + + expect(ham.toBigN(a["timestamp"]).toNumber()).toBeLessThan(ham.toBigN(starttime).toNumber()); + + //console.log("starttime", a["timestamp"], starttime); + + await ham.contracts.UNIAmpl.methods.approve(ham.contracts.ampl_pool.options.address, -1).send({from: user}); + + await ham.testing.expectThrow(ham.contracts.ampl_pool.methods.stake( + "5016536322915819" + ).send({ + from: user, + gas: 300000 + }), "not start"); + }); + + test("cant join pool 2 early", async () => { + + }); + + test("cant withdraw more than deposited", async () => { + await ham.testing.resetEVM("0x2"); + let a = await ham.web3.eth.getBlock('latest'); + + await ham.contracts.weth.methods.transfer(user, ham.toBigN(2000).times(ham.toBigN(10**18)).toString()).send({ + from: weth_account + }); + await ham.contracts.UNIAmpl.methods.transfer(user, "5000000000000000").send({ + from: uni_ampl_account + }); + + let starttime = await ham.contracts.eth_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } + + await ham.contracts.weth.methods.approve(ham.contracts.eth_pool.options.address, -1).send({from: user}); + + await ham.contracts.eth_pool.methods.stake( + ham.toBigN(200).times(ham.toBigN(10**18)).toString() + ).send({ + from: user, + gas: 300000 + }); + + await ham.contracts.UNIAmpl.methods.approve(ham.contracts.ampl_pool.options.address, -1).send({from: user}); + + await ham.contracts.ampl_pool.methods.stake( + "5000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + await ham.testing.expectThrow(ham.contracts.ampl_pool.methods.withdraw( + "5016536322915820" + ).send({ + from: user, + gas: 300000 + }), ""); + + await ham.testing.expectThrow(ham.contracts.eth_pool.methods.withdraw( + ham.toBigN(201).times(ham.toBigN(10**18)).toString() + ).send({ + from: user, + gas: 300000 + }), ""); + + }); + }); + + describe("incentivizer pool", () => { + test("joining and exiting", async() => { + await ham.testing.resetEVM("0x2"); + + await ham.contracts.ycrv.methods.transfer(user, "12000000000000000000000000").send({ + from: ycrv_account + }); + + await ham.contracts.weth.methods.transfer(user, ham.toBigN(2000).times(ham.toBigN(10**18)).toString()).send({ + from: weth_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.eth_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.weth.methods.approve(ham.contracts.eth_pool.options.address, -1).send({from: user}); + + await ham.contracts.eth_pool.methods.stake( + "2000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + let rr = await ham.contracts.eth_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(86400); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + console.log(earned, ysf, rpt); + + let j = await ham.contracts.eth_pool.methods.getReward().send({ + from: user, + gas: 300000 + }); + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + console.log("ham bal", ham_bal) + // start rebasing + //console.log("approve ham") + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + //console.log("approve ycrv") + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + let ycrv_bal = await ham.contracts.ycrv.methods.balanceOf(user).call() + + console.log("ycrv_bal bal", ycrv_bal) + + console.log("add liq/ create pool") + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + ham_bal, + ham_bal, + ham_bal, + ham_bal, + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + await ham.contracts.uni_pair.methods.approve( + ham.contracts.ycrv_pool.options.address, + -1 + ).send({ + from: user, + gas: 300000 + }); + + starttime = await ham.contracts.ycrv_pool.methods.starttime().call(); + + a = await ham.web3.eth.getBlock('latest'); + + waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry, pool 2", waittime) + } + + await ham.contracts.ycrv_pool.methods.stake(bal).send({from: user, gas: 400000}); + + + earned = await ham.contracts.ampl_pool.methods.earned(user).call(); + + rr = await ham.contracts.ampl_pool.methods.rewardRate().call(); + + rpt = await ham.contracts.ampl_pool.methods.rewardPerToken().call(); + + console.log(earned, rr, rpt); + + await ham.testing.increaseTime(625000 + 1000); + + earned = await ham.contracts.ampl_pool.methods.earned(user).call(); + + rr = await ham.contracts.ampl_pool.methods.rewardRate().call(); + + rpt = await ham.contracts.ampl_pool.methods.rewardPerToken().call(); + + console.log(earned, rr, rpt); + + await ham.contracts.ycrv_pool.methods.exit().send({from: user, gas: 400000}); + + ham_bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + + expect(ham.toBigN(ham_bal).toNumber()).toBeGreaterThan(0) + console.log("ham bal after staking in pool 2", ham_bal); + }); + }); + + describe("ampl", () => { + test("rewards from pool 1s ampl", async () => { + await ham.testing.resetEVM("0x2"); + + await ham.contracts.UNIAmpl.methods.transfer(user, "5000000000000000").send({ + from: uni_ampl_account + }); + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.eth_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + //console.log("missed entry"); + } + + await ham.contracts.UNIAmpl.methods.approve(ham.contracts.ampl_pool.options.address, -1).send({from: user}); + + await ham.contracts.ampl_pool.methods.stake( + "5000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.ampl_pool.methods.earned(user).call(); + + let rr = await ham.contracts.ampl_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.ampl_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.ampl_pool.methods.earned(user).call(); + + rpt = await ham.contracts.ampl_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.ampl_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + // let k = await ham.contracts.eth_pool.methods.exit().send({ + // from: user, + // gas: 300000 + // }); + // + // //console.log(k.events) + + // weth_bal = await ham.contracts.weth.methods.balanceOf(user).call() + + // expect(weth_bal).toBe(ham.toBigN(2000).times(ham.toBigN(10**18)).toString()) + + let ampl_bal = await ham.contracts.UNIAmpl.methods.balanceOf(user).call() + + expect(ampl_bal).toBe("5000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + }); + + describe("eth", () => { + test("rewards from pool 1s eth", async () => { + await ham.testing.resetEVM("0x2"); + + await ham.contracts.weth.methods.transfer(user, ham.toBigN(2000).times(ham.toBigN(10**18)).toString()).send({ + from: weth_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.eth_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.weth.methods.approve(ham.contracts.eth_pool.options.address, -1).send({from: user}); + + await ham.contracts.eth_pool.methods.stake( + "2000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + let rr = await ham.contracts.eth_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.eth_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + let weth_bal = await ham.contracts.weth.methods.balanceOf(user).call() + + expect(weth_bal).toBe("2000000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + test("rewards from pool 1s eth with rebase", async () => { + await ham.testing.resetEVM("0x2"); + + await ham.contracts.ycrv.methods.transfer(user, "12000000000000000000000000").send({ + from: ycrv_account + }); + + await ham.contracts.weth.methods.transfer(user, ham.toBigN(2000).times(ham.toBigN(10**18)).toString()).send({ + from: weth_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.eth_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.weth.methods.approve(ham.contracts.eth_pool.options.address, -1).send({from: user}); + + await ham.contracts.eth_pool.methods.stake( + "2000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + let rr = await ham.contracts.eth_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(125000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + + + let j = await ham.contracts.eth_pool.methods.getReward().send({ + from: user, + gas: 300000 + }); + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + console.log("ham bal", ham_bal) + // start rebasing + //console.log("approve ham") + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + //console.log("approve ycrv") + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + let ycrv_bal = await ham.contracts.ycrv.methods.balanceOf(user).call() + + console.log("ycrv_bal bal", ycrv_bal) + + console.log("add liq/ create pool") + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + ham_bal, + ham_bal, + ham_bal, + ham_bal, + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + //console.log("init swap") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + //console.log("swap 0") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + //console.log("init twap") + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + //console.log("first swap") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "1000000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + //console.log("second swap") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + await ham.testing.increaseTime(i); + + let r = await ham.contracts.uni_pair.methods.getReserves().call(); + let q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote pre positive rebase", q); + + let b = await ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }); + + let bal1 = await ham.contracts.ham.methods.balanceOf(user).call(); + + let resHAM = await ham.contracts.ham.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + let resycrv = await ham.contracts.ycrv.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + // new balance > old balance + expect(ham.toBigN(bal).toNumber()).toBeLessThan(ham.toBigN(bal1).toNumber()); + // increases reserves + expect(ham.toBigN(resycrv).toNumber()).toBeGreaterThan(0); + + r = await ham.contracts.uni_pair.methods.getReserves().call(); + q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote", q); + // not below peg + expect(ham.toBigN(q).toNumber()).toBeGreaterThan(ham.toBigN(10**18).toNumber()); + + + await ham.testing.increaseTime(525000 + 100); + + + j = await ham.contracts.eth_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + //console.log(j.events) + + let weth_bal = await ham.contracts.weth.methods.balanceOf(user).call() + + expect(weth_bal).toBe("2000000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect( + ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toNumber() + ).toBeGreaterThan(two_fity.toNumber()) + }); + test("rewards from pool 1s eth with negative rebase", async () => { + await ham.testing.resetEVM("0x2"); + + await ham.contracts.ycrv.methods.transfer(user, "12000000000000000000000000").send({ + from: ycrv_account + }); + + await ham.contracts.weth.methods.transfer(user, ham.toBigN(2000).times(ham.toBigN(10**18)).toString()).send({ + from: weth_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.eth_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.weth.methods.approve(ham.contracts.eth_pool.options.address, -1).send({from: user}); + + await ham.contracts.eth_pool.methods.stake( + "2000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + let rr = await ham.contracts.eth_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(125000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.eth_pool.methods.earned(user).call(); + + rpt = await ham.contracts.eth_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + + + let j = await ham.contracts.eth_pool.methods.getReward().send({ + from: user, + gas: 300000 + }); + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + console.log("ham bal", ham_bal) + // start rebasing + //console.log("approve ham") + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + //console.log("approve ycrv") + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + let ycrv_bal = await ham.contracts.ycrv.methods.balanceOf(user).call() + + console.log("ycrv_bal bal", ycrv_bal) + + ham_bal = ham.toBigN(ham_bal); + console.log("add liq/ create pool") + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + ham_bal.times(.1).toString(), + ham_bal.times(.1).toString(), + ham_bal.times(.1).toString(), + ham_bal.times(.1).toString(), + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + //console.log("init swap") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "1000000000000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + //console.log("swap 0") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + //console.log("init twap") + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + //console.log("first swap") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + //console.log("second swap") + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "1000000000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + await ham.testing.increaseTime(i); + + let r = await ham.contracts.uni_pair.methods.getReserves().call(); + let q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote pre positive rebase", q); + + let b = await ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }); + + let bal1 = await ham.contracts.ham.methods.balanceOf(user).call(); + + let resHAM = await ham.contracts.ham.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + let resycrv = await ham.contracts.ycrv.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + expect(ham.toBigN(bal1).toNumber()).toBeLessThan(ham.toBigN(bal).toNumber()); + expect(ham.toBigN(resycrv).toNumber()).toBe(0); + + r = await ham.contracts.uni_pair.methods.getReserves().call(); + q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote", q); + // not below peg + expect(ham.toBigN(q).toNumber()).toBeLessThan(ham.toBigN(10**18).toNumber()); + + + await ham.testing.increaseTime(525000 + 100); + + + j = await ham.contracts.eth_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + //console.log(j.events) + + let weth_bal = await ham.contracts.weth.methods.balanceOf(user).call() + + expect(weth_bal).toBe("2000000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect( + ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toNumber() + ).toBeLessThan(two_fity.toNumber()) + }); + }); + + describe("yfi", () => { + test("rewards from pool 1s yfi", async () => { + await ham.testing.resetEVM("0x2"); + await ham.contracts.yfi.methods.transfer(user, "500000000000000000000").send({ + from: yfi_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.yfi_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.yfi.methods.approve(ham.contracts.yfi_pool.options.address, -1).send({from: user}); + + await ham.contracts.yfi_pool.methods.stake( + "500000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.yfi_pool.methods.earned(user).call(); + + let rr = await ham.contracts.yfi_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.yfi_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.yfi_pool.methods.earned(user).call(); + + rpt = await ham.contracts.yfi_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.yfi_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + let weth_bal = await ham.contracts.yfi.methods.balanceOf(user).call() + + expect(weth_bal).toBe("500000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + }); + + describe("comp", () => { + test("rewards from pool 1s comp", async () => { + await ham.testing.resetEVM("0x2"); + await ham.contracts.comp.methods.transfer(user, "50000000000000000000000").send({ + from: comp_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.comp_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.comp.methods.approve(ham.contracts.comp_pool.options.address, -1).send({from: user}); + + await ham.contracts.comp_pool.methods.stake( + "50000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.comp_pool.methods.earned(user).call(); + + let rr = await ham.contracts.comp_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.comp_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.comp_pool.methods.earned(user).call(); + + rpt = await ham.contracts.comp_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.comp_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + let weth_bal = await ham.contracts.comp.methods.balanceOf(user).call() + + expect(weth_bal).toBe("50000000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + }); + + describe("lend", () => { + test("rewards from pool 1s lend", async () => { + await ham.testing.resetEVM("0x2"); + await ham.web3.eth.sendTransaction({from: user2, to: lend_account, value : ham.toBigN(100000*10**18).toString()}); + + await ham.contracts.lend.methods.transfer(user, "10000000000000000000000000").send({ + from: lend_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.lend_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.lend.methods.approve(ham.contracts.lend_pool.options.address, -1).send({from: user}); + + await ham.contracts.lend_pool.methods.stake( + "10000000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.lend_pool.methods.earned(user).call(); + + let rr = await ham.contracts.lend_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.lend_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.lend_pool.methods.earned(user).call(); + + rpt = await ham.contracts.lend_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.lend_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + let weth_bal = await ham.contracts.lend.methods.balanceOf(user).call() + + expect(weth_bal).toBe("10000000000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + }); + + describe("link", () => { + test("rewards from pool 1s link", async () => { + await ham.testing.resetEVM("0x2"); + + await ham.web3.eth.sendTransaction({from: user2, to: link_account, value : ham.toBigN(100000*10**18).toString()}); + + await ham.contracts.link.methods.transfer(user, "10000000000000000000000000").send({ + from: link_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.link_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.link.methods.approve(ham.contracts.link_pool.options.address, -1).send({from: user}); + + await ham.contracts.link_pool.methods.stake( + "10000000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.link_pool.methods.earned(user).call(); + + let rr = await ham.contracts.link_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.link_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.link_pool.methods.earned(user).call(); + + rpt = await ham.contracts.link_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.link_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + let weth_bal = await ham.contracts.link.methods.balanceOf(user).call() + + expect(weth_bal).toBe("10000000000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + }); + + describe("mkr", () => { + test("rewards from pool 1s mkr", async () => { + await ham.testing.resetEVM("0x2"); + await ham.web3.eth.sendTransaction({from: user2, to: mkr_account, value : ham.toBigN(100000*10**18).toString()}); + let eth_bal = await ham.web3.eth.getBalance(mkr_account); + + await ham.contracts.mkr.methods.transfer(user, "10000000000000000000000").send({ + from: mkr_account + }); + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.mkr_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.mkr.methods.approve(ham.contracts.mkr_pool.options.address, -1).send({from: user}); + + await ham.contracts.mkr_pool.methods.stake( + "10000000000000000000000" + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.mkr_pool.methods.earned(user).call(); + + let rr = await ham.contracts.mkr_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.mkr_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.mkr_pool.methods.earned(user).call(); + + rpt = await ham.contracts.mkr_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.mkr_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + let weth_bal = await ham.contracts.mkr.methods.balanceOf(user).call() + + expect(weth_bal).toBe("10000000000000000000000") + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + }); + + describe("snx", () => { + test("rewards from pool 1s snx", async () => { + await ham.testing.resetEVM("0x2"); + + await ham.web3.eth.sendTransaction({from: user2, to: snx_account, value : ham.toBigN(100000*10**18).toString()}); + + let snx_bal = await ham.contracts.snx.methods.balanceOf(snx_account).call(); + + console.log(snx_bal) + + await ham.contracts.snx.methods.transfer(user, snx_bal).send({ + from: snx_account + }); + + snx_bal = await ham.contracts.snx.methods.balanceOf(user).call(); + + console.log(snx_bal) + + let a = await ham.web3.eth.getBlock('latest'); + + let starttime = await ham.contracts.snx_pool.methods.starttime().call(); + + let waittime = starttime - a["timestamp"]; + if (waittime > 0) { + await ham.testing.increaseTime(waittime); + } else { + console.log("late entry", waittime) + } + + await ham.contracts.snx.methods.approve(ham.contracts.snx_pool.options.address, -1).send({from: user}); + + await ham.contracts.snx_pool.methods.stake( + snx_bal + ).send({ + from: user, + gas: 300000 + }); + + let earned = await ham.contracts.snx_pool.methods.earned(user).call(); + + let rr = await ham.contracts.snx_pool.methods.rewardRate().call(); + + let rpt = await ham.contracts.snx_pool.methods.rewardPerToken().call(); + //console.log(earned, rr, rpt); + await ham.testing.increaseTime(625000 + 100); + // await ham.testing.mineBlock(); + + earned = await ham.contracts.snx_pool.methods.earned(user).call(); + + rpt = await ham.contracts.snx_pool.methods.rewardPerToken().call(); + + let ysf = await ham.contracts.ham.methods.hamsScalingFactor().call(); + + //console.log(earned, ysf, rpt); + + + let ham_bal = await ham.contracts.ham.methods.balanceOf(user).call() + + let j = await ham.contracts.snx_pool.methods.exit().send({ + from: user, + gas: 300000 + }); + + //console.log(j.events) + + let weth_bal = await ham.contracts.snx.methods.balanceOf(user).call() + + expect(weth_bal).toBe(snx_bal) + + + let ham_bal2 = await ham.contracts.ham.methods.balanceOf(user).call() + + let two_fity = ham.toBigN(250).times(ham.toBigN(10**3)).times(ham.toBigN(10**18)) + expect(ham.toBigN(ham_bal2).minus(ham.toBigN(ham_bal)).toString()).toBe(two_fity.times(1).toString()) + }); + }); +}) diff --git a/yam-www/src/yam/tests/governance.test.js b/ham-www/src/ham/tests/governance.test.js similarity index 62% rename from yam-www/src/yam/tests/governance.test.js rename to ham-www/src/ham/tests/governance.test.js index 53fd9ad..a6f7cc2 100644 --- a/yam-www/src/yam/tests/governance.test.js +++ b/ham-www/src/ham/tests/governance.test.js @@ -1,5 +1,5 @@ import { - Yam + Ham } from "../index.js"; import * as Types from "../lib/types.js"; import { @@ -16,7 +16,7 @@ const ethUtil = require('ethereumjs-util'); // const ethUtil = require('ethereumjs-util'); -export const yam = new Yam( +export const ham = new Ham( "http://localhost:8545/", // "http://127.0.0.1:9545/", "1001", @@ -36,8 +36,8 @@ const oneEther = 10 ** 18; const EIP712 = require('./EIP712.js'); -describe('YAM governance', () => { - let name = "YAM"; +describe('HAM governance', () => { + let name = "HAM"; let chainId = 1001; let snapshotId; let user; @@ -48,17 +48,17 @@ describe('YAM governance', () => { beforeAll(async () => { - const accounts = await yam.web3.eth.getAccounts(); - yam.addAccount(accounts[0]); + const accounts = await ham.web3.eth.getAccounts(); + ham.addAccount(accounts[0]); user = accounts[0]; a1 = accounts[1]; a2 = accounts[2]; guy = accounts[3]; - snapshotId = await yam.testing.snapshot(); + snapshotId = await ham.testing.snapshot(); }); beforeEach(async () => { - await yam.testing.resetEVM("0x2"); + await ham.testing.resetEVM("0x2"); }); describe('delegateBySig', () => { @@ -69,7 +69,7 @@ describe('YAM governance', () => { const pvk_a1 = "0x5d862464fe9303452126c8bc94274b8c5f9874cbd219789b3eb2128075a76f72"; test('reverts if the signatory is invalid', async () => { const delegatee = user, nonce = 0, expiry = 0; - await yam.testing.expectThrow(yam.contracts.yam.methods.delegateBySig(delegatee, nonce, expiry, 0, '0xbad', '0xbad').send({from: a1}), "YAM::delegateBySig: invalid signature"); + await ham.testing.expectThrow(ham.contracts.ham.methods.delegateBySig(delegatee, nonce, expiry, 0, '0xbad', '0xbad').send({from: a1}), "HAM::delegateBySig: invalid signature"); }); test('reverts if the nonce is bad ', async () => { @@ -91,7 +91,7 @@ describe('YAM governance', () => { }, primaryType: 'Delegation', domain: { - name: 'YAM', + name: 'HAM', chainId: 1, // since we are using --fork, it respects that chainID verifyingContract: '0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A', }, @@ -108,7 +108,7 @@ describe('YAM governance', () => { // const encoded = EIP712.signer.encodeMessageData(delegation.types, delegation.primaryType, delegation.message); - await yam.testing.expectThrow(yam.contracts.yam.methods.delegateBySig(user, 1, 0, sig.v, sig.r, sig.s).send({from: a1}), "YAM::delegateBySig: invalid nonce"); + await ham.testing.expectThrow(ham.contracts.ham.methods.delegateBySig(user, 1, 0, sig.v, sig.r, sig.s).send({from: a1}), "HAM::delegateBySig: invalid nonce"); }); test('reverts if the signature has expired', async () => { @@ -130,7 +130,7 @@ describe('YAM governance', () => { }, primaryType: 'Delegation', domain: { - name: 'YAM', + name: 'HAM', chainId: 1, verifyingContract: '0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A', }, @@ -145,7 +145,7 @@ describe('YAM governance', () => { const sig = ethUtil.ecsign(ethUtil.toBuffer(sigHash, 'hex'), ethUtil.toBuffer(pvk_a1, 'hex')); - await yam.testing.expectThrow(yam.contracts.yam.methods.delegateBySig(user, 0, 0, sig.v, sig.r, sig.s).send({from: a1}), "YAM::delegateBySig: signature expired"); + await ham.testing.expectThrow(ham.contracts.ham.methods.delegateBySig(user, 0, 0, sig.v, sig.r, sig.s).send({from: a1}), "HAM::delegateBySig: signature expired"); }); test('delegates on behalf of the signatory', async () => { @@ -165,7 +165,7 @@ describe('YAM governance', () => { }, primaryType: 'Delegation', domain: { - name: 'YAM', + name: 'HAM', chainId: 1, verifyingContract: '0x4BC6657283f8f24e27EAc1D21D1deE566C534A9A', }, @@ -179,19 +179,19 @@ describe('YAM governance', () => { let sigHash = EIP712.encodeTypedData(typedData) const sig = ethUtil.ecsign(ethUtil.toBuffer(sigHash, 'hex'), ethUtil.toBuffer(pvk_a1, 'hex')); - let tx = await yam.contracts.yam.methods.delegateBySig(user, 0, 10e9, sig.v, sig.r, sig.s).send({from: a1, gas: 500000}); + let tx = await ham.contracts.ham.methods.delegateBySig(user, 0, 10e9, sig.v, sig.r, sig.s).send({from: a1, gas: 500000}); expect(tx.gasUsed < 80000); - let k = await yam.contracts.yam.methods.delegates(a1).call(); - let j = await yam.contracts.yam.methods.delegates(user).call(); + let k = await ham.contracts.ham.methods.delegates(a1).call(); + let j = await ham.contracts.ham.methods.delegates(user).call(); expect(k).toBe(user); }); test('delegate', async () => { - let d = await yam.contracts.yam.methods.delegates(a1).call() + let d = await ham.contracts.ham.methods.delegates(a1).call() expect(d).toBe("0x0000000000000000000000000000000000000000"); - let tx = await yam.contracts.yam.methods.delegate(user).send({from: a1});; + let tx = await ham.contracts.ham.methods.delegate(user).send({from: a1});; expect(tx.gasUsed < 80000); - let k = await yam.contracts.yam.methods.delegates(a1).call(); + let k = await ham.contracts.ham.methods.delegates(a1).call(); expect(k).toBe(user); }); }); @@ -199,40 +199,40 @@ describe('YAM governance', () => { describe('numCheckpoints', () => { it('returns the number of checkpoints for a delegate', async () => { - let one_hundred = yam.toBigN(100).times(yam.toBigN(10**18)); - await yam.contracts.yam.methods.transfer(guy, one_hundred.toString()).send({from: user}); - let nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + let one_hundred = ham.toBigN(100).times(ham.toBigN(10**18)); + await ham.contracts.ham.methods.transfer(guy, one_hundred.toString()).send({from: user}); + let nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('0'); - await yam.contracts.yam.methods.delegate(a1).send({from: guy}); - nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + await ham.contracts.ham.methods.delegate(a1).send({from: guy}); + nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('1'); - await yam.contracts.yam.methods.transfer(a2, one_hundred.minus(one_hundred.times(.9)).toString()).send({from: guy}); - nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + await ham.contracts.ham.methods.transfer(a2, one_hundred.minus(one_hundred.times(.9)).toString()).send({from: guy}); + nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('2'); - await yam.contracts.yam.methods.transfer(a2, one_hundred.minus(one_hundred.times(.9)).toString()).send({from: guy}); - nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + await ham.contracts.ham.methods.transfer(a2, one_hundred.minus(one_hundred.times(.9)).toString()).send({from: guy}); + nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('3'); - await yam.contracts.yam.methods.transfer(guy, one_hundred.minus(one_hundred.times(.8)).toString()).send({from: user}); - nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + await ham.contracts.ham.methods.transfer(guy, one_hundred.minus(one_hundred.times(.8)).toString()).send({from: user}); + nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('4'); - let cs = await yam.contracts.yam.methods.checkpoints(a1, 0).call(); + let cs = await ham.contracts.ham.methods.checkpoints(a1, 0).call(); expect(cs.votes).toBe("100000000000000000000000000"); // 100 * 1e24 - cs = await yam.contracts.yam.methods.checkpoints(a1, 1).call(); + cs = await ham.contracts.ham.methods.checkpoints(a1, 1).call(); expect(cs.votes).toBe("90000000000000000000000000"); // 90 * 1e24 - cs = await yam.contracts.yam.methods.checkpoints(a1, 2).call(); + cs = await ham.contracts.ham.methods.checkpoints(a1, 2).call(); expect(cs.votes).toBe("80000000000000000000000000"); // 90 * 1e24 - cs = await yam.contracts.yam.methods.checkpoints(a1, 3).call(); + cs = await ham.contracts.ham.methods.checkpoints(a1, 3).call(); expect(cs.votes).toBe("100000000000000000000000000"); // 90 * 1e24 }); @@ -240,18 +240,18 @@ describe('YAM governance', () => { // For this test to pass, you must enable blocktimes. it will fail otherwise - let one_hundred = yam.toBigN(100).times(yam.toBigN(10**18)); - await yam.contracts.yam.methods.transfer(guy, one_hundred.toString()).send({from: user}); - let nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + let one_hundred = ham.toBigN(100).times(ham.toBigN(10**18)); + await ham.contracts.ham.methods.transfer(guy, one_hundred.toString()).send({from: user}); + let nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('0'); - await yam.testing.stopMining(); + await ham.testing.stopMining(); - let t1 = yam.contracts.yam.methods.delegate(a1).send({from: guy}); - let t2 = yam.contracts.yam.methods.transfer(a2, yam.toBigN(100).times(yam.toBigN(10**18)).times(.1).toString()).send({from: guy}); - let t3 = yam.contracts.yam.methods.transfer(a2, yam.toBigN(100).times(yam.toBigN(10**18)).times(.1).toString()).send({from: guy}); + let t1 = ham.contracts.ham.methods.delegate(a1).send({from: guy}); + let t2 = ham.contracts.ham.methods.transfer(a2, ham.toBigN(100).times(ham.toBigN(10**18)).times(.1).toString()).send({from: guy}); + let t3 = ham.contracts.ham.methods.transfer(a2, ham.toBigN(100).times(ham.toBigN(10**18)).times(.1).toString()).send({from: guy}); - await yam.testing.startMining(); + await ham.testing.startMining(); t1 = await t1; t2 = await t2; t3 = await t3; @@ -261,25 +261,25 @@ describe('YAM governance', () => { return; } - nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('1'); - let cs = await yam.contracts.yam.methods.checkpoints(a1, 0).call(); + let cs = await ham.contracts.ham.methods.checkpoints(a1, 0).call(); expect(cs.votes).toBe("80000000000000000000000000"); // 80 * 1e24 - cs = await yam.contracts.yam.methods.checkpoints(a1, 1).call(); + cs = await ham.contracts.ham.methods.checkpoints(a1, 1).call(); expect(cs.votes).toBe("0"); // 0 - cs = await yam.contracts.yam.methods.checkpoints(a1, 2).call(); + cs = await ham.contracts.ham.methods.checkpoints(a1, 2).call(); expect(cs.votes).toBe("0"); // 0 - let t4 = await yam.contracts.yam.methods.transfer(guy, yam.toBigN(100).times(yam.toBigN(10**18)).times(.2).toString()).send({from: user}); + let t4 = await ham.contracts.ham.methods.transfer(guy, ham.toBigN(100).times(ham.toBigN(10**18)).times(.2).toString()).send({from: user}); - nc = await yam.contracts.yam.methods.numCheckpoints(a1).call(); + nc = await ham.contracts.ham.methods.numCheckpoints(a1).call(); expect(nc).toBe('2'); - cs = await yam.contracts.yam.methods.checkpoints(a1, 1).call(); + cs = await ham.contracts.ham.methods.checkpoints(a1, 1).call(); expect(cs.votes).toBe("100000000000000000000000000"); // 0 }); @@ -287,85 +287,85 @@ describe('YAM governance', () => { describe('getPriorVotes', () => { test('reverts if block number >= current block', async () => { - await yam.testing.expectThrow( - yam.contracts.yam.methods.getPriorVotes(a1, 5e10).call(), - "YAM::getPriorVotes: not yet determined" + await ham.testing.expectThrow( + ham.contracts.ham.methods.getPriorVotes(a1, 5e10).call(), + "HAM::getPriorVotes: not yet determined" ) }); test('returns 0 if there are no checkpoints', async () => { - let pv = await yam.contracts.yam.methods.getPriorVotes(a1, 0).call(); + let pv = await ham.contracts.ham.methods.getPriorVotes(a1, 0).call(); expect(pv).toBe('0'); }); test('returns the latest block if >= last checkpoint block', async () => { - let t1 = await yam.contracts.yam.methods.delegate(a1).send({from: user}); - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); + let t1 = await ham.contracts.ham.methods.delegate(a1).send({from: user}); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); - let pv = await yam.contracts.yam.methods.getPriorVotes(a1, t1.blockNumber).call(); + let pv = await ham.contracts.ham.methods.getPriorVotes(a1, t1.blockNumber).call(); expect(pv).toBe('7000000000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t1.blockNumber + 1).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t1.blockNumber + 1).call(); expect(pv).toBe('7000000000000000000000000000000'); }); test('returns zero if < first checkpoint block', async () => { - await yam.testing.mineBlock(); - let t1 = await yam.contracts.yam.methods.delegate(a1).send({from: user}); - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); + await ham.testing.mineBlock(); + let t1 = await ham.contracts.ham.methods.delegate(a1).send({from: user}); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); - let pv = await yam.contracts.yam.methods.getPriorVotes(a1, t1.blockNumber - 1).call(); + let pv = await ham.contracts.ham.methods.getPriorVotes(a1, t1.blockNumber - 1).call(); expect(pv).toBe('0'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t1.blockNumber + 1).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t1.blockNumber + 1).call(); expect(pv).toBe('7000000000000000000000000000000'); }); it('generally returns the voting balance at the appropriate checkpoint', async () => { - let one_hundred = yam.toBigN(100).times(yam.toBigN(10**18)); - await yam.contracts.yam.methods.transfer(guy, one_hundred.toString()).send({from: user}); - - let t1 = await yam.contracts.yam.methods.delegate(a1).send({from: guy}); - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); - let t2 = await yam.contracts.yam.methods.transfer(a2, yam.toBigN(100).times(yam.toBigN(10**18)).times(.1).toString()).send({from: guy}); - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); - let t3 = await yam.contracts.yam.methods.transfer(a2, yam.toBigN(100).times(yam.toBigN(10**18)).times(.1).toString()).send({from: guy}); - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); - let t4 = await yam.contracts.yam.methods.transfer(guy, yam.toBigN(100).times(yam.toBigN(10**18)).times(.2).toString()).send({from: a2}); - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); - - - let pv = await yam.contracts.yam.methods.getPriorVotes(a1, t1.blockNumber - 1).call(); + let one_hundred = ham.toBigN(100).times(ham.toBigN(10**18)); + await ham.contracts.ham.methods.transfer(guy, one_hundred.toString()).send({from: user}); + + let t1 = await ham.contracts.ham.methods.delegate(a1).send({from: guy}); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); + let t2 = await ham.contracts.ham.methods.transfer(a2, ham.toBigN(100).times(ham.toBigN(10**18)).times(.1).toString()).send({from: guy}); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); + let t3 = await ham.contracts.ham.methods.transfer(a2, ham.toBigN(100).times(ham.toBigN(10**18)).times(.1).toString()).send({from: guy}); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); + let t4 = await ham.contracts.ham.methods.transfer(guy, ham.toBigN(100).times(ham.toBigN(10**18)).times(.2).toString()).send({from: a2}); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); + + + let pv = await ham.contracts.ham.methods.getPriorVotes(a1, t1.blockNumber - 1).call(); expect(pv).toBe('0'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t1.blockNumber).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t1.blockNumber).call(); expect(pv).toBe('100000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t1.blockNumber + 1).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t1.blockNumber + 1).call(); expect(pv).toBe('100000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t2.blockNumber).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t2.blockNumber).call(); expect(pv).toBe('90000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t2.blockNumber + 1).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t2.blockNumber + 1).call(); expect(pv).toBe('90000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t3.blockNumber).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t3.blockNumber).call(); expect(pv).toBe('80000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t3.blockNumber + 1).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t3.blockNumber + 1).call(); expect(pv).toBe('80000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t4.blockNumber).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t4.blockNumber).call(); expect(pv).toBe('100000000000000000000000000'); - pv = await yam.contracts.yam.methods.getPriorVotes(a1, t4.blockNumber + 1).call(); + pv = await ham.contracts.ham.methods.getPriorVotes(a1, t4.blockNumber + 1).call(); expect(pv).toBe('100000000000000000000000000'); }); }); diff --git a/yam-www/src/yam/tests/governorAlpha.test.js b/ham-www/src/ham/tests/governorAlpha.test.js similarity index 63% rename from yam-www/src/yam/tests/governorAlpha.test.js rename to ham-www/src/ham/tests/governorAlpha.test.js index f986999..bdd0733 100644 --- a/yam-www/src/yam/tests/governorAlpha.test.js +++ b/ham-www/src/ham/tests/governorAlpha.test.js @@ -1,5 +1,5 @@ import { - Yam + Ham } from "../index.js"; import * as Types from "../lib/types.js"; import { @@ -13,11 +13,11 @@ import { const ethUtil = require('ethereumjs-util'); async function enfranchise(actor, amount, user) { - await yam.contracts.yam.methods.transfer(actor, amount.toString()).send({from: user}); - await yam.contracts.yam.methods.delegate(actor).send({from: actor}); + await ham.contracts.ham.methods.transfer(actor, amount.toString()).send({from: user}); + await ham.contracts.ham.methods.delegate(actor).send({from: actor}); } -export const yam = new Yam( +export const ham = new Ham( "http://localhost:8545/", // "http://127.0.0.1:9545/", "1001", @@ -37,7 +37,7 @@ const oneEther = 10 ** 18; const EIP712 = require('./EIP712'); describe("governorAlpha#castVote/2", () => { - let name = "YAM"; + let name = "HAM"; let chainId = 1001; let snapshotId; let user; @@ -57,48 +57,48 @@ describe("governorAlpha#castVote/2", () => { const pvk_a3 = "0x752dd9cf65e68cfaba7d60225cbdbc1f4729dd5e5507def72815ed0d8abc6249"; const pvk_a4 = "0xefb595a0178eb79a8df953f87c5148402a224cdf725e88c0146727c6aceadccd"; beforeAll(async () => { - await yam.testing.resetEVM("0x2"); - accounts = await yam.web3.eth.getAccounts(); - yam.addAccount(accounts[0]); + await ham.testing.resetEVM("0x2"); + accounts = await ham.web3.eth.getAccounts(); + ham.addAccount(accounts[0]); user = accounts[0]; a1 = accounts[1]; a2 = accounts[2]; guy = accounts[3]; a3 = accounts[4]; a4 = accounts[5]; - let one_hundred = yam.toBigN(100).times(yam.toBigN(10**18)); - // await yam.contracts.yam.methods.transfer(guy, one_hundred.toString()).send({from: user}); + let one_hundred = ham.toBigN(100).times(ham.toBigN(10**18)); + // await ham.contracts.ham.methods.transfer(guy, one_hundred.toString()).send({from: user}); - snapshotId = await yam.testing.snapshot(); + snapshotId = await ham.testing.snapshot(); targets = [a1]; values = ["0"]; signatures = ["getBalanceOf(address)"]; - callDatas = [yam.web3.eth.abi.encodeParameters(['address'], [a1])]; + callDatas = [ham.web3.eth.abi.encodeParameters(['address'], [a1])]; }); beforeEach(async () => { - await yam.testing.resetEVM("0x2"); - await yam.contracts.yam.methods.delegate(a1).send({from: user, gas: 400000}); - await yam.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({from: a1, gas: 400000}); - proposalId = await yam.contracts.gov.methods.latestProposalIds(a1).call(); + await ham.testing.resetEVM("0x2"); + await ham.contracts.ham.methods.delegate(a1).send({from: user, gas: 400000}); + await ham.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({from: a1, gas: 400000}); + proposalId = await ham.contracts.gov.methods.latestProposalIds(a1).call(); }); describe("We must revert if:", () => { it("There does not exist a proposal with matching proposal id where the current block number is between the proposal's start block (exclusive) and end block (inclusive)", async () => { - await yam.testing.expectThrow( - yam.contracts.gov.methods.castVote(proposalId, true).call(), + await ham.testing.expectThrow( + ham.contracts.gov.methods.castVote(proposalId, true).call(), "GovernorAlpha::_castVote: voting is closed" ); }); test("Such proposal already has an entry in its voters set matching the sender", async () => { - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); - await yam.contracts.gov.methods.castVote(proposalId, true).send({from: accounts[4]}); - await yam.testing.expectThrow( - yam.contracts.gov.methods.castVote(proposalId, true).call({ from: accounts[4] }), + await ham.contracts.gov.methods.castVote(proposalId, true).send({from: accounts[4]}); + await ham.testing.expectThrow( + ham.contracts.gov.methods.castVote(proposalId, true).call({ from: accounts[4] }), "GovernorAlpha::_castVote: voter already voted" ); }); @@ -106,13 +106,13 @@ describe("governorAlpha#castVote/2", () => { describe("Otherwise", () => { it("we add the sender to the proposal's voters set", async () => { - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); - let r = await yam.contracts.gov.methods.getReceipt(proposalId, accounts[2]).call(); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); + let r = await ham.contracts.gov.methods.getReceipt(proposalId, accounts[2]).call(); expect(r.hasVoted).toBe(false); - await yam.contracts.gov.methods.castVote(proposalId, true).send({from: accounts[2]}); - r = await yam.contracts.gov.methods.getReceipt(proposalId, accounts[2]).call(); + await ham.contracts.gov.methods.castVote(proposalId, true).send({from: accounts[2]}); + r = await ham.contracts.gov.methods.getReceipt(proposalId, accounts[2]).call(); expect(r.hasVoted).toBe(true); }); @@ -120,39 +120,39 @@ describe("governorAlpha#castVote/2", () => { let actor; // an account that will propose, receive tokens, delegate to self, and vote on own proposal test("and we add that ForVotes", async () => { - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); actor = a2; - await enfranchise(actor, yam.toBigN(400001).times(10**18), user); + await enfranchise(actor, ham.toBigN(400001).times(10**18), user); - await yam.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({from: actor, gas: 400000}); + await ham.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({from: actor, gas: 400000}); - proposalId = await yam.contracts.gov.methods.latestProposalIds(actor).call(); + proposalId = await ham.contracts.gov.methods.latestProposalIds(actor).call(); - let beforeFors = (await yam.contracts.gov.methods.proposals(proposalId).call()).forVotes; - await yam.testing.mineBlock(); - await yam.contracts.gov.methods.castVote(proposalId, true).send({ from: actor }); + let beforeFors = (await ham.contracts.gov.methods.proposals(proposalId).call()).forVotes; + await ham.testing.mineBlock(); + await ham.contracts.gov.methods.castVote(proposalId, true).send({ from: actor }); - let afterFors = (await yam.contracts.gov.methods.proposals(proposalId).call()).forVotes; - expect(yam.toBigN(afterFors).toString()).toBe(yam.toBigN(beforeFors).plus(yam.toBigN(400001).times(10**24)).toString()); + let afterFors = (await ham.contracts.gov.methods.proposals(proposalId).call()).forVotes; + expect(ham.toBigN(afterFors).toString()).toBe(ham.toBigN(beforeFors).plus(ham.toBigN(400001).times(10**24)).toString()); }) test("or AgainstVotes corresponding to the caller's support flag.", async () => { - await yam.testing.mineBlock(); - await yam.testing.mineBlock(); + await ham.testing.mineBlock(); + await ham.testing.mineBlock(); actor = accounts[4]; - await enfranchise(actor, yam.toBigN(400001).times(10**18), user); + await enfranchise(actor, ham.toBigN(400001).times(10**18), user); - await yam.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({from: actor, gas: 400000}); + await ham.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({from: actor, gas: 400000}); - proposalId = await yam.contracts.gov.methods.latestProposalIds(actor).call(); + proposalId = await ham.contracts.gov.methods.latestProposalIds(actor).call(); - let beforeFors = (await yam.contracts.gov.methods.proposals(proposalId).call()).againstVotes; - await yam.testing.mineBlock(); - await yam.contracts.gov.methods.castVote(proposalId, false).send({ from: actor }); + let beforeFors = (await ham.contracts.gov.methods.proposals(proposalId).call()).againstVotes; + await ham.testing.mineBlock(); + await ham.contracts.gov.methods.castVote(proposalId, false).send({ from: actor }); - let afterFors = (await yam.contracts.gov.methods.proposals(proposalId).call()).againstVotes; - expect(yam.toBigN(afterFors).toString()).toBe(yam.toBigN(beforeFors).plus(yam.toBigN(400001).times(10**24)).toString()); + let afterFors = (await ham.contracts.gov.methods.proposals(proposalId).call()).againstVotes; + expect(ham.toBigN(afterFors).toString()).toBe(ham.toBigN(beforeFors).plus(ham.toBigN(400001).times(10**24)).toString()); }); }); @@ -173,9 +173,9 @@ describe("governorAlpha#castVote/2", () => { }, primaryType: 'Ballot', domain: { - name: 'YAM Governor Alpha', + name: 'HAM Governor Alpha', chainId: 1, - verifyingContract: yam.contracts.gov.options.address, + verifyingContract: ham.contracts.gov.options.address, }, message: { proposalId: proposalId, @@ -186,8 +186,8 @@ describe("governorAlpha#castVote/2", () => { let sigHash = EIP712.encodeTypedData(typedData) const sig = ethUtil.ecsign(ethUtil.toBuffer(sigHash, 'hex'), ethUtil.toBuffer(pvk_a1, 'hex')); - await yam.testing.expectThrow( - yam.contracts.gov.methods.castVoteBySig(proposalId, false, 0, '0xbad', '0xbad').send({from: user}), + await ham.testing.expectThrow( + ham.contracts.gov.methods.castVoteBySig(proposalId, false, 0, '0xbad', '0xbad').send({from: user}), "GovernorAlpha::castVoteBySig: invalid signature" ); }); @@ -195,9 +195,9 @@ describe("governorAlpha#castVote/2", () => { it('casts vote on behalf of the signatory', async () => { - await enfranchise(a4, yam.toBigN(400001).times(10**18), user); - await yam.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({ from: a4, gas: 400000 }); - proposalId = await yam.contracts.gov.methods.latestProposalIds(a4).call(); + await enfranchise(a4, ham.toBigN(400001).times(10**18), user); + await ham.contracts.gov.methods.propose(targets, values, signatures, callDatas, "do nothing").send({ from: a4, gas: 400000 }); + proposalId = await ham.contracts.gov.methods.latestProposalIds(a4).call(); const typedData = { types: { @@ -213,7 +213,7 @@ describe("governorAlpha#castVote/2", () => { }, primaryType: 'Ballot', domain: { - name: 'YAM Governor Alpha', + name: 'HAM Governor Alpha', chainId: 1, verifyingContract: "0x47Ff9D00cDAE31B4E09DEf8081bb3a1282e8061D", }, @@ -226,14 +226,14 @@ describe("governorAlpha#castVote/2", () => { let sigHash = EIP712.encodeTypedData(typedData) const sig = ethUtil.ecsign(ethUtil.toBuffer(sigHash, 'hex'), ethUtil.toBuffer(pvk_a4, 'hex')); - let beforeFors = (await yam.contracts.gov.methods.proposals(proposalId).call()).forVotes; - await yam.testing.mineBlock(); - const tx = await yam.contracts.gov.methods.castVoteBySig(proposalId, true, sig.v, sig.r, sig.s).send({from: a4, gas: 100000}); + let beforeFors = (await ham.contracts.gov.methods.proposals(proposalId).call()).forVotes; + await ham.testing.mineBlock(); + const tx = await ham.contracts.gov.methods.castVoteBySig(proposalId, true, sig.v, sig.r, sig.s).send({from: a4, gas: 100000}); console.log(tx.events) expect(tx.gasUsed < 80000); - let afterFors = (await yam.contracts.gov.methods.proposals(proposalId).call()).forVotes; - expect(yam.toBigN(afterFors).toString()).toBe(yam.toBigN(beforeFors).plus(yam.toBigN(400001).times(10**24)).toString()); + let afterFors = (await ham.contracts.gov.methods.proposals(proposalId).call()).forVotes; + expect(ham.toBigN(afterFors).toString()).toBe(ham.toBigN(beforeFors).plus(ham.toBigN(400001).times(10**24)).toString()); }); }); }); diff --git a/ham-www/src/ham/tests/rebase.test.js b/ham-www/src/ham/tests/rebase.test.js new file mode 100644 index 0000000..fadc268 --- /dev/null +++ b/ham-www/src/ham/tests/rebase.test.js @@ -0,0 +1,1233 @@ +import { + Ham +} from "../index.js"; +import * as Types from "../lib/types.js"; +import { + addressMap +} from "../lib/constants.js"; +import { + decimalToString, + stringToDecimal +} from "../lib/Helpers.js" + + +export const ham = new Ham( + "http://localhost:8545/", + // "http://127.0.0.1:9545/", + "1001", + true, { + defaultAccount: "", + defaultConfirmations: 1, + autoGasMultiplier: 1.5, + testing: false, + defaultGas: "6000000", + defaultGasPrice: "1000000000000", + accounts: [], + ethereumNodeTimeout: 10000 + } +) +const oneEther = 10 ** 18; + +describe("rebase_tests", () => { + let snapshotId; + let user; + let new_user; + // let unlocked_account = "0x0eb4add4ba497357546da7f5d12d39587ca24606"; + let unlocked_account = "0x681148725731f213b0187a3cbef215c291d85a3e"; + + beforeAll(async () => { + const accounts = await ham.web3.eth.getAccounts(); + ham.addAccount(accounts[0]); + user = accounts[0]; + new_user = accounts[1]; + snapshotId = await ham.testing.snapshot(); + }); + + beforeEach(async () => { + await ham.testing.resetEVM("0x2"); + let a = await ham.contracts.ycrv.methods.transfer(user, "2000000000000000000000000").send({ + from: unlocked_account + }); + }); + + describe("rebase", () => { + test("user has ycrv", async () => { + let bal0 = await ham.contracts.ycrv.methods.balanceOf(user).call(); + expect(bal0).toBe("2000000000000000000000000"); + }); + test("create pair", async () => { + await ham.contracts.uni_fact.methods.createPair( + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ).send({ + from: user, + gas: 8000000 + }) + }); + test("mint pair", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + 10000000, + 10000000, + 10000000, + 10000000, + user, + 1596740361 + 100000000 + ).send({ + from: user, + gas: 8000000 + }); + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + expect(ham.toBigN(bal).toNumber()).toBeGreaterThan(100) + }); + test("init_twap", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + 100000, + 100000, + 100000, + 100000, + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + 1000, + 100, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(1000); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + let priceCumulativeLast = await ham.contracts.rebaser.methods.priceCumulativeLast().call(); + expect(ham.toBigN(init_twap).toNumber()).toBeGreaterThan(0); + expect(ham.toBigN(priceCumulativeLast).toNumber()).toBeGreaterThan(0); + }); + test("activate rebasing", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + 100000, + 100000, + 100000, + 100000, + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + 1000, + 100, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(1000); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + let priceCumulativeLast = await ham.contracts.rebaser.methods.priceCumulativeLast().call(); + expect(ham.toBigN(init_twap).toNumber()).toBeGreaterThan(0); + expect(ham.toBigN(priceCumulativeLast).toNumber()).toBeGreaterThan(0); + + await ham.testing.increaseTime(12 * 60 * 60); + + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + }); + test("positive rebasing", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + + let res_bal = await ham.contracts.ham.methods.balanceOf( + ham.contracts.reserves.options.address + ).call(); + + expect(res_bal).toBe("0"); + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + let a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + await ham.testing.increaseTime(i); + + let r = await ham.contracts.uni_pair.methods.getReserves().call(); + let q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote pre positive rebase", q); + + let b = await ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }); + + //console.log(b.events) + console.log("positive rebase gas used:", b["gasUsed"]); + + let bal1 = await ham.contracts.ham.methods.balanceOf(user).call(); + + let resHAM = await ham.contracts.ham.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + let resycrv = await ham.contracts.ycrv.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + console.log("bal user, bal ham res, bal res crv", bal1, resHAM, resycrv); + r = await ham.contracts.uni_pair.methods.getReserves().call(); + q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("post positive rebase quote", q); + + // new balance > old balance + expect(ham.toBigN(bal).toNumber()).toBeLessThan(ham.toBigN(bal1).toNumber()); + // used full ham reserves + expect(ham.toBigN(resHAM).toNumber()).toBe(0); + // increases reserves + expect(ham.toBigN(resycrv).toNumber()).toBeGreaterThan(0); + + + // not below peg + expect(ham.toBigN(q).toNumber()).toBeGreaterThan(ham.toBigN(10**18).toNumber()); + }); + test("negative rebasing", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "500000000000000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + let a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + await ham.testing.increaseTime(i); + + let r = await ham.contracts.uni_pair.methods.getReserves().call(); + let q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote pre negative rebase", q); + + let b = await ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }); + + //console.log(b.events) + console.log("negative rebase gas used:", b["gasUsed"]); + + let bal1 = await ham.contracts.ham.methods.balanceOf(user).call(); + + let resHAM = await ham.contracts.ham.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + let resycrv = await ham.contracts.ycrv.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + // balance decreases + expect(ham.toBigN(bal1).toNumber()).toBeLessThan(ham.toBigN(bal).toNumber()); + // no increases to reserves + expect(ham.toBigN(resHAM).toNumber()).toBe(0); + expect(ham.toBigN(resycrv).toNumber()).toBe(0); + }); + test("no rebasing", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + let a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + await ham.testing.increaseTime(i); + + let r = await ham.contracts.uni_pair.methods.getReserves().call(); + console.log(r, r[0], r[1]); + let q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote pre no rebase", q); + let b = await ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }); + + console.log("no rebase gas used:", b["gasUsed"]); + + let bal1 = await ham.contracts.ham.methods.balanceOf(user).call(); + + let resHAM = await ham.contracts.ham.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + let resycrv = await ham.contracts.ycrv.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + // no change + expect(ham.toBigN(bal1).toNumber()).toBe(ham.toBigN(bal).toNumber()); + // no increases to reserves + expect(ham.toBigN(resHAM).toNumber()).toBe(0); + expect(ham.toBigN(resycrv).toNumber()).toBe(0); + r = await ham.contracts.uni_pair.methods.getReserves().call(); + q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote post no rebase", q); + }); + test("rebasing with HAM in reserves", async () => { + await ham.contracts.ham.methods.transfer(ham.contracts.reserves.options.address, ham.toBigN(60000*10**18).toString()).send({from: user}); + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "500000000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + let a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + await ham.testing.increaseTime(i); + + + let r = await ham.contracts.uni_pair.methods.getReserves().call(); + let q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote pre pos rebase with reserves", q); + + let b = await ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }); + //console.log(b.events) + + console.log("positive with reserves gas used:", b["gasUsed"]); + + let bal1 = await ham.contracts.ham.methods.balanceOf(user).call(); + + let resHAM = await ham.contracts.ham.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + let resycrv = await ham.contracts.ycrv.methods.balanceOf(ham.contracts.reserves.options.address).call(); + + console.log(bal, bal1, resHAM, resycrv); + expect(ham.toBigN(bal).toNumber()).toBeLessThan(ham.toBigN(bal1).toNumber()); + expect(ham.toBigN(resHAM).toNumber()).toBeGreaterThan(0); + expect(ham.toBigN(resycrv).toNumber()).toBeGreaterThan(0); + r = await ham.contracts.uni_pair.methods.getReserves().call(); + q = await ham.contracts.uni_router.methods.quote(ham.toBigN(10**18).toString(), r[0], r[1]).call(); + console.log("quote post rebase w/ reserves", q); + expect(ham.toBigN(q).toNumber()).toBeGreaterThan(ham.toBigN(10**18).toNumber()); + }); + }); + + describe("failing", () => { + test("unitialized rebasing", async () => { + await ham.testing.expectThrow(ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }), "twap wasnt intitiated, call init_twap()"); + }); + test("no early twap", async () => { + await ham.testing.expectThrow(ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }), ""); + }); + test("too late rebasing", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "500000000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + let a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + let len = await ham.contracts.rebaser.methods.rebaseWindowLengthSec().call(); + + await ham.testing.increaseTime(i + ham.toBigN(len).toNumber()+1); + + let b = await ham.testing.expectThrow(ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }), "too late"); + }); + test("too early rebasing", async () => { + await ham.contracts.ham.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + await ham.contracts.ycrv.methods.approve( + ham.contracts.uni_router.options.address, + -1 + ).send({ + from: user, + gas: 80000 + }); + + await ham.contracts.uni_router.methods.addLiquidity( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address, + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + "1000000000000000000000000", + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 8000000 + }); + + let pair = await ham.contracts.uni_fact.methods.getPair( + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ).call(); + + ham.contracts.uni_pair.options.address = pair; + let bal = await ham.contracts.uni_pair.methods.balanceOf(user).call(); + + // make a trade to get init values in uniswap + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // trade back for easier calcs later + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "100000000000", + 100000, + [ + ham.contracts.ham.options.address, + ham.contracts.ycrv.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + await ham.testing.increaseTime(43200); + + await ham.contracts.rebaser.methods.init_twap().send({ + from: user, + gas: 500000 + }); + + + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "500000000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // init twap + let init_twap = await ham.contracts.rebaser.methods.timeOfTWAPInit().call(); + + // wait 12 hours + await ham.testing.increaseTime(12 * 60 * 60); + + // perform trade to change price + await ham.contracts.uni_router.methods.swapExactTokensForTokens( + "10000000000000000000", + 100000, + [ + ham.contracts.ycrv.options.address, + ham.contracts.ham.options.address + ], + user, + 1596740361 + 10000000 + ).send({ + from: user, + gas: 1000000 + }); + + // activate rebasing + await ham.contracts.rebaser.methods.activate_rebasing().send({ + from: user, + gas: 500000 + }); + + bal = await ham.contracts.ham.methods.balanceOf(user).call(); + + let a = await ham.web3.eth.getBlock('latest'); + + let offset = await ham.contracts.rebaser.methods.rebaseWindowOffsetSec().call(); + offset = ham.toBigN(offset).toNumber(); + let interval = await ham.contracts.rebaser.methods.minRebaseTimeIntervalSec().call(); + interval = ham.toBigN(interval).toNumber(); + + let i; + if (a["timestamp"] % interval > offset) { + i = (interval - (a["timestamp"] % interval)) + offset; + } else { + i = offset - (a["timestamp"] % interval); + } + + await ham.testing.increaseTime(i - 1); + + + + let b = await ham.testing.expectThrow(ham.contracts.rebaser.methods.rebase().send({ + from: user, + gas: 2500000 + }), "too early"); + }); + }); +}); diff --git a/yam-www/src/yam/tests/token.test.js b/ham-www/src/ham/tests/token.test.js similarity index 55% rename from yam-www/src/yam/tests/token.test.js rename to ham-www/src/ham/tests/token.test.js index b49c637..0b1ec60 100644 --- a/yam-www/src/yam/tests/token.test.js +++ b/ham-www/src/ham/tests/token.test.js @@ -1,5 +1,5 @@ import { - Yam + Ham } from "../index.js"; import * as Types from "../lib/types.js"; import { @@ -11,7 +11,7 @@ import { } from "../lib/Helpers.js" -export const yam = new Yam( +export const ham = new Ham( "http://localhost:8545/", // "http://127.0.0.1:9545/", "1001", @@ -33,65 +33,65 @@ describe("token_tests", () => { let user; let new_user; beforeAll(async () => { - const accounts = await yam.web3.eth.getAccounts(); - yam.addAccount(accounts[0]); + const accounts = await ham.web3.eth.getAccounts(); + ham.addAccount(accounts[0]); user = accounts[0]; new_user = accounts[1]; - snapshotId = await yam.testing.snapshot(); + snapshotId = await ham.testing.snapshot(); }); beforeEach(async () => { - await yam.testing.resetEVM("0x2"); + await ham.testing.resetEVM("0x2"); }); describe("expected fail transfers", () => { test("cant transfer from a 0 balance", async () => { - await yam.testing.expectThrow(yam.contracts.yam.methods.transfer(user, "100").send({from: new_user}), "SafeMath: subtraction overflow"); + await ham.testing.expectThrow(ham.contracts.ham.methods.transfer(user, "100").send({from: new_user}), "SafeMath: subtraction overflow"); }); test("cant transferFrom without allowance", async () => { - await yam.testing.expectThrow(yam.contracts.yam.methods.transferFrom(user, new_user, "100").send({from: new_user}), "SafeMath: subtraction overflow"); + await ham.testing.expectThrow(ham.contracts.ham.methods.transferFrom(user, new_user, "100").send({from: new_user}), "SafeMath: subtraction overflow"); }); }); describe("non-failing transfers", () => { test("transfer to self doesnt inflate", async () => { - let bal0 = await yam.contracts.yam.methods.balanceOf(user).call(); - await yam.contracts.yam.methods.transfer(user, "100").send({from: user}); - let bal1 = await yam.contracts.yam.methods.balanceOf(user).call(); + let bal0 = await ham.contracts.ham.methods.balanceOf(user).call(); + await ham.contracts.ham.methods.transfer(user, "100").send({from: user}); + let bal1 = await ham.contracts.ham.methods.balanceOf(user).call(); expect(bal0).toBe(bal1); }); test("transferFrom works", async () => { - let bal00 = await yam.contracts.yam.methods.balanceOf(user).call(); - let bal01 = await yam.contracts.yam.methods.balanceOf(new_user).call(); - await yam.contracts.yam.methods.approve(new_user, "100").send({from: user}); - await yam.contracts.yam.methods.transferFrom(user, new_user, "100").send({from: new_user}); - let bal10 = await yam.contracts.yam.methods.balanceOf(user).call(); - let bal11 = await yam.contracts.yam.methods.balanceOf(new_user).call(); - expect((yam.toBigN(bal01).plus(yam.toBigN(100))).toString()).toBe(bal11); - expect((yam.toBigN(bal00).minus(yam.toBigN(100))).toString()).toBe(bal10); + let bal00 = await ham.contracts.ham.methods.balanceOf(user).call(); + let bal01 = await ham.contracts.ham.methods.balanceOf(new_user).call(); + await ham.contracts.ham.methods.approve(new_user, "100").send({from: user}); + await ham.contracts.ham.methods.transferFrom(user, new_user, "100").send({from: new_user}); + let bal10 = await ham.contracts.ham.methods.balanceOf(user).call(); + let bal11 = await ham.contracts.ham.methods.balanceOf(new_user).call(); + expect((ham.toBigN(bal01).plus(ham.toBigN(100))).toString()).toBe(bal11); + expect((ham.toBigN(bal00).minus(ham.toBigN(100))).toString()).toBe(bal10); }); test("approve", async () => { - await yam.contracts.yam.methods.approve(new_user, "100").send({from: user}); - let allowance = await yam.contracts.yam.methods.allowance(user, new_user).call(); + await ham.contracts.ham.methods.approve(new_user, "100").send({from: user}); + let allowance = await ham.contracts.ham.methods.allowance(user, new_user).call(); expect(allowance).toBe("100") }); test("increaseAllowance", async () => { - await yam.contracts.yam.methods.increaseAllowance(new_user, "100").send({from: user}); - let allowance = await yam.contracts.yam.methods.allowance(user, new_user).call(); + await ham.contracts.ham.methods.increaseAllowance(new_user, "100").send({from: user}); + let allowance = await ham.contracts.ham.methods.allowance(user, new_user).call(); expect(allowance).toBe("100") }); test("decreaseAllowance", async () => { - await yam.contracts.yam.methods.increaseAllowance(new_user, "100").send({from: user}); - let allowance = await yam.contracts.yam.methods.allowance(user, new_user).call(); + await ham.contracts.ham.methods.increaseAllowance(new_user, "100").send({from: user}); + let allowance = await ham.contracts.ham.methods.allowance(user, new_user).call(); expect(allowance).toBe("100") - await yam.contracts.yam.methods.decreaseAllowance(new_user, "100").send({from: user}); - allowance = await yam.contracts.yam.methods.allowance(user, new_user).call(); + await ham.contracts.ham.methods.decreaseAllowance(new_user, "100").send({from: user}); + allowance = await ham.contracts.ham.methods.allowance(user, new_user).call(); expect(allowance).toBe("0") }); test("decreaseAllowance from 0", async () => { - await yam.contracts.yam.methods.decreaseAllowance(new_user, "100").send({from: user}); - let allowance = await yam.contracts.yam.methods.allowance(user, new_user).call(); + await ham.contracts.ham.methods.decreaseAllowance(new_user, "100").send({from: user}); + let allowance = await ham.contracts.ham.methods.allowance(user, new_user).call(); expect(allowance).toBe("0") }); }) diff --git a/yam-www/src/yamUtils/index.js b/ham-www/src/hamUtils/index.js similarity index 63% rename from yam-www/src/yamUtils/index.js rename to ham-www/src/hamUtils/index.js index 92e3977..6e48a58 100644 --- a/yam-www/src/yamUtils/index.js +++ b/ham-www/src/hamUtils/index.js @@ -73,65 +73,65 @@ export const approve = async (tokenContract, poolContract, account) => { .send({ from: account, gas: 80000 }) } -export const getPoolContracts = async (yam) => { - const pools = Object.keys(yam.contracts) +export const getPoolContracts = async (ham) => { + const pools = Object.keys(ham.contracts) .filter(c => c.indexOf('_pool') !== -1) .reduce((acc, cur) => { const newAcc = { ...acc } - newAcc[cur] = yam.contracts[cur] + newAcc[cur] = ham.contracts[cur] return newAcc }, {}) return pools } -export const getEarned = async (yam, pool, account) => { - return yam.toBigN(await pool.methods.earned(account).call()) +export const getEarned = async (ham, pool, account) => { + return ham.toBigN(await pool.methods.earned(account).call()) } -export const getStaked = async (yam, pool, account) => { - return yam.toBigN(await pool.methods.balanceOf(account).call()) +export const getStaked = async (ham, pool, account) => { + return ham.toBigN(await pool.methods.balanceOf(account).call()) } -export const getCurrentPrice = async (yam) => { - // FORBROCK: get current YAM price - return yam.toBigN(await yam.contracts.rebaser.methods.getCurrentTWAP().call()) +export const getCurrentPrice = async (ham) => { + // FORBROCK: get current HAM price + return ham.toBigN(await ham.contracts.rebaser.methods.getCurrentTWAP().call()) } -export const getTargetPrice = async (yam) => { - return yam.toBigN(1).toFixed(2); +export const getTargetPrice = async (ham) => { + return ham.toBigN(1).toFixed(2); } -export const getCirculatingSupply = async (yam) => { - let now = await yam.web3.eth.getBlock('latest'); - let scalingFactor = yam.toBigN(await yam.contracts.yam.methods.yamsScalingFactor().call()); - let starttime = yam.toBigN(await yam.contracts.eth_pool.methods.starttime().call()).toNumber(); +export const getCirculatingSupply = async (ham) => { + let now = await ham.web3.eth.getBlock('latest'); + let scalingFactor = ham.toBigN(await ham.contracts.ham.methods.hamsScalingFactor().call()); + let starttime = ham.toBigN(await ham.contracts.eth_pool.methods.starttime().call()).toNumber(); let timePassed = now["timestamp"] - starttime; if (timePassed < 0) { return 0; } - let yamsDistributed = yam.toBigN(8 * timePassed * 250000 / 625000); //yams from first 8 pools - let starttimePool2 = yam.toBigN(await yam.contracts.ycrv_pool.methods.starttime().call()).toNumber(); + let hamsDistributed = ham.toBigN(8 * timePassed * 250000 / 625000); //hams from first 8 pools + let starttimePool2 = ham.toBigN(await ham.contracts.ycrv_pool.methods.starttime().call()).toNumber(); timePassed = now["timestamp"] - starttime; - let pool2Yams = yam.toBigN(timePassed * 1500000 / 625000); // yams from second pool. note: just accounts for first week - let circulating = pool2Yams.plus(yamsDistributed).times(scalingFactor).div(10**36).toFixed(2) + let pool2Hams = ham.toBigN(timePassed * 1500000 / 625000); // hams from second pool. note: just accounts for first week + let circulating = pool2Hams.plus(hamsDistributed).times(scalingFactor).div(10**36).toFixed(2) return circulating } -export const getNextRebaseTimestamp = async (yam) => { - let now = await yam.web3.eth.getBlock('latest').then(res => res.timestamp); +export const getNextRebaseTimestamp = async (ham) => { + let now = await ham.web3.eth.getBlock('latest').then(res => res.timestamp); let interval = 43200; // 12 hours let offset = 28800; // 8am/8pm utc let secondsToRebase = 0; - if (await yam.contracts.rebaser.methods.rebasingActive().call()) { + if (await ham.contracts.rebaser.methods.rebasingActive().call()) { if (now % interval > offset) { secondsToRebase = (interval - (now % interval)) + offset; } else { secondsToRebase = offset - (now % interval); } } else { - let twap_init = yam.toBigN(await yam.contracts.rebaser.methods.timeOfTWAPInit().call()).toNumber(); + let twap_init = ham.toBigN(await ham.contracts.rebaser.methods.timeOfTWAPInit().call()).toNumber(); if (twap_init > 0) { - let delay = yam.toBigN(await yam.contracts.rebaser.methods.rebaseDelay().call()).toNumber(); + let delay = ham.toBigN(await ham.contracts.rebaser.methods.rebaseDelay().call()).toNumber(); let endTime = twap_init + delay; if (endTime % interval > offset) { secondsToRebase = (interval - (endTime % interval)) + offset; @@ -146,16 +146,16 @@ export const getNextRebaseTimestamp = async (yam) => { return 0 } -export const getTotalSupply = async (yam) => { - return await yam.contracts.yam.methods.totalSupply().call(); +export const getTotalSupply = async (ham) => { + return await ham.contracts.ham.methods.totalSupply().call(); } -export const getStats = async (yam) => { - const curPrice = await getCurrentPrice(yam) - const circSupply = await getCirculatingSupply(yam) - const nextRebase = await getNextRebaseTimestamp(yam) - const targetPrice = await getTargetPrice(yam) - const totalSupply = await getTotalSupply(yam) +export const getStats = async (ham) => { + const curPrice = await getCurrentPrice(ham) + const circSupply = await getCirculatingSupply(ham) + const nextRebase = await getNextRebaseTimestamp(ham) + const targetPrice = await getTargetPrice(ham) + const totalSupply = await getTotalSupply(ham) return { circSupply, curPrice, diff --git a/yam-www/src/hooks/useAllowance.ts b/ham-www/src/hooks/useAllowance.ts similarity index 100% rename from yam-www/src/hooks/useAllowance.ts rename to ham-www/src/hooks/useAllowance.ts diff --git a/yam-www/src/hooks/useApprove.ts b/ham-www/src/hooks/useApprove.ts similarity index 94% rename from yam-www/src/hooks/useApprove.ts rename to ham-www/src/hooks/useApprove.ts index 37ddcee..1c5ecf2 100644 --- a/yam-www/src/hooks/useApprove.ts +++ b/ham-www/src/hooks/useApprove.ts @@ -4,7 +4,7 @@ import { useWallet } from 'use-wallet' import { provider } from 'web3-core' import { Contract } from "web3-eth-contract" -import { approve } from '../yamUtils' +import { approve } from '../hamUtils' const useApprove = (tokenContract: Contract, poolContract: Contract) => { const { account }: { account: string, ethereum: provider } = useWallet() diff --git a/yam-www/src/hooks/useEarnings.ts b/ham-www/src/hooks/useEarnings.ts similarity index 67% rename from yam-www/src/hooks/useEarnings.ts rename to ham-www/src/hooks/useEarnings.ts index c650266..afc24c8 100644 --- a/yam-www/src/hooks/useEarnings.ts +++ b/ham-www/src/hooks/useEarnings.ts @@ -4,24 +4,24 @@ import BigNumber from 'bignumber.js' import { useWallet } from 'use-wallet' import { Contract } from "web3-eth-contract" -import { getEarned } from '../yamUtils' -import useYam from './useYam' +import { getEarned } from '../hamUtils' +import useHam from './useHam' const useEarnings = (pool: Contract) => { const [balance, setBalance] = useState(new BigNumber(0)) const { account }: { account: string } = useWallet() - const yam = useYam() + const ham = useHam() const fetchBalance = useCallback(async () => { - const balance = await getEarned(yam, pool, account) + const balance = await getEarned(ham, pool, account) setBalance(new BigNumber(balance)) - }, [account, pool, yam]) + }, [account, pool, ham]) useEffect(() => { - if (account && pool && yam) { + if (account && pool && ham) { fetchBalance() } - }, [account, pool, setBalance, yam]) + }, [account, pool, setBalance, ham]) return balance } diff --git a/yam-www/src/hooks/useFarm.ts b/ham-www/src/hooks/useFarm.ts similarity index 100% rename from yam-www/src/hooks/useFarm.ts rename to ham-www/src/hooks/useFarm.ts diff --git a/yam-www/src/hooks/useFarms.ts b/ham-www/src/hooks/useFarms.ts similarity index 100% rename from yam-www/src/hooks/useFarms.ts rename to ham-www/src/hooks/useFarms.ts diff --git a/yam-www/src/hooks/useModal.ts b/ham-www/src/hooks/useModal.ts similarity index 100% rename from yam-www/src/hooks/useModal.ts rename to ham-www/src/hooks/useModal.ts diff --git a/yam-www/src/hooks/usePendingTransactions.ts b/ham-www/src/hooks/usePendingTransactions.ts similarity index 100% rename from yam-www/src/hooks/usePendingTransactions.ts rename to ham-www/src/hooks/usePendingTransactions.ts diff --git a/yam-www/src/hooks/useRedeem.ts b/ham-www/src/hooks/useRedeem.ts similarity index 92% rename from yam-www/src/hooks/useRedeem.ts rename to ham-www/src/hooks/useRedeem.ts index 520e015..bbd95e6 100644 --- a/yam-www/src/hooks/useRedeem.ts +++ b/ham-www/src/hooks/useRedeem.ts @@ -3,7 +3,7 @@ import { useCallback } from 'react' import { useWallet } from 'use-wallet' import { Contract } from "web3-eth-contract" -import { redeem } from '../yamUtils' +import { redeem } from '../hamUtils' const useRedeem = (poolContract: Contract) => { const { account } = useWallet() diff --git a/yam-www/src/hooks/useReward.ts b/ham-www/src/hooks/useReward.ts similarity index 92% rename from yam-www/src/hooks/useReward.ts rename to ham-www/src/hooks/useReward.ts index 91cfbf4..d3d9639 100644 --- a/yam-www/src/hooks/useReward.ts +++ b/ham-www/src/hooks/useReward.ts @@ -3,7 +3,7 @@ import { useCallback } from 'react' import { useWallet } from 'use-wallet' import { Contract } from "web3-eth-contract" -import { harvest } from '../yamUtils' +import { harvest } from '../hamUtils' const useReward = (poolContract: Contract) => { const { account } = useWallet() diff --git a/yam-www/src/hooks/useStake.ts b/ham-www/src/hooks/useStake.ts similarity index 92% rename from yam-www/src/hooks/useStake.ts rename to ham-www/src/hooks/useStake.ts index 66ecb62..bf35308 100644 --- a/yam-www/src/hooks/useStake.ts +++ b/ham-www/src/hooks/useStake.ts @@ -3,7 +3,7 @@ import { useCallback } from 'react' import { useWallet } from 'use-wallet' import { Contract } from "web3-eth-contract" -import { stake } from '../yamUtils' +import { stake } from '../hamUtils' const useStake = (poolContract: Contract) => { const { account } = useWallet() diff --git a/yam-www/src/hooks/useStakedBalance.ts b/ham-www/src/hooks/useStakedBalance.ts similarity index 68% rename from yam-www/src/hooks/useStakedBalance.ts rename to ham-www/src/hooks/useStakedBalance.ts index 53893f5..008c829 100644 --- a/yam-www/src/hooks/useStakedBalance.ts +++ b/ham-www/src/hooks/useStakedBalance.ts @@ -4,24 +4,24 @@ import BigNumber from 'bignumber.js' import { useWallet } from 'use-wallet' import { Contract } from "web3-eth-contract" -import { getStaked } from '../yamUtils' -import useYam from './useYam' +import { getStaked } from '../hamUtils' +import useHam from './useHam' const useStakedBalance = (pool: Contract) => { const [balance, setBalance] = useState(new BigNumber(0)) const { account }: { account: string } = useWallet() - const yam = useYam() + const ham = useHam() const fetchBalance = useCallback(async () => { - const balance = await getStaked(yam, pool, account) + const balance = await getStaked(ham, pool, account) setBalance(new BigNumber(balance)) - }, [account, pool, yam]) + }, [account, pool, ham]) useEffect(() => { - if (account && pool && yam) { + if (account && pool && ham) { fetchBalance() } - }, [account, pool, setBalance, yam]) + }, [account, pool, setBalance, ham]) return balance } diff --git a/yam-www/src/hooks/useTokenBalance.ts b/ham-www/src/hooks/useTokenBalance.ts similarity index 100% rename from yam-www/src/hooks/useTokenBalance.ts rename to ham-www/src/hooks/useTokenBalance.ts diff --git a/yam-www/src/hooks/useTransactionAdder.ts b/ham-www/src/hooks/useTransactionAdder.ts similarity index 100% rename from yam-www/src/hooks/useTransactionAdder.ts rename to ham-www/src/hooks/useTransactionAdder.ts diff --git a/yam-www/src/hooks/useUnstake.ts b/ham-www/src/hooks/useUnstake.ts similarity index 92% rename from yam-www/src/hooks/useUnstake.ts rename to ham-www/src/hooks/useUnstake.ts index 7b28294..6d380f2 100644 --- a/yam-www/src/hooks/useUnstake.ts +++ b/ham-www/src/hooks/useUnstake.ts @@ -3,7 +3,7 @@ import { useCallback } from 'react' import { useWallet } from 'use-wallet' import { Contract } from "web3-eth-contract" -import { unstake } from '../yamUtils' +import { unstake } from '../hamUtils' const useUnstake = (poolContract: Contract) => { const { account } = useWallet() diff --git a/ham-www/src/hooks/useYam.ts b/ham-www/src/hooks/useYam.ts new file mode 100644 index 0000000..353c257 --- /dev/null +++ b/ham-www/src/hooks/useYam.ts @@ -0,0 +1,9 @@ +import { useContext } from 'react' +import { Context } from '../contexts/HamProvider' + +const useHam = () => { + const { ham } = useContext(Context) + return ham +} + +export default useHam \ No newline at end of file diff --git a/yam-www/src/index.css b/ham-www/src/index.css similarity index 100% rename from yam-www/src/index.css rename to ham-www/src/index.css diff --git a/yam-www/src/index.tsx b/ham-www/src/index.tsx similarity index 100% rename from yam-www/src/index.tsx rename to ham-www/src/index.tsx diff --git a/yam-www/src/logo.svg b/ham-www/src/logo.svg similarity index 100% rename from yam-www/src/logo.svg rename to ham-www/src/logo.svg diff --git a/yam-www/src/react-app-env.d.ts b/ham-www/src/react-app-env.d.ts similarity index 100% rename from yam-www/src/react-app-env.d.ts rename to ham-www/src/react-app-env.d.ts diff --git a/yam-www/src/serviceWorker.js b/ham-www/src/serviceWorker.js similarity index 100% rename from yam-www/src/serviceWorker.js rename to ham-www/src/serviceWorker.js diff --git a/yam-www/src/setupTests.js b/ham-www/src/setupTests.js similarity index 100% rename from yam-www/src/setupTests.js rename to ham-www/src/setupTests.js diff --git a/yam-www/src/theme/colors.ts b/ham-www/src/theme/colors.ts similarity index 100% rename from yam-www/src/theme/colors.ts rename to ham-www/src/theme/colors.ts diff --git a/yam-www/src/theme/index.ts b/ham-www/src/theme/index.ts similarity index 100% rename from yam-www/src/theme/index.ts rename to ham-www/src/theme/index.ts diff --git a/yam-www/src/utils/erc20.ts b/ham-www/src/utils/erc20.ts similarity index 100% rename from yam-www/src/utils/erc20.ts rename to ham-www/src/utils/erc20.ts diff --git a/yam-www/src/utils/formatAddress.ts b/ham-www/src/utils/formatAddress.ts similarity index 100% rename from yam-www/src/utils/formatAddress.ts rename to ham-www/src/utils/formatAddress.ts diff --git a/yam-www/src/utils/formatBalance.ts b/ham-www/src/utils/formatBalance.ts similarity index 100% rename from yam-www/src/utils/formatBalance.ts rename to ham-www/src/utils/formatBalance.ts diff --git a/yam-www/src/utils/index.ts b/ham-www/src/utils/index.ts similarity index 100% rename from yam-www/src/utils/index.ts rename to ham-www/src/utils/index.ts diff --git a/yam-www/src/views/About/About.tsx b/ham-www/src/views/About/About.tsx similarity index 99% rename from yam-www/src/views/About/About.tsx rename to ham-www/src/views/About/About.tsx index d040939..4cef5eb 100644 --- a/yam-www/src/views/About/About.tsx +++ b/ham-www/src/views/About/About.tsx @@ -19,7 +19,7 @@ At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praese const About: React.FC = () => { return ( - + diff --git a/yam-www/src/views/About/index.ts b/ham-www/src/views/About/index.ts similarity index 100% rename from yam-www/src/views/About/index.ts rename to ham-www/src/views/About/index.ts diff --git a/yam-www/src/views/Farm/Farm.tsx b/ham-www/src/views/Farm/Farm.tsx similarity index 100% rename from yam-www/src/views/Farm/Farm.tsx rename to ham-www/src/views/Farm/Farm.tsx diff --git a/yam-www/src/views/Farm/components/DepositModal.tsx b/ham-www/src/views/Farm/components/DepositModal.tsx similarity index 100% rename from yam-www/src/views/Farm/components/DepositModal.tsx rename to ham-www/src/views/Farm/components/DepositModal.tsx diff --git a/yam-www/src/views/Farm/components/Harvest.tsx b/ham-www/src/views/Farm/components/Harvest.tsx similarity index 97% rename from yam-www/src/views/Farm/components/Harvest.tsx rename to ham-www/src/views/Farm/components/Harvest.tsx index 55de27c..fe9906a 100644 --- a/yam-www/src/views/Farm/components/Harvest.tsx +++ b/ham-www/src/views/Farm/components/Harvest.tsx @@ -31,7 +31,7 @@ const Harvest: React.FC = ({ poolContract }) => { 🍠 -